]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
IMX: MX31: Cleanup include files and drop nasty #ifdef in drivers
authorStefano Babic <sbabic@denx.de>
Mon, 14 Mar 2011 14:43:56 +0000 (15:43 +0100)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Wed, 27 Apr 2011 17:38:05 +0000 (19:38 +0200)
As exception among the i.MX processors, the i.MX31 has headers
without general names (mx31-regs.h, mx31.h instead of imx-regs.h and
clock.h). This requires several nasty #ifdef in the drivers to
include the correct header. The patch cleans up the driver and
renames the header files as for the other i.MX processors.

Signed-off-by: Stefano Babic <sbabic@denx.de>
27 files changed:
arch/arm/cpu/arm1136/mx31/devices.c
arch/arm/cpu/arm1136/mx31/generic.c
arch/arm/cpu/arm1136/mx31/timer.c
arch/arm/include/asm/arch-mx31/clock.h [moved from arch/arm/include/asm/arch-mx31/mx31.h with 92% similarity]
arch/arm/include/asm/arch-mx31/imx-regs.h [moved from arch/arm/include/asm/arch-mx31/mx31-regs.h with 100% similarity]
board/davedenx/qong/fpga.c
board/davedenx/qong/lowlevel_init.S
board/davedenx/qong/qong.c
board/freescale/mx31ads/lowlevel_init.S
board/freescale/mx31ads/mx31ads.c
board/freescale/mx31pdk/lowlevel_init.S
board/freescale/mx31pdk/mx31pdk.c
board/imx31_phycore/imx31_phycore.c
board/imx31_phycore/lowlevel_init.S
board/logicpd/imx31_litekit/imx31_litekit.c
board/logicpd/imx31_litekit/lowlevel_init.S
drivers/gpio/mxc_gpio.c
drivers/i2c/mxc_i2c.c
drivers/serial/serial_mxc.c
drivers/spi/mxc_spi.c
drivers/usb/host/ehci-mxc.c
drivers/video/mx3fb.c
include/configs/imx31_litekit.h
include/configs/mx31ads.h
include/configs/mx31pdk.h
include/configs/qong.h
nand_spl/nand_boot_fsl_nfc.c

index 1f4ca7eb44336ea5a3ba1f8665e41265c29ab06b..1e7d48f8fb440928d0d6ec24e7a936676e826c81 100644 (file)
@@ -24,8 +24,8 @@
  */
 
 #include <common.h>
-#include <asm/arch/mx31-regs.h>
-#include <asm/arch/mx31.h>
+#include <asm/arch/imx-regs.h>
+#include <asm/arch/clock.h>
 
 #ifdef CONFIG_SYS_MX31_UART1
 void mx31_uart1_hw_init(void)
index 8bd23ee870573c95d829ddd4e7f5cf98069bed04..fa07fec60d8744e5e3770281419af8a5fa5a5c89 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include <common.h>
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/imx-regs.h>
 #include <asm/io.h>
 
 static u32 mx31_decode_pll(u32 reg, u32 infreq)
index 27c340fd9e6d3fd5e95dac097924ad8028d021b1..c4bc3b35210fe5d1c1c8d6cc504c936fb225b0d0 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include <common.h>
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/imx-regs.h>
 #include <div64.h>
 #include <watchdog.h>
 #include <asm/io.h>
similarity index 92%
rename from arch/arm/include/asm/arch-mx31/mx31.h
rename to arch/arm/include/asm/arch-mx31/clock.h
index a755212f0d062b6b1fcb2644e91ce3acdcf37551..8dc6e82bc6787a221b27396aaf90a3cab74dd7c9 100644 (file)
@@ -21,8 +21,8 @@
  * MA 02111-1307 USA
  */
 
-#ifndef __ASM_ARCH_MX31_H
-#define __ASM_ARCH_MX31_H
+#ifndef __ASM_ARCH_CLOCK_H
+#define __ASM_ARCH_CLOCK_H
 
 extern u32 mx31_get_ipg_clk(void);
 #define imx_get_uartclk mx31_get_ipg_clk
@@ -32,4 +32,4 @@ extern void mx31_set_pad(enum iomux_pins pin, u32 config);
 void mx31_uart1_hw_init(void);
 void mx31_spi2_hw_init(void);
 
-#endif /* __ASM_ARCH_MX31_H */
+#endif /* __ASM_ARCH_CLOCK_H */
index 656d5cde95a4933b81bbbbcd1eee962a92118abf..789acf0696563a78509959e63f66afc0661ec03c 100644 (file)
@@ -23,8 +23,8 @@
  */
 
 #include <common.h>
-#include <asm/arch/mx31.h>
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/clock.h>
+#include <asm/arch/imx-regs.h>
 #include <mxc_gpio.h>
 #include <fpga.h>
 #include <lattice.h>
