summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mx31lite.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2009-11-19 12:02:06 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2009-11-19 17:11:01 +0100
commitb7d91a62cb402a3d24a15dca9d2b0c309c4227b4 (patch)
tree835bde38de5f8af81d94a0c8c6afdfdc8baf896c /arch/arm/mach-mx3/mx31lite.c
parentimx: copy constants from mx3x.h to mx35.h using the appropriate namespace (diff)
downloadlinux-b7d91a62cb402a3d24a15dca9d2b0c309c4227b4.tar.xz
linux-b7d91a62cb402a3d24a15dca9d2b0c309c4227b4.zip
ARM: MX3: modularize 'mx31lite' code
This commit splits the support code for LogicPD's mx31lite hardware into module and board specific parts. This introduces a new mandatory coreparam called 'mx31lite_baseboard' which specifies the base board support to use. For now, only the LiteKit development board is supported, and developers of own boards are encouraged to use that as reference. The UART support moved to the board code. Some comments were amended along the way. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3/mx31lite.c')
-rw-r--r--arch/arm/mach-mx3/mx31lite.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/arch/arm/mach-mx3/mx31lite.c b/arch/arm/mach-mx3/mx31lite.c
index a8d57decdfdb..dc993a878161 100644
--- a/arch/arm/mach-mx3/mx31lite.c
+++ b/arch/arm/mach-mx3/mx31lite.c
@@ -42,23 +42,14 @@
#include "devices.h"
/*
- * This file contains the board-specific initialization routines.
+ * This file contains the module-specific initialization routines.
*/
static unsigned int mx31lite_pins[] = {
- /* UART1 */
- MX31_PIN_CTS1__CTS1,
- MX31_PIN_RTS1__RTS1,
- MX31_PIN_TXD1__TXD1,
- MX31_PIN_RXD1__RXD1,
/* LAN9117 IRQ pin */
IOMUX_MODE(MX31_PIN_SFS6, IOMUX_CONFIG_GPIO),
};
-static struct imxuart_platform_data uart_pdata = {
- .flags = IMXUART_HAVE_RTSCTS,
-};
-
static struct mxc_nand_platform_data mx31lite_nand_board_info = {
.width = 1,
.hw_ecc = 1,
@@ -118,17 +109,27 @@ void __init mx31lite_map_io(void)
iotable_init(mx31lite_io_desc, ARRAY_SIZE(mx31lite_io_desc));
}
-/*
- * Board specific initialization.
- */
+static int mx31lite_baseboard;
+core_param(mx31lite_baseboard, mx31lite_baseboard, int, 0444);
+
static void __init mxc_board_init(void)
{
int ret;
+ switch (mx31lite_baseboard) {
+ case MX31LITE_NOBOARD:
+ break;
+ case MX31LITE_DB:
+ mx31lite_db_init();
+ break;
+ default:
+ printk(KERN_ERR "Illegal mx31lite_baseboard type %d\n",
+ mx31lite_baseboard);
+ }
+
mxc_iomux_setup_multiple_pins(mx31lite_pins, ARRAY_SIZE(mx31lite_pins),
"mx31lite");
- mxc_register_device(&mxc_uart_device0, &uart_pdata);
mxc_register_device(&mxc_nand_device, &mx31lite_nand_board_info);
/* SMSC9117 IRQ pin */
@@ -150,12 +151,7 @@ struct sys_timer mx31lite_timer = {
.init = mx31lite_timer_init,
};
-/*
- * The following uses standard kernel macros defined in arch.h in order to
- * initialize __mach_desc_MX31LITE data structure.
- */
-
-MACHINE_START(MX31LITE, "LogicPD MX31 LITEKIT")
+MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM")
/* Maintainer: Freescale Semiconductor, Inc. */
.phys_io = AIPS1_BASE_ADDR,
.io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,