aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2008-11-12 09:38:39 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2008-12-16 08:57:57 -0500
commit1553a1ec833ddda51d57f66f8e00904b64b954c8 (patch)
treeb91a105261daa7c29b6a62092c93a4ba2d8c0ea3 /arch/arm
parent3dad21a95ba7a4159383dd170c3b0b5fedd0f5e2 (diff)
Add basic support for MX31PDK board.
Add basic support to the MX31PDK development board, also known as MX31 3DS or MX31 3-stack board (http://www.freescale.com/imx31pdk). Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-mx3/Kconfig7
-rw-r--r--arch/arm/mach-mx3/Makefile1
-rw-r--r--arch/arm/mach-mx3/mx31pdk.c115
-rw-r--r--arch/arm/plat-mxc/include/mach/board-mx31pdk.h19
-rw-r--r--arch/arm/plat-mxc/include/mach/debug-macro.S3
5 files changed, 145 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
index db9431dee1b..dc96ddedc2f 100644
--- a/arch/arm/mach-mx3/Kconfig
+++ b/arch/arm/mach-mx3/Kconfig
@@ -21,5 +21,12 @@ config MACH_MX31LITE
21 Include support for MX31 LITEKIT platform. This includes specific 21 Include support for MX31 LITEKIT platform. This includes specific
22 configurations for the board and its peripherals. 22 configurations for the board and its peripherals.
23 23
24config MACH_MX31_3DS
25 bool "Support MX31PDK (3DS)"
26 default n
27 help
28 Include support for MX31PDK (3DS) platform. This includes specific
29 configurations for the board and its peripherals.
30
24endmenu 31endmenu
25 32
diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile
index 8b21abb71fb..10a0886b32c 100644
--- a/arch/arm/mach-mx3/Makefile
+++ b/arch/arm/mach-mx3/Makefile
@@ -8,3 +8,4 @@ obj-y := mm.o clock.o devices.o iomux.o
8obj-$(CONFIG_MACH_MX31ADS) += mx31ads.o 8obj-$(CONFIG_MACH_MX31ADS) += mx31ads.o
9obj-$(CONFIG_MACH_MX31LITE) += mx31lite.o 9obj-$(CONFIG_MACH_MX31LITE) += mx31lite.o
10obj-$(CONFIG_MACH_PCM037) += pcm037.o 10obj-$(CONFIG_MACH_PCM037) += pcm037.o
11obj-$(CONFIG_MACH_MX31_3DS) += mx31pdk.o
diff --git a/arch/arm/mach-mx3/mx31pdk.c b/arch/arm/mach-mx3/mx31pdk.c
new file mode 100644
index 00000000000..d464d068a4a
--- /dev/null
+++ b/arch/arm/mach-mx3/mx31pdk.c
@@ -0,0 +1,115 @@
1/*
2 * Copyright 2008 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#include <linux/types.h>
20#include <linux/init.h>
21#include <linux/clk.h>
22#include <linux/irq.h>
23
24#include <mach/hardware.h>
25#include <asm/mach-types.h>
26#include <asm/mach/arch.h>
27#include <asm/mach/time.h>
28#include <asm/memory.h>
29#include <asm/mach/map.h>
30#include <mach/common.h>
31#include <mach/board-mx31pdk.h>
32#include <mach/imx-uart.h>
33#include <mach/iomux-mx3.h>
34#include "devices.h"
35
36/*!
37 * @file mx31pdk.c
38 *
39 * @brief This file contains the board-specific initialization routines.
40 *
41 * @ingroup System
42 */
43
44static struct imxuart_platform_data uart_pdata = {
45 .flags = IMXUART_HAVE_RTSCTS,
46};
47
48static inline void mxc_init_imx_uart(void)
49{
50 mxc_iomux_mode(MX31_PIN_CTS1__CTS1);
51 mxc_iomux_mode(MX31_PIN_RTS1__RTS1);
52 mxc_iomux_mode(MX31_PIN_TXD1__TXD1);
53 mxc_iomux_mode(MX31_PIN_RXD1__RXD1);
54
55 mxc_register_device(&mxc_uart_device0, &uart_pdata);
56}
57
58/*!
59 * This structure defines static mappings for the i.MX31PDK board.
60 */
61static struct map_desc mx31pdk_io_desc[] __initdata = {
62 {
63 .virtual = AIPS1_BASE_ADDR_VIRT,
64 .pfn = __phys_to_pfn(AIPS1_BASE_ADDR),
65 .length = AIPS1_SIZE,
66 .type = MT_DEVICE_NONSHARED
67 }, {
68 .virtual = AIPS2_BASE_ADDR_VIRT,
69 .pfn = __phys_to_pfn(AIPS2_BASE_ADDR),
70 .length = AIPS2_SIZE,
71 .type = MT_DEVICE_NONSHARED
72 },
73};
74
75/*!
76 * Set up static virtual mappings.
77 */
78static void __init mx31pdk_map_io(void)
79{
80 mxc_map_io();
81 iotable_init(mx31pdk_io_desc, ARRAY_SIZE(mx31pdk_io_desc));
82}
83
84/*!
85 * Board specific initialization.
86 */
87static void __init mxc_board_init(void)
88{
89 mxc_init_imx_uart();
90}
91
92static void __init mx31pdk_timer_init(void)
93{
94 mxc_clocks_init(26000000);
95 mxc_timer_init("ipg_clk.0");
96}
97
98static struct sys_timer mx31pdk_timer = {
99 .init = mx31pdk_timer_init,
100};
101
102/*
103 * The following uses standard kernel macros defined in arch.h in order to
104 * initialize __mach_desc_MX31PDK data structure.
105 */
106MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
107 /* Maintainer: Freescale Semiconductor, Inc. */
108 .phys_io = AIPS1_BASE_ADDR,
109 .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
110 .boot_params = PHYS_OFFSET + 0x100,
111 .map_io = mx31pdk_map_io,
112 .init_irq = mxc_init_irq,
113 .init_machine = mxc_board_init,
114 .timer = &mx31pdk_timer,
115MACHINE_END
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31pdk.h b/arch/arm/plat-mxc/include/mach/board-mx31pdk.h
new file mode 100644
index 00000000000..2b6b316d0f5
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/board-mx31pdk.h
@@ -0,0 +1,19 @@
1/*
2 * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved.
3 */
4
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 version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_MXC_BOARD_MX31PDK_H__
12#define __ASM_ARCH_MXC_BOARD_MX31PDK_H__
13
14/* mandatory for CONFIG_LL_DEBUG */
15
16#define MXC_LL_UART_PADDR UART1_BASE_ADDR
17#define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR)
18
19#endif /* __ASM_ARCH_MXC_BOARD_MX31PDK_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S
index b9907bebba3..602768b427e 100644
--- a/arch/arm/plat-mxc/include/mach/debug-macro.S
+++ b/arch/arm/plat-mxc/include/mach/debug-macro.S
@@ -28,6 +28,9 @@
28#ifdef CONFIG_MACH_PCM038 28#ifdef CONFIG_MACH_PCM038
29#include <mach/board-pcm038.h> 29#include <mach/board-pcm038.h>
30#endif 30#endif
31#ifdef CONFIG_MACH_MX31_3DS
32#include <mach/board-mx31pdk.h>
33#endif
31 .macro addruart,rx 34 .macro addruart,rx
32 mrc p15, 0, \rx, c1, c0 35 mrc p15, 0, \rx, c1, c0
33 tst \rx, #1 @ MMU enabled? 36 tst \rx, #1 @ MMU enabled?