index 80bed923292654cddc442c3be794f4cbbae5ea16..85fbfc36467bf9ffea276b4b28f94cc83d8f52bc 100644 (file)
@@ -20,7 +20,7 @@
  * MA 02111-1307 USA
  */
 
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/imx-regs.h>
 
 .macro REG reg, val
        ldr r2, =\reg
index 3ace6cdfff54878a5792da9bfec3477fe72b3450..b1238d505ab844e691229e886e64bfb1e5702cd7 100644 (file)
@@ -23,8 +23,8 @@
 
 #include <common.h>
 #include <netdev.h>
-#include <asm/arch/mx31.h>
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/clock.h>
+#include <asm/arch/imx-regs.h>
 #include <asm/io.h>
 #include <nand.h>
 #include <fsl_pmic.h>
index e16605836be00c538c90ef4a34682d751615b456..5c18bc19648a9bb038415bf2b78e6ecb95894eb7 100644 (file)
@@ -17,7 +17,7 @@
  * MA 02111-1307 USA
  */
 
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/imx-regs.h>
 
 .macro REG reg, val
        ldr r2, =\reg
index bc25c6deb5cb8c04b6b07c5d15f5935eaa843cf3..a298e0530f52b4707d9c39f11bc131bcf4fc0fd0 100644 (file)
@@ -23,8 +23,8 @@
 #include <common.h>
 #include <netdev.h>
 #include <asm/io.h>
-#include <asm/arch/mx31.h>
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/clock.h>
+#include <asm/arch/imx-regs.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index cd0503ec3a56e0f53be09fd3424d514b973ae297..5b35bb47620217eead027678a598fcbf208c94b1 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 #include <config.h>
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/imx-regs.h>
 #include <asm/macro.h>
 
 .globl lowlevel_init
index a9f0fb477a48dac668cee1d700070118e41eb1fc..3f291fc84ff451739bcdf8b917173887dc816794 100644 (file)
@@ -26,8 +26,8 @@
 
 #include <common.h>
 #include <netdev.h>
-#include <asm/arch/mx31.h>
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/clock.h>
+#include <asm/arch/imx-regs.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index 3d7b7f70ce6e323f982b09d0cec4942babd0bfca..82daaa3245cf60d49128f8e9826a4f6ac53f2828 100644 (file)
@@ -25,8 +25,8 @@
 #include <common.h>
 #include <s6e63d6.h>
 #include <netdev.h>
-#include <asm/arch/mx31.h>
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/clock.h>
+#include <asm/arch/imx-regs.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index c5d6eb05fe20bfae98206385c238549070a56bb3..c47137d097a3ac632b94fdfb87dafe364dea1457 100644 (file)
@@ -21,7 +21,7 @@
  * MA 02111-1307 USA
  */
 
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/imx-regs.h>
 
 .macro REG reg, val
        ldr r2, =\reg
index a07ba0efc7ed5f65c8eb6c1fae3b0e2f74cba489..2ed742fb56bf2cd94ed64ccb9ff81b88e83ad1a7 100644 (file)
@@ -24,8 +24,8 @@
 
 #include <common.h>
 #include <netdev.h>
-#include <asm/arch/mx31.h>
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/clock.h>
+#include <asm/arch/imx-regs.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index 0003a4242464afec9e892b41b86cf270238f2718..95b0c080c5d1cd4f45643dd64b01bcbd9d41db86 100644 (file)
@@ -21,7 +21,7 @@
  * MA 02111-1307 USA
  */
 
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/imx-regs.h>
 
 .macro REG reg, val
        ldr r2, =\reg
index 53a06734147f39881d6c29a9132aab2060e14003..103786209cfa972b7b17f41285b3070bf04d696c 100644 (file)
  * MA 02111-1307 USA
  */
 #include <common.h>
-#ifdef CONFIG_MX31
-#include <asm/arch/mx31-regs.h>
-#endif
-#if defined(CONFIG_MX51) || defined(CONFIG_MX53)
 #include <asm/arch/imx-regs.h>
-#endif
 #include <asm/io.h>
 #include <mxc_gpio.h>
 
index c5ec486a7b8a8eb912b0480125d2aedb57fed1f6..89d1973bf5e7ab3e55c58f4d18a5c12760062587 100644 (file)
 
 #if defined(CONFIG_HARD_I2C)
 
-#if defined(CONFIG_MX31)
-#include <asm/arch/mx31.h>
-#include <asm/arch/mx31-regs.h>
-#else
-#include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
-#endif
+#include <asm/arch/imx-regs.h>
 
 #define IADR   0x00
 #define IFDR   0x04
index b9cf9de740b8854d8093e42c2183c2d7ff829f5f..dcb4bd16d812fc6a5155431c8a2fba0c037d7060 100644 (file)
 
 #include <common.h>
 #include <watchdog.h>
