* [U-Boot] OMAP3 Remove unneeded decls
@ 2009-11-17 18:40 Tom Rix
2009-11-17 18:41 ` [U-Boot] [PATCH] OMAP3 Remove unneeded boot_flash_* declarations Tom Rix
0 siblings, 1 reply; 3+ messages in thread
From: Tom Rix @ 2009-11-17 18:40 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] OMAP3 Remove unneeded boot_flash_* declarations
2009-11-17 18:40 [U-Boot] OMAP3 Remove unneeded decls Tom Rix
@ 2009-11-17 18:41 ` Tom Rix
2009-11-18 8:02 ` Mike Rapoport
0 siblings, 1 reply; 3+ messages in thread
From: Tom Rix @ 2009-11-17 18:41 UTC (permalink / raw)
To: u-boot
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.
Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
---
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(-)
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index 7487bb7..50db43e 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -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 */
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 70186ce..62140ee 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -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 */
diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index 162bfea..a889179 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -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
/*----------------------------------------------------------------------------
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index ff25aba..671c89a 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -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)
diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h
index 838b1ad..092dfc1 100644
--- a/include/configs/omap3_pandora.h
+++ b/include/configs/omap3_pandora.h
@@ -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 */
diff --git a/include/configs/omap3_sdp3430.h b/include/configs/omap3_sdp3430.h
index a2a4b8a..3aaaef5 100644
--- a/include/configs/omap3_sdp3430.h
+++ b/include/configs/omap3_sdp3430.h
@@ -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 */
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h
index 62a6340..72f55c4 100644
--- a/include/configs/omap3_zoom1.h
+++ b/include/configs/omap3_zoom1.h
@@ -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 */
diff --git a/include/configs/omap3_zoom2.h b/include/configs/omap3_zoom2.h
index 5296630..dba5d94 100644
--- a/include/configs/omap3_zoom2.h
+++ b/include/configs/omap3_zoom2.h
@@ -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 */
--
1.6.0.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] OMAP3 Remove unneeded boot_flash_* declarations
2009-11-17 18:41 ` [U-Boot] [PATCH] OMAP3 Remove unneeded boot_flash_* declarations Tom Rix
@ 2009-11-18 8:02 ` Mike Rapoport
0 siblings, 0 replies; 3+ messages in thread
From: Mike Rapoport @ 2009-11-18 8:02 UTC (permalink / raw)
To: u-boot
Hi Tom,
Tom Rix wrote:
> 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.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
---
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(-)
diff --git a/cpu/arm_cortexa8/omap3/mem.c b/cpu/arm_cortexa8/omap3/mem.c
index dfb7e4c..bf36c96 100644
--- a/cpu/arm_cortexa8/omap3/mem.c
+++ b/cpu/arm_cortexa8/omap3/mem.c
@@ -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
}
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index 7487bb7..66cb00a 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -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 */
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 70186ce..dc18ad2 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -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 */
diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index 162bfea..37e4ee8 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -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
*----------------------------------------------------------------------------
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index ff25aba..d0a553e 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -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
diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h
index 838b1ad..9979a36 100644
--- a/include/configs/omap3_pandora.h
+++ b/include/configs/omap3_pandora.h
@@ -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 */
diff --git a/include/configs/omap3_sdp3430.h b/include/configs/omap3_sdp3430.h
index a2a4b8a..452318d 100644
--- a/include/configs/omap3_sdp3430.h
+++ b/include/configs/omap3_sdp3430.h
@@ -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 */
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h
index 62a6340..33b64d5 100644
--- a/include/configs/omap3_zoom1.h
+++ b/include/configs/omap3_zoom1.h
@@ -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 */
diff --git a/include/configs/omap3_zoom2.h b/include/configs/omap3_zoom2.h
index 5296630..9255d29 100644
--- a/include/configs/omap3_zoom2.h
+++ b/include/configs/omap3_zoom2.h
@@ -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 */
--
1.6.4.4
--
Sincerely yours,
Mike.
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-18 8:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-17 18:40 [U-Boot] OMAP3 Remove unneeded decls Tom Rix
2009-11-17 18:41 ` [U-Boot] [PATCH] OMAP3 Remove unneeded boot_flash_* declarations Tom Rix
2009-11-18 8:02 ` Mike Rapoport
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox