[U-Boot] [PATCH 2/2] omap3: Remove multiple extern decls for gpmc_cfg
Sanjeev Premi
premi at ti.com
Wed Dec 23 15:38:31 CET 2009
'gpmc_cfg' had been declared extern in all configuration
files. It had been specifically declared extern in some
C files as well.
This patch moves the declaration to omap_gpmc.h. This
header is included wherever this variable is used.
Signed-off-by: Sanjeev Premi <premi at ti.com>
---
board/ti/evm/evm.c | 3 ++-
cpu/arm_cortexa8/omap3/sys_info.c | 1 +
include/asm-arm/arch-omap3/omap_gpmc.h | 5 +++++
3 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c
index 0718a08..6e3f5e5 100644
--- a/board/ti/evm/evm.c
+++ b/board/ti/evm/evm.c
@@ -30,11 +30,12 @@
#include <common.h>
#include <netdev.h>
#include <asm/io.h>
+#include <asm/mach-types.h>
#include <asm/arch/mem.h>
#include <asm/arch/mux.h>
+#include <asm/arch/omap_gpmc.h>
#include <asm/arch/sys_proto.h>
#include <i2c.h>
-#include <asm/mach-types.h>
#include "evm.h"
/*
diff --git a/cpu/arm_cortexa8/omap3/sys_info.c b/cpu/arm_cortexa8/omap3/sys_info.c
index 08fb32e..7b6015f 100644
--- a/cpu/arm_cortexa8/omap3/sys_info.c
+++ b/cpu/arm_cortexa8/omap3/sys_info.c
@@ -29,6 +29,7 @@
#include <asm/io.h>
#include <asm/arch/mem.h> /* get mem tables */
#include <asm/arch/sys_proto.h>
+#include <asm/arch/omap_gpmc.h>
#include <i2c.h>
extern omap3_sysinfo sysinfo;
diff --git a/include/asm-arm/arch-omap3/omap_gpmc.h b/include/asm-arm/arch-omap3/omap_gpmc.h
index bd22bce..d986343 100644
--- a/include/asm-arm/arch-omap3/omap_gpmc.h
+++ b/include/asm-arm/arch-omap3/omap_gpmc.h
@@ -80,4 +80,9 @@
}
#endif
+#ifndef __ASSEMBLY__
+extern struct gpmc *gpmc_cfg;
+#endif
+
#endif /* __ASM_ARCH_OMAP_GPMC_H */
+
--
1.6.2.2
More information about the U-Boot
mailing list