Skip to contentSkip to conversation

OMAP3 move declaration of gpmc_cfg

U-Boot New Tom Rix 2 participants 4 messages Nov 16, 2009 – Jan 26, 2010

lore
Share & tools
lore
author
#1 lore raw

PATCH 1/1 OMAP3 Move declaration of gpmc_cfg.

Every omap3 board config file declared the global variable gpmc_cfg. This changes moves the declaration to a better location in the arch dependent header file cpu.h.

---
 include/asm-arm/arch-omap3/cpu.h |    4 ++++
 include/configs/devkit8000.h     |    1 -
 include/configs/omap3_beagle.h   |    1 -
 include/configs/omap3_evm.h      |    1 -
 include/configs/omap3_overo.h    |    1 -
 include/configs/omap3_pandora.h  |    1 -
 include/configs/omap3_sdp3430.h  |    1 -
 include/configs/omap3_zoom1.h    |    1 -
 include/configs/omap3_zoom2.h    |    1 -
 9 files changed, 4 insertions(+), 8 deletions(-)
include/asm-arm/arch-omap3/cpu.h +4 -0
index e51c4f3..aa8de32 100644
@@ -136,6 +136,10 @@ struct gpmc {
 	u32 ecc8_result;	/* 0x21C */
 	u32 ecc9_result;	/* 0x220 */
 };
+
+/* Used for board specific gpmc initialization */
+extern struct gpmc *gpmc_cfg;
+
 #else /* __ASSEMBLY__ */
 #define GPMC_CONFIG1		0x00
 #define GPMC_CONFIG2		0x04
include/configs/devkit8000.h +0 -1
index 1011770..7487bb7 100644
@@ -299,7 +299,6 @@
 #define CONFIG_ENV_OFFSET		boot_flash_off
 
 #ifndef __ASSEMBLY__
-extern struct gpmc *gpmc_cfg;
 extern unsigned int boot_flash_base;
 extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
include/configs/omap3_beagle.h +0 -1
index 024b9b8..70186ce 100644
@@ -314,7 +314,6 @@
 #define CONFIG_SYS_JFFS2_NUM_BANKS	1
 
 #ifndef __ASSEMBLY__
-extern struct gpmc *gpmc_cfg;
 extern unsigned int boot_flash_base;
 extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
include/configs/omap3_evm.h +0 -1
index 6709edc..162bfea 100644
@@ -295,7 +295,6 @@
 #define CONFIG_SYS_JFFS2_NUM_BANKS	1
 
 #ifndef __ASSEMBLY__
-extern struct gpmc *gpmc_cfg;
 extern unsigned int boot_flash_base;
 extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
include/configs/omap3_overo.h +0 -1
index 0f812a7..ff25aba 100644
@@ -299,7 +299,6 @@
 #define CONFIG_SYS_JFFS2_NUM_BANKS	1
 
 #ifndef __ASSEMBLY__
-extern struct gpmc *gpmc_cfg;
 extern unsigned int boot_flash_base;
 extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
include/configs/omap3_pandora.h +0 -1
index 0cafeb8..838b1ad 100644
@@ -292,7 +292,6 @@
 #define CONFIG_SYS_JFFS2_NUM_BANKS	1
 
 #ifndef __ASSEMBLY__
-extern struct gpmc *gpmc_cfg;
 extern unsigned int boot_flash_base;
 extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
include/configs/omap3_sdp3430.h +0 -1
index d91c8ff..a2a4b8a 100644
@@ -361,7 +361,6 @@
 /*--------------------------------------------------------------------------*/
 
 #ifndef __ASSEMBLY__
-extern struct gpmc *gpmc_cfg;
 extern unsigned int boot_flash_base;
 extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
include/configs/omap3_zoom1.h +0 -1
index 2aef973..62a6340 100644
@@ -300,7 +300,6 @@
 #define CONFIG_SYS_JFFS2_NUM_BANKS	1
 
 #ifndef __ASSEMBLY__
-extern struct gpmc *gpmc_cfg;
 extern unsigned int boot_flash_base;
 extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
include/configs/omap3_zoom2.h +0 -1
index 5b03fb6..5296630 100644
@@ -255,7 +255,6 @@
 #define CONFIG_SYS_FLASH_WRITE_TOUT	(100 * CONFIG_SYS_HZ)
 
 #ifndef __ASSEMBLY__
-extern struct gpmc *gpmc_cfg;
 extern unsigned int boot_flash_base;
 extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
Signature · 1 line
1.6.0.6
#2 lore raw

PATCH 1/1 OMAP3 Move declaration of gpmc_cfg.

Quoted 10 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Tom Rix
Sent: Tuesday, November 17, 2009 2:20 AM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH] OMAP3 Move declaration of gpmc_cfg.

Every omap3 board config file declared the global variable gpmc_cfg. This changes moves the declaration to a better location in the arch dependent header file cpu.h.

Hi Tom,

Wouldn't omap_gpmc.h be a better place for this?

Sorry, I had missed this post earlier; but found after implementing the change for omap3evm and am3517evm; Came across this port while following the trail for removing other externs from the config files.