-#ifdef CONFIG_MX31
-#include <asm/arch/mx31.h>
-#else
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
-#endif
 
 #define __REG(x)     (*((volatile u32 *)(x)))
 
index 6474eb802d694d3db0f42023a9200ccd90cbcd91..f909e076ea5eac35bd9a0baaee9856a4a9bafaa1 100644 (file)
@@ -24,6 +24,8 @@
 #include <asm/errno.h>
 #include <asm/io.h>
 #include <mxc_gpio.h>
+#include <asm/arch/imx-regs.h>
+#include <asm/arch/clock.h>
 
 #ifdef CONFIG_MX27
 /* i.MX27 has a completely wrong register layout and register definitions in the
@@ -34,8 +36,6 @@
 
 #elif defined(CONFIG_MX31)
 
-#include <asm/arch/mx31.h>
-
 #define MXC_CSPICTRL_EN                (1 << 0)
 #define MXC_CSPICTRL_MODE      (1 << 1)
 #define MXC_CSPICTRL_XCH       (1 << 2)
@@ -63,8 +63,6 @@ static unsigned long spi_bases[] = {
 #define mxc_get_clock(x)       mx31_get_ipg_clk()
 
 #elif defined(CONFIG_MX51)
-#include <asm/arch/imx-regs.h>
-#include <asm/arch/clock.h>
 
 #define MXC_CSPICTRL_EN                (1 << 0)
 #define MXC_CSPICTRL_MODE      (1 << 1)
@@ -97,9 +95,6 @@ static unsigned long spi_bases[] = {
 
 #elif defined(CONFIG_MX35)
 
-#include <asm/arch/imx-regs.h>
-#include <asm/arch/clock.h>
-
 #define MXC_CSPICTRL_EN                (1 << 0)
 #define MXC_CSPICTRL_MODE      (1 << 1)
 #define MXC_CSPICTRL_XCH       (1 << 2)
index 8d7b3804fab4d91d2c7bc864ba4d484bed9215bc..6af35aba5f60a439f00f86e13598af7b8372c648 100644 (file)
@@ -20,7 +20,7 @@
 #include <common.h>
 #include <usb.h>
 #include <asm/io.h>
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/imx-regs.h>
 #include <usb/ehci-fsl.h>
 #include <errno.h>
 
index 6dd952cbbeaffddf6480a813adb0a7625f7712a3..0c925a03f39c423d07344fbafda3d2ba7cc22ce0 100644 (file)
@@ -22,8 +22,8 @@
  */
 #include <common.h>
 #include <lcd.h>
-#include <asm/arch/mx31.h>
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/clock.h>
+#include <asm/arch/imx-regs.h>
 #include <asm/errno.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -192,7 +192,7 @@ enum ipu_panel {
 };
 
 /* IPU Common registers */
-/* IPU_CONF and its bits already defined in mx31-regs.h */
+/* IPU_CONF and its bits already defined in imx-regs.h */
 #define IPU_CHA_BUF0_RDY       (0x04 + IPU_BASE)
 #define IPU_CHA_BUF1_RDY       (0x08 + IPU_BASE)
 #define IPU_CHA_DB_MODE_SEL    (0x0C + IPU_BASE)
index 50236380704236b079baef9f4fdd1689b22a1c11..9405f562c4b34a78dc234fca76147972e9cd88b9 100644 (file)
@@ -28,7 +28,7 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/imx-regs.h>
 
  /* High Level Configuration Options */
 #define CONFIG_ARM1136         1    /* This is an arm1136 CPU core */
index d2798e974bf07b83ab316d7380668e10f44b76f7..5ea59b4ab7a79299322f72066c251710d62681dc 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/imx-regs.h>
 
  /* High Level Configuration Options */
 #define CONFIG_ARM1136         1               /* This is an arm1136 CPU core */
index 86c758f2ae76a81268e1f891cbfb6e3372281487..d4c6d16102f19a1c18a4605b5799e9cd9ec949b4 100644 (file)
@@ -30,7 +30,7 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/imx-regs.h>
 
 /* High Level Configuration Options */
 #define CONFIG_ARM1136         1       /* This is an arm1136 CPU core */
index 299db5eef97e8919dfc79111f2847ad70f2abbfc..c61a689e576fbe48c522f05c105b3fd68f1089b2 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#include <asm/arch/mx31-regs.h>
+#include <asm/arch/imx-regs.h>
 
  /* High Level Configuration Options */
 #define CONFIG_ARM1136         1       /* This is an arm1136 CPU core */
index a3f0f6ba51add514801f9ed84f33fac484258f50..d6b0d9b6d10502c7d570c360a14fc7a015308329 100644 (file)
 
 #include <common.h>
 #include <nand.h>
-#ifdef CONFIG_MX31
-#include <asm/arch/mx31-regs.h>
-#else
 #include <asm/arch/imx-regs.h>
-#endif
 #include <asm/io.h>
 #include <fsl_nfc.h>