summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2011-03-14 15:43:56 +0100
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2011-04-27 19:38:05 +0200
commit862711154339be2af723adcbde217743de781e81 (patch)
treec777613bd01078e4463b421929467a92b6daf73c /drivers
parentdcd441c32560a823019c720fb034ff425efbc376 (diff)
downloadu-boot-imx-862711154339be2af723adcbde217743de781e81.zip
u-boot-imx-862711154339be2af723adcbde217743de781e81.tar.gz
u-boot-imx-862711154339be2af723adcbde217743de781e81.tar.bz2
IMX: MX31: Cleanup include files and drop nasty #ifdef in drivers
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpio/mxc_gpio.c5
-rw-r--r--drivers/i2c/mxc_i2c.c7
-rw-r--r--drivers/serial/serial_mxc.c4
-rw-r--r--drivers/spi/mxc_spi.c9
-rw-r--r--drivers/usb/host/ehci-mxc.c2
-rw-r--r--drivers/video/mx3fb.c6
6 files changed, 7 insertions, 26 deletions
diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
index 53a0673..1037862 100644
--- a/drivers/gpio/mxc_gpio.c
+++ b/drivers/gpio/mxc_gpio.c
@@ -21,12 +21,7 @@
* 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>
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index c5ec486..89d1973 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -27,13 +27,8 @@
#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
diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index b9cf9de..dcb4bd1 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -19,12 +19,8 @@
#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)))
diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index 6474eb8..f909e07 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -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)
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
index 8d7b380..6af35ab 100644
--- a/drivers/usb/host/ehci-mxc.c
+++ b/drivers/usb/host/ehci-mxc.c
@@ -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>
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c
index 6dd952c..0c925a0 100644
--- a/drivers/video/mx3fb.c
+++ b/drivers/video/mx3fb.c
@@ -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)