OMAP3 Remove unneeded decls
The repo is u-boot-ti and the branch is 'next'.
In the vein of my last patch..
This is cleanup of omap3 board config files.
This is the link to the thread on the list
http://lists.denx.de/pipermail/u-boot/2009-November/064351.html
Not all of the boot_flash_* declarations are needed by all of the boards. The set for each board was minimized by keeping the declaration of variable used is part of a #define in the config file.
This was regression tested with MAKEALL arm and runtested on Zoom2
Tom
PATCH 1/1 OMAP3 Remove unneeded boot_flash_* declarations
Only the boot_flash_* variables that are used by #defines in the OMAP3 config files should have declarations.
This patch removes the unneeded declarations.
Not all of the boot_flash_* declarations are needed by all of the boards. The set for each board was minimized by keeping the declaration of variable used is part of a #define in the config file.
--- include/configs/devkit8000.h | 4 ---- include/configs/omap3_beagle.h | 2 -- include/configs/omap3_evm.h | 1 - include/configs/omap3_overo.h | 2 -- include/configs/omap3_pandora.h | 2 -- include/configs/omap3_sdp3430.h | 8 -------- include/configs/omap3_zoom1.h | 2 -- include/configs/omap3_zoom2.h | 2 -- 8 files changed, 0 insertions(+), 23 deletions(-)
include/configs/devkit8000.h +0 -4
@@ -299,11 +299,7 @@#define CONFIG_ENV_OFFSET boot_flash_off#ifndef __ASSEMBLY__ -extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr;extern unsigned int boot_flash_off; -extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type;#endif #endif /* __CONFIG_H */
include/configs/omap3_beagle.h +0 -2
@@ -315,10 +315,8 @@#ifndef __ASSEMBLY__extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr;extern unsigned int boot_flash_off;extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type;#endif #endif /* __CONFIG_H */
include/configs/omap3_evm.h +0 -1
@@ -299,7 +299,6 @@ extern unsigned int boot_flash_base;extern volatile unsigned int boot_flash_env_addr;extern unsigned int boot_flash_off;extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type;#endif /*----------------------------------------------------------------------------
include/configs/omap3_overo.h +0 -2
@@ -300,10 +300,8 @@#ifndef __ASSEMBLY__extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr;extern unsigned int boot_flash_off;extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type;#endif #if defined(CONFIG_CMD_NET )
include/configs/omap3_pandora.h +0 -2
@@ -293,10 +293,8 @@#ifndef __ASSEMBLY__extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr;extern unsigned int boot_flash_off;extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type;#endif #endif /* __CONFIG_H */
include/configs/omap3_sdp3430.h +0 -8
@@ -360,12 +360,4 @@/*--------------------------------------------------------------------------*/ -#ifndef __ASSEMBLY__ -extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr; -extern unsigned int boot_flash_off; -extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type; -#endif -#endif /* __CONFIG_H */
include/configs/omap3_zoom1.h +0 -2
@@ -301,10 +301,8 @@#ifndef __ASSEMBLY__extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr;extern unsigned int boot_flash_off;extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type;#endif #endif /* __CONFIG_H */
include/configs/omap3_zoom2.h +0 -2
@@ -256,10 +256,8 @@#ifndef __ASSEMBLY__extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr;extern unsigned int boot_flash_off;extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type;#endif #endif /* __CONFIG_H */
Signature · 1 line
1.6.0.6
PATCH 1/1 OMAP3 Remove unneeded boot_flash_* declarations
Hi Tom,
Quoted 9 lines · Tom Rix
Only the boot_flash_* variables that are used by #defines in the OMAP3 config files should have declarations.
This patch removes the unneeded declarations.
Not all of the boot_flash_* declarations are needed by all of the boards. The set for each board was minimized by keeping the declaration of variable used is part of a #define in the config file.
After closer inspection it seems that board_flash_* variables can be removed completely. What do you think about this:
[PATCH] OMAP3 Remove unneeded boot_flash_* variables
The boot_flash_* variables can be completely replaced by static definitions and therefore are not needed.
--- cpu/arm_cortexa8/omap3/mem.c | 27 --------------------------- include/configs/devkit8000.h | 10 +--------- include/configs/omap3_beagle.h | 12 ++---------- include/configs/omap3_evm.h | 16 ++++------------ include/configs/omap3_overo.h | 14 +++----------- include/configs/omap3_pandora.h | 14 +++----------- include/configs/omap3_sdp3430.h | 10 ---------- include/configs/omap3_zoom1.h | 14 +++----------- include/configs/omap3_zoom2.h | 14 +++----------- 9 files changed, 19 insertions(+), 112 deletions(-)
cpu/arm_cortexa8/omap3/mem.c +0 -27
@@ -35,11 +35,6 @@* Only One NAND allowed on board at a time. * The GPMC CS Base for the same */ -unsigned int boot_flash_base; -unsigned int boot_flash_off; -unsigned int boot_flash_sec; -unsigned int boot_flash_type; -volatile unsigned int boot_flash_env_addr;struct gpmc *gpmc_cfg;
@@ -224,10 +219,6 @@ void gpmc_init(void)const u32 *gpmc_config =NULL ;u32 base =0 ;u32 size =0 ; -#if defined(CONFIG_ENV_IS_IN_NAND ) || defined(CONFIG_ENV_IS_IN_ONENAND ) -u32 f_off =CONFIG_SYS_MONITOR_LEN ; -u32 f_sec =0 ; -#endif #endif u32 config =0 ;
@@ -252,15 +243,6 @@ void gpmc_init(void) base =PISMO1_NAND_BASE ; size =PISMO1_NAND_SIZE ;enable_gpmc_cs_config (gpmc_config, &gpmc_cfg->cs[0 ], base, size); -#if defined(CONFIG_ENV_IS_IN_NAND ) - f_off =SMNAND_ENV_OFFSET ; - f_sec = (128 <<10 );/* 128 KiB */ -/* env setup */ - boot_flash_base = base; - boot_flash_off = f_off; - boot_flash_sec = f_sec; - boot_flash_env_addr = f_off; -#endif #endif #if defined(CONFIG_CMD_ONENAND )
@@ -268,14 +250,5 @@ void gpmc_init(void) base =PISMO1_ONEN_BASE ; size =PISMO1_ONEN_SIZE ;enable_gpmc_cs_config (gpmc_config, &gpmc_cfg->cs[0 ], base, size); -#if defined(CONFIG_ENV_IS_IN_ONENAND ) - f_off =ONENAND_ENV_OFFSET ; - f_sec = (128 <<10 );/* 128 KiB */ -/* env setup */ - boot_flash_base = base; - boot_flash_off = f_off; - boot_flash_sec = f_sec; - boot_flash_env_addr = f_off; -#endif #endif }
include/configs/devkit8000.h +1 -9
@@ -296,14 +296,6 @@#define CONFIG_ENV_IS_IN_NAND 1#define SMNAND_ENV_OFFSET 0x260000/* environment starts here */ -#define CONFIG_ENV_OFFSET boot_flash_off - -#ifndef __ASSEMBLY__ -extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr; -extern unsigned int boot_flash_off; -extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type; -#endif +#define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET#endif /* __CONFIG_H */
include/configs/omap3_beagle.h +2 -10
@@ -294,8 +294,8 @@#define ONENAND_ENV_OFFSET 0x260000/* environment starts here */ #define SMNAND_ENV_OFFSET 0x260000/* environment starts here */ -#define CONFIG_SYS_ENV_SECT_SIZE boot_flash_sec -#define CONFIG_ENV_OFFSET boot_flash_off +#define CONFIG_SYS_ENV_SECT_SIZE (1 << 128) +#define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET#define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET/*-----------------------------------------------------------------------
@@ -313,12 +313,4 @@#define CONFIG_SYS_JFFS2_FIRST_BANK CONFIG_SYS_MAX_FLASH_BANKS#define CONFIG_SYS_JFFS2_NUM_BANKS 1 -#ifndef __ASSEMBLY__ -extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr; -extern unsigned int boot_flash_off; -extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type; -#endif -#endif /* __CONFIG_H */
include/configs/omap3_evm.h +4 -12
@@ -265,7 +265,7 @@#define CONFIG_SYS_MAX_FLASH_BANKS 2/* max number of flash banks */ #define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ -#define CONFIG_SYS_FLASH_BASE boot_flash_base +#define CONFIG_SYS_FLASH_BASE ONENAND_MAP/* Monitor at start of flash */ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
@@ -275,9 +275,9 @@#define ONENAND_ENV_OFFSET 0x260000/* environment starts here */ #define SMNAND_ENV_OFFSET 0x260000/* environment starts here */ -#define CONFIG_SYS_ENV_SECT_SIZE boot_flash_sec -#define CONFIG_ENV_OFFSET boot_flash_off -#define CONFIG_ENV_ADDR boot_flash_env_addr +#define CONFIG_SYS_ENV_SECT_SIZE (1 << 128) +#define CONFIG_ENV_OFFSET ONENAND_ENV_OFFSET +#define CONFIG_ENV_ADDR ONENAND_ENV_OFFSET/*----------------------------------------------------------------------- * CFI FLASH driver setup
@@ -294,14 +294,6 @@#define CONFIG_SYS_JFFS2_FIRST_BANK CONFIG_SYS_MAX_FLASH_BANKS#define CONFIG_SYS_JFFS2_NUM_BANKS 1 -#ifndef __ASSEMBLY__ -extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr; -extern unsigned int boot_flash_off; -extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type; -#endif -/*---------------------------------------------------------------------------- * SMSC9115 Ethernet from SMSC9118 family *----------------------------------------------------------------------------
include/configs/omap3_overo.h +3 -11
@@ -269,7 +269,7 @@#define CONFIG_SYS_MAX_FLASH_BANKS 2/* max number of flash banks */ #define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ -#define CONFIG_SYS_FLASH_BASE boot_flash_base +#define CONFIG_SYS_FLASH_BASE NAND_BASE/* Monitor at start of flash */ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
@@ -279,8 +279,8 @@#define ONENAND_ENV_OFFSET 0x240000/* environment starts here */ #define SMNAND_ENV_OFFSET 0x240000/* environment starts here */ -#define CONFIG_SYS_ENV_SECT_SIZE boot_flash_sec -#define CONFIG_ENV_OFFSET boot_flash_off +#define CONFIG_SYS_ENV_SECT_SIZE (1 << 128) +#define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET#define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET/*-----------------------------------------------------------------------
@@ -298,14 +298,6 @@#define CONFIG_SYS_JFFS2_FIRST_BANK CONFIG_SYS_MAX_FLASH_BANKS#define CONFIG_SYS_JFFS2_NUM_BANKS 1 -#ifndef __ASSEMBLY__ -extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr; -extern unsigned int boot_flash_off; -extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type; -#endif -#if defined(CONFIG_CMD_NET )/*---------------------------------------------------------------------------- * SMSC9211 Ethernet from SMSC9118 family
include/configs/omap3_pandora.h +3 -11
@@ -262,7 +262,7 @@#define CONFIG_SYS_MAX_FLASH_BANKS 2/* max number of flash banks */ #define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ -#define CONFIG_SYS_FLASH_BASE boot_flash_base +#define CONFIG_SYS_FLASH_BASE ONENAND_MAP/* Monitor at start of flash */ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
@@ -272,8 +272,8 @@#define ONENAND_ENV_OFFSET 0x240000/* environment starts here */ #define SMNAND_ENV_OFFSET 0x240000/* environment starts here */ -#define CONFIG_SYS_ENV_SECT_SIZE boot_flash_sec -#define CONFIG_ENV_OFFSET boot_flash_off +#define CONFIG_SYS_ENV_SECT_SIZE (1 << 128) +#define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET#define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET/*-----------------------------------------------------------------------
@@ -291,12 +291,4 @@#define CONFIG_SYS_JFFS2_FIRST_BANK CONFIG_SYS_MAX_FLASH_BANKS#define CONFIG_SYS_JFFS2_NUM_BANKS 1 -#ifndef __ASSEMBLY__ -extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr; -extern unsigned int boot_flash_off; -extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type; -#endif -#endif /* __CONFIG_H */
include/configs/omap3_sdp3430.h +0 -10
@@ -358,14 +358,4 @@* - rest for filesystem */ -/*--------------------------------------------------------------------------*/ - -#ifndef __ASSEMBLY__ -extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr; -extern unsigned int boot_flash_off; -extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type; -#endif -#endif /* __CONFIG_H */
include/configs/omap3_zoom1.h +3 -11
@@ -270,7 +270,7 @@#define CONFIG_SYS_MAX_FLASH_BANKS 2/* max number of flash banks */ #define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ -#define CONFIG_SYS_FLASH_BASE boot_flash_base +#define CONFIG_SYS_FLASH_BASE CONFIG_SYS_NAND_BASE/* Monitor at start of flash */ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
@@ -280,8 +280,8 @@#define ONENAND_ENV_OFFSET 0x260000/* environment starts here */ #define SMNAND_ENV_OFFSET 0x260000/* environment starts here */ -#define CONFIG_SYS_ENV_SECT_SIZE boot_flash_sec -#define CONFIG_ENV_OFFSET boot_flash_off +#define CONFIG_SYS_ENV_SECT_SIZE (1 << 128) +#define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET#define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET/*-----------------------------------------------------------------------
@@ -299,12 +299,4 @@#define CONFIG_SYS_JFFS2_FIRST_BANK CONFIG_SYS_MAX_FLASH_BANKS#define CONFIG_SYS_JFFS2_NUM_BANKS 1 -#ifndef __ASSEMBLY__ -extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr; -extern unsigned int boot_flash_off; -extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type; -#endif -#endif /* __CONFIG_H */
include/configs/omap3_zoom2.h +3 -11
@@ -235,7 +235,7 @@#define CONFIG_SYS_MAX_FLASH_BANKS 2/* max number of flash banks */ #define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ -#define CONFIG_SYS_FLASH_BASE boot_flash_base +#define CONFIG_SYS_FLASH_BASE CONFIG_SYS_NAND_BASE/* Monitor@start of flash */ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
@@ -243,8 +243,8 @@#define CONFIG_ENV_IS_IN_NAND 1#define SMNAND_ENV_OFFSET 0x0c0000/* environment starts here */ -#define CONFIG_SYS_ENV_SECT_SIZE boot_flash_sec -#define CONFIG_ENV_OFFSET boot_flash_off +#define CONFIG_SYS_ENV_SECT_SIZE (1 << 128) +#define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET#define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET/*-----------------------------------------------------------------------
@@ -254,12 +254,4 @@#define CONFIG_SYS_FLASH_ERASE_TOUT (100 * CONFIG_SYS_HZ)#define CONFIG_SYS_FLASH_WRITE_TOUT (100 * CONFIG_SYS_HZ) -#ifndef __ASSEMBLY__ -extern unsigned int boot_flash_base; -extern volatile unsigned int boot_flash_env_addr; -extern unsigned int boot_flash_off; -extern unsigned int boot_flash_sec; -extern unsigned int boot_flash_type; -#endif -#endif /* __CONFIG_H */
Signature · 7 lines
1.6.4.4 -- Sincerely yours, Mike.