diff options
author | Fabio Estevam <fabioestevam@yahoo.com> | 2009-06-02 20:24:16 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-06-03 05:44:50 -0400 |
commit | aefa1c6e7b76fc428770fede6e8b86587fc2ce09 (patch) | |
tree | 6a107cc554caf90ae4f7ae8b1d2da76301c59fec /arch | |
parent | 8d9fb9bb89f44a4a06d0e001b16d983b28d571bc (diff) |
MX35: Add basic support for MX35PDK board
Add basic support for MX35PDK board (www.freescale.com/imx35pdk).
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mx3/Kconfig | 7 | ||||
-rw-r--r-- | arch/arm/mach-mx3/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mx35pdk.c | 104 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/board-mx35pdk.h | 27 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/debug-macro.S | 3 |
5 files changed, 142 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig index 6f17ceb00593..6b318d73e2a3 100644 --- a/arch/arm/mach-mx3/Kconfig +++ b/arch/arm/mach-mx3/Kconfig | |||
@@ -89,4 +89,11 @@ config MACH_ARMADILLO5X0 | |||
89 | Include support for Atmark Armadillo-500 platform. This includes | 89 | Include support for Atmark Armadillo-500 platform. This includes |
90 | specific configurations for the board and its peripherals. | 90 | specific configurations for the board and its peripherals. |
91 | 91 | ||
92 | config MACH_MX35_3DS | ||
93 | bool "Support MX35PDK platform" | ||
94 | select ARCH_MX35 | ||
95 | default n | ||
96 | help | ||
97 | Include support for MX35PDK platform. This includes specific | ||
98 | configurations for the board and its peripherals. | ||
92 | endif | 99 | endif |
diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile index 6c22da2b2be0..0322696bd11a 100644 --- a/arch/arm/mach-mx3/Makefile +++ b/arch/arm/mach-mx3/Makefile | |||
@@ -17,3 +17,4 @@ obj-$(CONFIG_MACH_MX31MOBOARD) += mx31moboard.o mx31moboard-devboard.o \ | |||
17 | obj-$(CONFIG_MACH_QONG) += qong.o | 17 | obj-$(CONFIG_MACH_QONG) += qong.o |
18 | obj-$(CONFIG_MACH_PCM043) += pcm043.o | 18 | obj-$(CONFIG_MACH_PCM043) += pcm043.o |
19 | obj-$(CONFIG_MACH_ARMADILLO5X0) += armadillo5x0.o | 19 | obj-$(CONFIG_MACH_ARMADILLO5X0) += armadillo5x0.o |
20 | obj-$(CONFIG_MACH_MX35_3DS) += mx35pdk.o | ||
diff --git a/arch/arm/mach-mx3/mx35pdk.c b/arch/arm/mach-mx3/mx35pdk.c new file mode 100644 index 000000000000..6d15374414b9 --- /dev/null +++ b/arch/arm/mach-mx3/mx35pdk.c | |||
@@ -0,0 +1,104 @@ | |||
1 | /* | ||
2 | * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * Author: Fabio Estevam <fabio.estevam@freescale.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #include <linux/types.h> | ||
22 | #include <linux/init.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | #include <linux/memory.h> | ||
25 | #include <linux/gpio.h> | ||
26 | |||
27 | #include <asm/mach-types.h> | ||
28 | #include <asm/mach/arch.h> | ||
29 | #include <asm/mach/time.h> | ||
30 | #include <asm/mach/map.h> | ||
31 | |||
32 | #include <mach/hardware.h> | ||
33 | #include <mach/common.h> | ||
34 | #include <mach/imx-uart.h> | ||
35 | #include <mach/iomux-mx35.h> | ||
36 | |||
37 | #include "devices.h" | ||
38 | |||
39 | static struct imxuart_platform_data uart_pdata = { | ||
40 | .flags = IMXUART_HAVE_RTSCTS, | ||
41 | }; | ||
42 | |||
43 | static struct platform_device *devices[] __initdata = { | ||
44 | &mxc_fec_device, | ||
45 | }; | ||
46 | |||
47 | static struct pad_desc mx35pdk_pads[] = { | ||
48 | /* UART1 */ | ||
49 | MX35_PAD_CTS1__UART1_CTS, | ||
50 | MX35_PAD_RTS1__UART1_RTS, | ||
51 | MX35_PAD_TXD1__UART1_TXD_MUX, | ||
52 | MX35_PAD_RXD1__UART1_RXD_MUX, | ||
53 | /* FEC */ | ||
54 | MX35_PAD_FEC_TX_CLK__FEC_TX_CLK, | ||
55 | MX35_PAD_FEC_RX_CLK__FEC_RX_CLK, | ||
56 | MX35_PAD_FEC_RX_DV__FEC_RX_DV, | ||
57 | MX35_PAD_FEC_COL__FEC_COL, | ||
58 | MX35_PAD_FEC_RDATA0__FEC_RDATA_0, | ||
59 | MX35_PAD_FEC_TDATA0__FEC_TDATA_0, | ||
60 | MX35_PAD_FEC_TX_EN__FEC_TX_EN, | ||
61 | MX35_PAD_FEC_MDC__FEC_MDC, | ||
62 | MX35_PAD_FEC_MDIO__FEC_MDIO, | ||
63 | MX35_PAD_FEC_TX_ERR__FEC_TX_ERR, | ||
64 | MX35_PAD_FEC_RX_ERR__FEC_RX_ERR, | ||
65 | MX35_PAD_FEC_CRS__FEC_CRS, | ||
66 | MX35_PAD_FEC_RDATA1__FEC_RDATA_1, | ||
67 | MX35_PAD_FEC_TDATA1__FEC_TDATA_1, | ||
68 | MX35_PAD_FEC_RDATA2__FEC_RDATA_2, | ||
69 | MX35_PAD_FEC_TDATA2__FEC_TDATA_2, | ||
70 | MX35_PAD_FEC_RDATA3__FEC_RDATA_3, | ||
71 | MX35_PAD_FEC_TDATA3__FEC_TDATA_3, | ||
72 | }; | ||
73 | |||
74 | /* | ||
75 | * Board specific initialization. | ||
76 | */ | ||
77 | static void __init mxc_board_init(void) | ||
78 | { | ||
79 | mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); | ||
80 | |||
81 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
82 | |||
83 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | ||
84 | } | ||
85 | |||
86 | static void __init mx35pdk_timer_init(void) | ||
87 | { | ||
88 | mx35_clocks_init(); | ||
89 | } | ||
90 | |||
91 | struct sys_timer mx35pdk_timer = { | ||
92 | .init = mx35pdk_timer_init, | ||
93 | }; | ||
94 | |||
95 | MACHINE_START(MX35_3DS, "Freescale MX35PDK") | ||
96 | /* Maintainer: Freescale Semiconductor, Inc */ | ||
97 | .phys_io = AIPS1_BASE_ADDR, | ||
98 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
99 | .boot_params = PHYS_OFFSET + 0x100, | ||
100 | .map_io = mx35_map_io, | ||
101 | .init_irq = mxc_init_irq, | ||
102 | .init_machine = mxc_board_init, | ||
103 | .timer = &mx35pdk_timer, | ||
104 | MACHINE_END | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-mx35pdk.h b/arch/arm/plat-mxc/include/mach/board-mx35pdk.h new file mode 100644 index 000000000000..1111037d6d9d --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/board-mx35pdk.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_ARCH_MXC_BOARD_MX35PDK_H__ | ||
20 | #define __ASM_ARCH_MXC_BOARD_MX35PDK_H__ | ||
21 | |||
22 | /* mandatory for CONFIG_DEBUG_LL */ | ||
23 | |||
24 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR | ||
25 | #define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) | ||
26 | |||
27 | #endif /* __ASM_ARCH_MXC_BOARD_MX35PDK_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S index 57d3e3fccc6d..e280978eef60 100644 --- a/arch/arm/plat-mxc/include/mach/debug-macro.S +++ b/arch/arm/plat-mxc/include/mach/debug-macro.S | |||
@@ -46,6 +46,9 @@ | |||
46 | #ifdef CONFIG_MACH_ARMADILLO5X0 | 46 | #ifdef CONFIG_MACH_ARMADILLO5X0 |
47 | #include <mach/board-armadillo5x0.h> | 47 | #include <mach/board-armadillo5x0.h> |
48 | #endif | 48 | #endif |
49 | #ifdef CONFIG_MACH_MX35_3DS | ||
50 | #include <mach/board-mx35pdk.h> | ||
51 | #endif | ||
49 | .macro addruart,rx | 52 | .macro addruart,rx |
50 | mrc p15, 0, \rx, c1, c0 | 53 | mrc p15, 0, \rx, c1, c0 |
51 | tst \rx, #1 @ MMU enabled? | 54 | tst \rx, #1 @ MMU enabled? |