diff options
| -rw-r--r-- | arch/arm/mach-mx5/Kconfig | 6 | ||||
| -rw-r--r-- | arch/arm/mach-mx5/Makefile | 2 | ||||
| -rw-r--r-- | arch/arm/mach-mx5/board-mx51_3ds.c | 103 |
3 files changed, 110 insertions, 1 deletions
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig index 1576d51e676c..6ef34289382b 100644 --- a/arch/arm/mach-mx5/Kconfig +++ b/arch/arm/mach-mx5/Kconfig | |||
| @@ -15,4 +15,10 @@ config MACH_MX51_BABBAGE | |||
| 15 | u-boot. This includes specific configurations for the board and its | 15 | u-boot. This includes specific configurations for the board and its |
| 16 | peripherals. | 16 | peripherals. |
| 17 | 17 | ||
| 18 | config MACH_MX51_3DS | ||
| 19 | bool "Support MX51PDK (3DS)" | ||
| 20 | select MXC_DEBUG_BOARD | ||
| 21 | help | ||
| 22 | Include support for MX51PDK (3DS) platform. This includes specific | ||
| 23 | configurations for the board and its peripherals. | ||
| 18 | endif | 24 | endif |
diff --git a/arch/arm/mach-mx5/Makefile b/arch/arm/mach-mx5/Makefile index bf23f869ef51..c757c592bb02 100644 --- a/arch/arm/mach-mx5/Makefile +++ b/arch/arm/mach-mx5/Makefile | |||
| @@ -6,4 +6,4 @@ | |||
| 6 | obj-y := cpu.o mm.o clock-mx51.o devices.o | 6 | obj-y := cpu.o mm.o clock-mx51.o devices.o |
| 7 | 7 | ||
| 8 | obj-$(CONFIG_MACH_MX51_BABBAGE) += board-mx51_babbage.o | 8 | obj-$(CONFIG_MACH_MX51_BABBAGE) += board-mx51_babbage.o |
| 9 | 9 | obj-$(CONFIG_MACH_MX51_3DS) += board-mx51_3ds.o | |
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c new file mode 100644 index 000000000000..f6a338c3345b --- /dev/null +++ b/arch/arm/mach-mx5/board-mx51_3ds.c | |||
| @@ -0,0 +1,103 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 3 | * Copyright (C) 2010 Jason Wang <jason77.wang@gmail.com> | ||
| 4 | * | ||
| 5 | * The code contained herein is licensed under the GNU General Public | ||
| 6 | * License. You may obtain a copy of the GNU General Public License | ||
| 7 | * Version 2 or later at the following locations: | ||
| 8 | * | ||
| 9 | * http://www.opensource.org/licenses/gpl-license.html | ||
| 10 | * http://www.gnu.org/copyleft/gpl.html | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include <linux/irq.h> | ||
| 14 | #include <linux/platform_device.h> | ||
| 15 | |||
| 16 | #include <asm/mach-types.h> | ||
| 17 | #include <asm/mach/arch.h> | ||
| 18 | #include <asm/mach/time.h> | ||
| 19 | |||
| 20 | #include <mach/hardware.h> | ||
| 21 | #include <mach/common.h> | ||
| 22 | #include <mach/iomux-mx51.h> | ||
| 23 | #include <mach/imx-uart.h> | ||
| 24 | #include <mach/3ds_debugboard.h> | ||
| 25 | |||
| 26 | #include "devices.h" | ||
| 27 | |||
| 28 | #define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTA + 6) | ||
| 29 | |||
| 30 | static struct pad_desc mx51_3ds_pads[] = { | ||
| 31 | /* UART1 */ | ||
| 32 | MX51_PAD_UART1_RXD__UART1_RXD, | ||
| 33 | MX51_PAD_UART1_TXD__UART1_TXD, | ||
| 34 | MX51_PAD_UART1_RTS__UART1_RTS, | ||
| 35 | MX51_PAD_UART1_CTS__UART1_CTS, | ||
| 36 | |||
| 37 | /* UART2 */ | ||
| 38 | MX51_PAD_UART2_RXD__UART2_RXD, | ||
| 39 | MX51_PAD_UART2_TXD__UART2_TXD, | ||
| 40 | MX51_PAD_EIM_D25__UART2_CTS, | ||
| 41 | MX51_PAD_EIM_D26__UART2_RTS, | ||
| 42 | |||
| 43 | /* UART3 */ | ||
| 44 | MX51_PAD_UART3_RXD__UART3_RXD, | ||
| 45 | MX51_PAD_UART3_TXD__UART3_TXD, | ||
| 46 | MX51_PAD_EIM_D24__UART3_CTS, | ||
| 47 | MX51_PAD_EIM_D27__UART3_RTS, | ||
| 48 | |||
| 49 | /* CPLD PARENT IRQ PIN */ | ||
| 50 | MX51_PAD_GPIO_1_6__GPIO_1_6, | ||
| 51 | }; | ||
| 52 | |||
| 53 | /* Serial ports */ | ||
| 54 | #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) | ||
| 55 | static struct imxuart_platform_data uart_pdata = { | ||
| 56 | .flags = IMXUART_HAVE_RTSCTS, | ||
| 57 | }; | ||
| 58 | |||
| 59 | static inline void mxc_init_imx_uart(void) | ||
| 60 | { | ||
| 61 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | ||
| 62 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | ||
| 63 | mxc_register_device(&mxc_uart_device2, &uart_pdata); | ||
| 64 | } | ||
| 65 | #else /* !SERIAL_IMX */ | ||
| 66 | static inline void mxc_init_imx_uart(void) | ||
| 67 | { | ||
| 68 | } | ||
| 69 | #endif /* SERIAL_IMX */ | ||
| 70 | |||
| 71 | /* | ||
| 72 | * Board specific initialization. | ||
| 73 | */ | ||
| 74 | static void __init mxc_board_init(void) | ||
| 75 | { | ||
| 76 | mxc_iomux_v3_setup_multiple_pads(mx51_3ds_pads, | ||
| 77 | ARRAY_SIZE(mx51_3ds_pads)); | ||
| 78 | mxc_init_imx_uart(); | ||
| 79 | |||
| 80 | if (mxc_expio_init(MX51_CS5_BASE_ADDR, EXPIO_PARENT_INT)) | ||
| 81 | printk(KERN_WARNING "Init of the debugboard failed, all " | ||
| 82 | "devices on the board are unusable.\n"); | ||
| 83 | } | ||
| 84 | |||
| 85 | static void __init mx51_3ds_timer_init(void) | ||
| 86 | { | ||
| 87 | mx51_clocks_init(32768, 24000000, 22579200, 0); | ||
| 88 | } | ||
| 89 | |||
| 90 | static struct sys_timer mxc_timer = { | ||
| 91 | .init = mx51_3ds_timer_init, | ||
| 92 | }; | ||
| 93 | |||
| 94 | MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board") | ||
| 95 | /* Maintainer: Freescale Semiconductor, Inc. */ | ||
| 96 | .phys_io = MX51_AIPS1_BASE_ADDR, | ||
| 97 | .io_pg_offst = ((MX51_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
| 98 | .boot_params = PHYS_OFFSET + 0x100, | ||
| 99 | .map_io = mx51_map_io, | ||
| 100 | .init_irq = mx51_init_irq, | ||
| 101 | .init_machine = mxc_board_init, | ||
| 102 | .timer = &mxc_timer, | ||
| 103 | MACHINE_END | ||
