[U-Boot] [PATCH 3/5] ARM: kirkwood: reduce dependence of including platform file
Lei Wen
adrian.wenl at gmail.com
Sun Oct 2 16:16:51 CEST 2011
For files like the drivers/serial/serial.c, it must include the
platform file, as the CONFIG_SYS_NS16550_COM1 must reference to the
definition in the platform definition files.
Include the platform definition file in the config file, so that it
would decouple the dependence for the driver files.
Signed-off-by: Lei Wen <leiwen at marvell.com>
---
arch/arm/cpu/arm926ejs/kirkwood/cpu.c | 2 ++
arch/arm/cpu/arm926ejs/kirkwood/dram.c | 2 ++
arch/arm/cpu/arm926ejs/kirkwood/mpp.c | 2 ++
arch/arm/cpu/arm926ejs/kirkwood/timer.c | 1 +
arch/arm/include/asm/arch-kirkwood/config.h | 1 +
arch/arm/include/asm/arch-kirkwood/kirkwood.h | 6 ------
board/Marvell/guruplug/guruplug.c | 1 +
board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c | 1 +
board/Marvell/openrd/openrd.c | 1 +
board/Marvell/rd6281a/rd6281a.c | 1 +
board/Marvell/sheevaplug/sheevaplug.c | 1 +
board/keymile/km_arm/km_arm.c | 1 +
drivers/gpio/kw_gpio.c | 1 +
drivers/net/mvgbe.c | 2 ++
drivers/spi/kirkwood_spi.c | 1 +
drivers/usb/host/ehci-kirkwood.c | 1 +
16 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
index b4a4c04..8f04ddb 100644
--- a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
+++ b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
@@ -26,6 +26,8 @@
#include <netdev.h>
#include <asm/cache.h>
#include <u-boot/md5.h>
+#include <asm/io.h>
+#include <asm/arch/cpu.h>
#include <asm/arch/kirkwood.h>
#include <hush.h>
diff --git a/arch/arm/cpu/arm926ejs/kirkwood/dram.c b/arch/arm/cpu/arm926ejs/kirkwood/dram.c
index 2441554..181b3e7 100644
--- a/arch/arm/cpu/arm926ejs/kirkwood/dram.c
+++ b/arch/arm/cpu/arm926ejs/kirkwood/dram.c
@@ -24,6 +24,8 @@
#include <config.h>
#include <common.h>
+#include <asm/io.h>
+#include <asm/arch/cpu.h>
#include <asm/arch/kirkwood.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/cpu/arm926ejs/kirkwood/mpp.c b/arch/arm/cpu/arm926ejs/kirkwood/mpp.c
index b2f0ad5..3da6c98 100644
--- a/arch/arm/cpu/arm926ejs/kirkwood/mpp.c
+++ b/arch/arm/cpu/arm926ejs/kirkwood/mpp.c
@@ -10,6 +10,8 @@
*/
#include <common.h>
+#include <asm/io.h>
+#include <asm/arch/cpu.h>
#include <asm/arch/kirkwood.h>
#include <asm/arch/mpp.h>
diff --git a/arch/arm/cpu/arm926ejs/kirkwood/timer.c b/arch/arm/cpu/arm926ejs/kirkwood/timer.c
index b4f6cf8..a98f54c 100644
--- a/arch/arm/cpu/arm926ejs/kirkwood/timer.c
+++ b/arch/arm/cpu/arm926ejs/kirkwood/timer.c
@@ -22,6 +22,7 @@
*/
#include <common.h>
+#include <asm/io.h>
#include <asm/arch/kirkwood.h>
#define UBOOT_CNTR 0 /* counter to use for uboot timer */
diff --git a/arch/arm/include/asm/arch-kirkwood/config.h b/arch/arm/include/asm/arch-kirkwood/config.h
index b7dae1e..ab7201b 100644
--- a/arch/arm/include/asm/arch-kirkwood/config.h
+++ b/arch/arm/include/asm/arch-kirkwood/config.h
@@ -39,6 +39,7 @@
#error "SOC Name not defined"
#endif /* CONFIG_KW88F6281 */
+#include <asm/arch/kirkwood.h>
#define CONFIG_ARM926EJS 1 /* Basic Architecture */
#define CONFIG_MD5 /* get_random_hex on krikwood needs MD5 support */
diff --git a/arch/arm/include/asm/arch-kirkwood/kirkwood.h b/arch/arm/include/asm/arch-kirkwood/kirkwood.h
index 3c843a0..0035ed5 100644
--- a/arch/arm/include/asm/arch-kirkwood/kirkwood.h
+++ b/arch/arm/include/asm/arch-kirkwood/kirkwood.h
@@ -27,13 +27,7 @@
#ifndef _ASM_ARCH_KIRKWOOD_H
#define _ASM_ARCH_KIRKWOOD_H
-#ifndef __ASSEMBLY__
-#include <asm/types.h>
-#include <asm/io.h>
-#endif /* __ASSEMBLY__ */
-
#if defined (CONFIG_FEROCEON_88FR131) || defined (CONFIG_SHEEVA_88SV131)
-#include <asm/arch/cpu.h>
/* SOC specific definations */
#define INTREG_BASE 0xd0000000
diff --git a/board/Marvell/guruplug/guruplug.c b/board/Marvell/guruplug/guruplug.c
index 1f0e67a..057c558 100644
--- a/board/Marvell/guruplug/guruplug.c
+++ b/board/Marvell/guruplug/guruplug.c
@@ -24,6 +24,7 @@
#include <common.h>
#include <miiphy.h>
+#include <asm/arch/cpu.h>
#include <asm/arch/kirkwood.h>
#include <asm/arch/mpp.h>
#include "guruplug.h"
diff --git a/board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c b/board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c
index 80fd20b..4c41f3b 100644
--- a/board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c
+++ b/board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c
@@ -26,6 +26,7 @@
#include <common.h>
#include <netdev.h>
+#include <asm/arch/cpu.h>
#include <asm/arch/kirkwood.h>
#include <asm/arch/mpp.h>
#include "mv88f6281gtw_ge.h"
diff --git a/board/Marvell/openrd/openrd.c b/board/Marvell/openrd/openrd.c
index 87939de..2a10e69 100644
--- a/board/Marvell/openrd/openrd.c
+++ b/board/Marvell/openrd/openrd.c
@@ -29,6 +29,7 @@
#include <common.h>
#include <miiphy.h>
+#include <asm/arch/cpu.h>
#include <asm/arch/kirkwood.h>
#include <asm/arch/mpp.h>
#include "openrd.h"
diff --git a/board/Marvell/rd6281a/rd6281a.c b/board/Marvell/rd6281a/rd6281a.c
index ecdea82..9c768bf 100644
--- a/board/Marvell/rd6281a/rd6281a.c
+++ b/board/Marvell/rd6281a/rd6281a.c
@@ -25,6 +25,7 @@
#include <common.h>
#include <miiphy.h>
#include <netdev.h>
+#include <asm/arch/cpu.h>
#include <asm/arch/kirkwood.h>
#include <asm/arch/mpp.h>
#include "rd6281a.h"
diff --git a/board/Marvell/sheevaplug/sheevaplug.c b/board/Marvell/sheevaplug/sheevaplug.c
index d7dc80c..71e6793 100644
--- a/board/Marvell/sheevaplug/sheevaplug.c
+++ b/board/Marvell/sheevaplug/sheevaplug.c
@@ -24,6 +24,7 @@
#include <common.h>
#include <miiphy.h>
+#include <asm/arch/cpu.h>
#include <asm/arch/kirkwood.h>
#include <asm/arch/mpp.h>
#include "sheevaplug.h"
diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c
index a8f2b23..35dca5f 100644
--- a/board/keymile/km_arm/km_arm.c
+++ b/board/keymile/km_arm/km_arm.c
@@ -34,6 +34,7 @@
#include <netdev.h>
#include <miiphy.h>
#include <asm/io.h>
+#include <asm/arch/cpu.h>
#include <asm/arch/kirkwood.h>
#include <asm/arch/mpp.h>
diff --git a/drivers/gpio/kw_gpio.c b/drivers/gpio/kw_gpio.c
index 56383c2..c86c28f 100644
--- a/drivers/gpio/kw_gpio.c
+++ b/drivers/gpio/kw_gpio.c
@@ -31,6 +31,7 @@
#include <common.h>
#include <asm/bitops.h>
+#include <asm/io.h>
#include <asm/arch/kirkwood.h>
#include <asm/arch/gpio.h>
diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c
index c701f43..c7f7446 100644
--- a/drivers/net/mvgbe.c
+++ b/drivers/net/mvgbe.c
@@ -32,8 +32,10 @@
#include <net.h>
#include <malloc.h>
#include <miiphy.h>
+#include <asm/io.h>
#include <asm/errno.h>
#include <asm/types.h>
+#include <asm/system.h>
#include <asm/byteorder.h>
#if defined(CONFIG_KIRKWOOD)
diff --git a/drivers/spi/kirkwood_spi.c b/drivers/spi/kirkwood_spi.c
index a1c3070..6f502f0 100644
--- a/drivers/spi/kirkwood_spi.c
+++ b/drivers/spi/kirkwood_spi.c
@@ -27,6 +27,7 @@
#include <common.h>
#include <malloc.h>
#include <spi.h>
+#include <asm/io.h>
#include <asm/arch/kirkwood.h>
#include <asm/arch/spi.h>
#include <asm/arch/mpp.h>
diff --git a/drivers/usb/host/ehci-kirkwood.c b/drivers/usb/host/ehci-kirkwood.c
index 5570fc6..6300587 100644
--- a/drivers/usb/host/ehci-kirkwood.c
+++ b/drivers/usb/host/ehci-kirkwood.c
@@ -27,6 +27,7 @@
#include <usb.h>
#include "ehci.h"
#include "ehci-core.h"
+#include <asm/arch/cpu.h>
#include <asm/arch/kirkwood.h>
#define rdl(off) readl(KW_USB20_BASE + (off))
--
1.7.0.4
More information about the U-Boot
mailing list