Best regards,
Sanjeev

Quoted 143 lines
---
 include/asm-arm/arch-omap3/cpu.h |    4 ++++
 include/configs/devkit8000.h     |    1 -
 include/configs/omap3_beagle.h   |    1 -
 include/configs/omap3_evm.h      |    1 -
 include/configs/omap3_overo.h    |    1 -
 include/configs/omap3_pandora.h  |    1 -
 include/configs/omap3_sdp3430.h  |    1 -
 include/configs/omap3_zoom1.h    |    1 -
 include/configs/omap3_zoom2.h    |    1 -
 9 files changed, 4 insertions(+), 8 deletions(-)
include/asm-arm/arch-omap3/cpu.h +4 -0
index e51c4f3..aa8de32 100644
@@ -136,6 +136,10 @@ struct gpmc {
 	u32 ecc8_result;	/* 0x21C */
 	u32 ecc9_result;	/* 0x220 */
 };
+
+/* Used for board specific gpmc initialization */
+extern struct gpmc *gpmc_cfg;
+
 #else /* __ASSEMBLY__ */
 #define GPMC_CONFIG1		0x00
 #define GPMC_CONFIG2		0x04
include/configs/devkit8000.h +0 -1
index 1011770..7487bb7 100644
@@ -299,7 +299,6 @@
 #define CONFIG_ENV_OFFSET		boot_flash_off
 
 #ifndef __ASSEMBLY__
-extern struct gpmc *gpmc_cfg;
 extern unsigned int boot_flash_base;
 extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
include/configs/omap3_beagle.h +0 -1
index 024b9b8..70186ce 100644
@@ -314,7 +314,6 @@
 #define CONFIG_SYS_JFFS2_NUM_BANKS	1
 
 #ifndef __ASSEMBLY__
-extern struct gpmc *gpmc_cfg;
 extern unsigned int boot_flash_base;
 extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
include/configs/omap3_evm.h +0 -1
index 6709edc..162bfea 100644
@@ -295,7 +295,6 @@
 #define CONFIG_SYS_JFFS2_NUM_BANKS	1
 
 #ifndef __ASSEMBLY__
-extern struct gpmc *gpmc_cfg;
 extern unsigned int boot_flash_base;
 extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
include/configs/omap3_overo.h +0 -1
index 0f812a7..ff25aba 100644
@@ -299,7 +299,6 @@
 #define CONFIG_SYS_JFFS2_NUM_BANKS	1
 
 #ifndef __ASSEMBLY__
-extern struct gpmc *gpmc_cfg;
 extern unsigned int boot_flash_base;
 extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
include/configs/omap3_pandora.h +0 -1
index 0cafeb8..838b1ad 100644
@@ -292,7 +292,6 @@
 #define CONFIG_SYS_JFFS2_NUM_BANKS	1
 
 #ifndef __ASSEMBLY__
-extern struct gpmc *gpmc_cfg;
 extern unsigned int boot_flash_base;
 extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
include/configs/omap3_sdp3430.h +0 -2
index d91c8ff..a2a4b8a 100644
@@ -361,7 +361,6 @@
 
 /*------------------------------------------------------------
--------------*/
 
 #ifndef __ASSEMBLY__
-extern struct gpmc *gpmc_cfg;
 extern unsigned int boot_flash_base;
 extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
include/configs/omap3_zoom1.h +0 -1
index 2aef973..62a6340 100644
@@ -300,7 +300,6 @@
 #define CONFIG_SYS_JFFS2_NUM_BANKS	1
 
 #ifndef __ASSEMBLY__
-extern struct gpmc *gpmc_cfg;
 extern unsigned int boot_flash_base;
 extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
include/configs/omap3_zoom2.h +0 -1
index 5b03fb6..5296630 100644
@@ -255,7 +255,6 @@
 #define CONFIG_SYS_FLASH_WRITE_TOUT	(100 * CONFIG_SYS_HZ)
 
 #ifndef __ASSEMBLY__
-extern struct gpmc *gpmc_cfg;
 extern unsigned int boot_flash_base;
 extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
Signature · 6 lines
1.6.0.6

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
#3 lore raw

PATCH 1/1 OMAP3 Move declaration of gpmc_cfg.

In reply to Tom Rix
Quoted 8 lines

Every omap3 board config file declared the global variable gpmc_cfg. This changes moves the declaration to a better location in the arch dependent header file cpu.h.

Quoted 11 lines
---
 include/asm-arm/arch-omap3/cpu.h |    4 ++++
 include/configs/devkit8000.h     |    1 -
 include/configs/omap3_beagle.h   |    1 -
 include/configs/omap3_evm.h      |    1 -
 include/configs/omap3_overo.h    |    1 -
 include/configs/omap3_pandora.h  |    1 -
 include/configs/omap3_sdp3430.h  |    1 -
 include/configs/omap3_zoom1.h    |    1 -
 include/configs/omap3_zoom2.h    |    1 -
 9 files changed, 4 insertions(+), 8 deletions(-)

Pushed to u-boot-ti

Thanks,
Sandeep