diff options
-rw-r--r-- | arch/arm/mach-mx5/Kconfig | 7 | ||||
-rw-r--r-- | arch/arm/mach-mx5/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx5/board-mx51_efikamx.c | 91 |
3 files changed, 99 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig index 3a4c3b32a6e7..fad31cc5004b 100644 --- a/arch/arm/mach-mx5/Kconfig +++ b/arch/arm/mach-mx5/Kconfig | |||
@@ -49,4 +49,11 @@ config MACH_EUKREA_MBIMX51_BASEBOARD | |||
49 | 49 | ||
50 | endchoice | 50 | endchoice |
51 | 51 | ||
52 | config MACH_MX51_EFIKAMX | ||
53 | bool "Support MX51 Genesi Efika MX nettop" | ||
54 | select IMX_HAVE_PLATFORM_IMX_UART | ||
55 | help | ||
56 | Include support for Genesi Efika MX nettop. This includes specific | ||
57 | configurations for the board and its peripherals. | ||
58 | |||
52 | endif | 59 | endif |
diff --git a/arch/arm/mach-mx5/Makefile b/arch/arm/mach-mx5/Makefile index 86c66e7f52f3..d1aac9c3d33c 100644 --- a/arch/arm/mach-mx5/Makefile +++ b/arch/arm/mach-mx5/Makefile | |||
@@ -9,3 +9,4 @@ obj-$(CONFIG_MACH_MX51_BABBAGE) += board-mx51_babbage.o | |||
9 | obj-$(CONFIG_MACH_MX51_3DS) += board-mx51_3ds.o | 9 | obj-$(CONFIG_MACH_MX51_3DS) += board-mx51_3ds.o |
10 | obj-$(CONFIG_MACH_EUKREA_CPUIMX51) += board-cpuimx51.o | 10 | obj-$(CONFIG_MACH_EUKREA_CPUIMX51) += board-cpuimx51.o |
11 | obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o | 11 | obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o |
12 | obj-$(CONFIG_MACH_MX51_EFIKAMX) += board-mx51_efikamx.o | ||
diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c new file mode 100644 index 000000000000..4c921fc31816 --- /dev/null +++ b/arch/arm/mach-mx5/board-mx51_efikamx.c | |||
@@ -0,0 +1,91 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Linaro Limited | ||
3 | * | ||
4 | * based on code from the following | ||
5 | * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
6 | * Copyright 2009-2010 Pegatron Corporation. All Rights Reserved. | ||
7 | * Copyright 2009-2010 Genesi USA, Inc. All Rights Reserved. | ||
8 | * | ||
9 | * The code contained herein is licensed under the GNU General Public | ||
10 | * License. You may obtain a copy of the GNU General Public License | ||
11 | * Version 2 or later at the following locations: | ||
12 | * | ||
13 | * http://www.opensource.org/licenses/gpl-license.html | ||
14 | * http://www.gnu.org/copyleft/gpl.html | ||
15 | */ | ||
16 | |||
17 | #include <linux/init.h> | ||
18 | #include <linux/platform_device.h> | ||
19 | #include <linux/i2c.h> | ||
20 | #include <linux/gpio.h> | ||
21 | #include <linux/delay.h> | ||
22 | #include <linux/io.h> | ||
23 | #include <linux/fsl_devices.h> | ||
24 | |||
25 | #include <mach/common.h> | ||
26 | #include <mach/hardware.h> | ||
27 | #include <mach/iomux-mx51.h> | ||
28 | #include <mach/i2c.h> | ||
29 | #include <mach/mxc_ehci.h> | ||
30 | |||
31 | #include <asm/irq.h> | ||
32 | #include <asm/setup.h> | ||
33 | #include <asm/mach-types.h> | ||
34 | #include <asm/mach/arch.h> | ||
35 | #include <asm/mach/time.h> | ||
36 | |||
37 | #include "devices-imx51.h" | ||
38 | #include "devices.h" | ||
39 | |||
40 | static struct pad_desc mx51efikamx_pads[] = { | ||
41 | /* UART1 */ | ||
42 | MX51_PAD_UART1_RXD__UART1_RXD, | ||
43 | MX51_PAD_UART1_TXD__UART1_TXD, | ||
44 | MX51_PAD_UART1_RTS__UART1_RTS, | ||
45 | MX51_PAD_UART1_CTS__UART1_CTS, | ||
46 | }; | ||
47 | |||
48 | /* Serial ports */ | ||
49 | #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) | ||
50 | static const struct imxuart_platform_data uart_pdata = { | ||
51 | .flags = IMXUART_HAVE_RTSCTS, | ||
52 | }; | ||
53 | |||
54 | static inline void mxc_init_imx_uart(void) | ||
55 | { | ||
56 | imx51_add_imx_uart(0, &uart_pdata); | ||
57 | imx51_add_imx_uart(1, &uart_pdata); | ||
58 | imx51_add_imx_uart(2, &uart_pdata); | ||
59 | } | ||
60 | #else /* !SERIAL_IMX */ | ||
61 | static inline void mxc_init_imx_uart(void) | ||
62 | { | ||
63 | } | ||
64 | #endif /* SERIAL_IMX */ | ||
65 | |||
66 | static void __init mxc_board_init(void) | ||
67 | { | ||
68 | mxc_iomux_v3_setup_multiple_pads(mx51efikamx_pads, | ||
69 | ARRAY_SIZE(mx51efikamx_pads)); | ||
70 | mxc_init_imx_uart(); | ||
71 | } | ||
72 | |||
73 | static void __init mx51_efikamx_timer_init(void) | ||
74 | { | ||
75 | mx51_clocks_init(32768, 24000000, 22579200, 24576000); | ||
76 | } | ||
77 | |||
78 | static struct sys_timer mxc_timer = { | ||
79 | .init = mx51_efikamx_timer_init, | ||
80 | }; | ||
81 | |||
82 | MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop") | ||
83 | /* Maintainer: Amit Kucheria <amit.kucheria@linaro.org> */ | ||
84 | .phys_io = MX51_AIPS1_BASE_ADDR, | ||
85 | .io_pg_offst = ((MX51_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
86 | .boot_params = MX51_PHYS_OFFSET + 0x100, | ||
87 | .map_io = mx51_map_io, | ||
88 | .init_irq = mx51_init_irq, | ||
89 | .init_machine = mxc_board_init, | ||
90 | .timer = &mxc_timer, | ||
91 | MACHINE_END | ||