mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-09 12:13:00 -04:00
ppc4xx: HCU4/5. Use FLASH_CFI_LEGACY
Cleanup: Remove custom flash driver for 8 bit boot-eprom and replace it with the FLASH_CFI_LEGACY et al. config options. Signed-off-by: Niklaus Giger <niklaus.giger@netstal.com>
This commit is contained in:
parent
e4170e5a50
commit
a079494853
@ -23,7 +23,7 @@ include $(TOPDIR)/config.mk
|
|||||||
LIB = $(obj)lib$(BOARD).a
|
LIB = $(obj)lib$(BOARD).a
|
||||||
|
|
||||||
# NOBJS : Netstal common objects
|
# NOBJS : Netstal common objects
|
||||||
NOBJS = fixed_sdram.o hcu_flash.o nm_bsp.o
|
NOBJS = fixed_sdram.o nm_bsp.o
|
||||||
COBJS = $(BOARD).o
|
COBJS = $(BOARD).o
|
||||||
SOBJS =
|
SOBJS =
|
||||||
|
|
||||||
|
@ -201,3 +201,19 @@ void ft_board_setup(void *blob, bd_t *bd)
|
|||||||
|
|
||||||
}
|
}
|
||||||
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
|
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hardcoded flash setup:
|
||||||
|
* Flash 0 is a non-CFI AMD AM29F040 flash, 8 bit flash / 8 bit bus.
|
||||||
|
*/
|
||||||
|
ulong board_flash_get_legacy (ulong base, int banknum, flash_info_t * info)
|
||||||
|
{
|
||||||
|
if (banknum == 0) { /* non-CFI boot flash */
|
||||||
|
info->portwidth = 1;
|
||||||
|
info->chipwidth = 1;
|
||||||
|
info->interface = FLASH_CFI_X8;
|
||||||
|
return 1;
|
||||||
|
} else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ LIB = $(obj)lib$(BOARD).a
|
|||||||
|
|
||||||
|
|
||||||
# NOBJS : Netstal common objects
|
# NOBJS : Netstal common objects
|
||||||
NOBJS = hcu_flash.o nm_bsp.o
|
NOBJS = nm_bsp.o
|
||||||
COBJS = $(BOARD).o sdram.o
|
COBJS = $(BOARD).o sdram.o
|
||||||
SOBJS = init.o
|
SOBJS = init.o
|
||||||
|
|
||||||
|
@ -499,3 +499,19 @@ void ft_board_setup(void *blob, bd_t *bd)
|
|||||||
|
|
||||||
}
|
}
|
||||||
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
|
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hardcoded flash setup:
|
||||||
|
* Flash 0 is a non-CFI AMD AM29F040 flash, 8 bit flash / 8 bit bus.
|
||||||
|
*/
|
||||||
|
ulong board_flash_get_legacy (ulong base, int banknum, flash_info_t * info)
|
||||||
|
{
|
||||||
|
if (banknum == 0) { /* non-CFI boot flash */
|
||||||
|
info->portwidth = 1;
|
||||||
|
info->chipwidth = 1;
|
||||||
|
info->interface = FLASH_CFI_X8;
|
||||||
|
return 1;
|
||||||
|
} else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*(C) Copyright 2005-2007 Netstal Maschinen AG
|
*(C) Copyright 2005-2008 Netstal Maschinen AG
|
||||||
* Niklaus Giger (Niklaus.Giger@netstal.com)
|
* Niklaus Giger (Niklaus.Giger@netstal.com)
|
||||||
*
|
*
|
||||||
* See file CREDITS for list of people who contributed to this
|
* See file CREDITS for list of people who contributed to this
|
||||||
@ -103,14 +103,20 @@
|
|||||||
* Flash
|
* Flash
|
||||||
*----------------------------------------------------------------------*/
|
*----------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Use common CFI driver */
|
||||||
|
#define CFG_FLASH_CFI
|
||||||
|
#define CFG_FLASH_CFI_DRIVER
|
||||||
|
/* board provides its own flash_init code */
|
||||||
|
#define CONFIG_FLASH_CFI_LEGACY 1
|
||||||
|
#define CFG_FLASH_CFI_WIDTH FLASH_CFI_8BIT
|
||||||
|
#define CFG_FLASH_LEGACY_512Kx8 1
|
||||||
|
|
||||||
|
/* print 'E' for empty sector on flinfo */
|
||||||
|
#define CFG_FLASH_EMPTY_INFO
|
||||||
|
|
||||||
#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
|
#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
|
||||||
#define CFG_MAX_FLASH_SECT 8 /* max number of sectors on one chip */
|
#define CFG_MAX_FLASH_SECT 8 /* max number of sectors on one chip */
|
||||||
|
|
||||||
#define CFG_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */
|
|
||||||
|
|
||||||
#define CFG_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
|
|
||||||
#define CFG_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------
|
/*-----------------------------------------------------------------------
|
||||||
* Environment
|
* Environment
|
||||||
*----------------------------------------------------------------------*/
|
*----------------------------------------------------------------------*/
|
||||||
|
@ -349,12 +349,20 @@
|
|||||||
* Flash
|
* Flash
|
||||||
*----------------------------------------------------------------------*/
|
*----------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Use common CFI driver */
|
||||||
|
#define CFG_FLASH_CFI
|
||||||
|
#define CFG_FLASH_CFI_DRIVER
|
||||||
|
/* board provides its own flash_init code */
|
||||||
|
#define CONFIG_FLASH_CFI_LEGACY 1
|
||||||
|
#define CFG_FLASH_CFI_WIDTH FLASH_CFI_8BIT
|
||||||
|
#define CFG_FLASH_LEGACY_512Kx8 1
|
||||||
|
|
||||||
|
/* print 'E' for empty sector on flinfo */
|
||||||
|
#define CFG_FLASH_EMPTY_INFO
|
||||||
|
|
||||||
#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
|
#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
|
||||||
#define CFG_MAX_FLASH_SECT 8 /* max number of sectors on one chip */
|
#define CFG_MAX_FLASH_SECT 8 /* max number of sectors on one chip */
|
||||||
|
|
||||||
#define CFG_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
|
|
||||||
#define CFG_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------
|
/*-----------------------------------------------------------------------
|
||||||
* External Bus Controller (EBC) Setup
|
* External Bus Controller (EBC) Setup
|
||||||
*----------------------------------------------------------------------*/
|
*----------------------------------------------------------------------*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user