aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mx31moboard.c
diff options
context:
space:
mode:
authorValentin Longchamp <valentin.longchamp@epfl.ch>2009-02-16 06:47:51 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2009-03-13 05:34:21 -0400
commite00f0b4a9316c9de000697e489f6102271e94dc4 (patch)
treef04e346f019a4a68ff66231fcb2eafdd9428af72 /arch/arm/mach-mx3/mx31moboard.c
parente180a5c26fae12dcc02244df68a6089cd5522df7 (diff)
mx31moboard: initial support for various baseboards
This enables our mx31moboard to be used on the different baseboards that we are developping according to the application needs. There are not many differences between the boards for now, but when other peripherals are available for mx31 the differences are going to grow. v2: takes Sascha's comments into account Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3/mx31moboard.c')
-rw-r--r--arch/arm/mach-mx3/mx31moboard.c39
1 files changed, 22 insertions, 17 deletions
diff --git a/arch/arm/mach-mx3/mx31moboard.c b/arch/arm/mach-mx3/mx31moboard.c
index f29c8782cffb..2d51739e24bf 100644
--- a/arch/arm/mach-mx3/mx31moboard.c
+++ b/arch/arm/mach-mx3/mx31moboard.c
@@ -32,6 +32,7 @@
32#include <mach/common.h> 32#include <mach/common.h>
33#include <mach/imx-uart.h> 33#include <mach/imx-uart.h>
34#include <mach/iomux-mx3.h> 34#include <mach/iomux-mx3.h>
35#include <mach/board-mx31moboard.h>
35 36
36#include "devices.h" 37#include "devices.h"
37 38
@@ -64,24 +65,17 @@ static struct platform_device *devices[] __initdata = {
64}; 65};
65 66
66static int mxc_uart0_pins[] = { 67static int mxc_uart0_pins[] = {
67 MX31_PIN_CTS1__CTS1, 68 MX31_PIN_CTS1__CTS1, MX31_PIN_RTS1__RTS1,
68 MX31_PIN_RTS1__RTS1, 69 MX31_PIN_TXD1__TXD1, MX31_PIN_RXD1__RXD1,
69 MX31_PIN_TXD1__TXD1,
70 MX31_PIN_RXD1__RXD1
71};
72static int mxc_uart1_pins[] = {
73 MX31_PIN_CTS2__CTS2,
74 MX31_PIN_RTS2__RTS2,
75 MX31_PIN_TXD2__TXD2,
76 MX31_PIN_RXD2__RXD2
77}; 70};
78static int mxc_uart4_pins[] = { 71static int mxc_uart4_pins[] = {
79 MX31_PIN_PC_RST__CTS5, 72 MX31_PIN_PC_RST__CTS5, MX31_PIN_PC_VS2__RTS5,
80 MX31_PIN_PC_VS2__RTS5, 73 MX31_PIN_PC_BVD2__TXD5, MX31_PIN_PC_BVD1__RXD5,
81 MX31_PIN_PC_BVD2__TXD5,
82 MX31_PIN_PC_BVD1__RXD5
83}; 74};
84 75
76static int mx31moboard_baseboard;
77core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444);
78
85/* 79/*
86 * Board specific initialization. 80 * Board specific initialization.
87 */ 81 */
@@ -92,11 +86,22 @@ static void __init mxc_board_init(void)
92 mxc_iomux_setup_multiple_pins(mxc_uart0_pins, ARRAY_SIZE(mxc_uart0_pins), "uart0"); 86 mxc_iomux_setup_multiple_pins(mxc_uart0_pins, ARRAY_SIZE(mxc_uart0_pins), "uart0");
93 mxc_register_device(&mxc_uart_device0, &uart_pdata); 87 mxc_register_device(&mxc_uart_device0, &uart_pdata);
94 88
95 mxc_iomux_setup_multiple_pins(mxc_uart1_pins, ARRAY_SIZE(mxc_uart1_pins), "uart1");
96 mxc_register_device(&mxc_uart_device1, &uart_pdata);
97
98 mxc_iomux_setup_multiple_pins(mxc_uart4_pins, ARRAY_SIZE(mxc_uart4_pins), "uart4"); 89 mxc_iomux_setup_multiple_pins(mxc_uart4_pins, ARRAY_SIZE(mxc_uart4_pins), "uart4");
99 mxc_register_device(&mxc_uart_device4, &uart_pdata); 90 mxc_register_device(&mxc_uart_device4, &uart_pdata);
91
92 switch (mx31moboard_baseboard) {
93 case MX31NOBOARD:
94 break;
95 case MX31DEVBOARD:
96 mx31moboard_devboard_init();
97 break;
98 case MX31MARXBOT:
99 mx31moboard_marxbot_init();
100 break;
101 default:
102 printk(KERN_ERR "Illegal mx31moboard_baseboard type %d\n", mx31moboard_baseboard);
103 }
104
100} 105}
101 106
102/* 107/*