aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorIgor Grinberg <grinberg@compulab.co.il>2010-09-21 12:03:09 -0400
committerTony Lindgren <tony@atomide.com>2010-09-27 18:14:26 -0400
commitd04b620e6e6e72a95b7b88ccb7b002cb8f6b8113 (patch)
tree8bb81d66d0b31442cc4defcb302028d04b554403 /arch/arm
parent91f6c90c8df1818a66d177e105d602c3da820919 (diff)
omap3: Introduce CompuLab CM-T3517 module
Add basic suppot, enable uart and led. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/Kconfig7
-rw-r--r--arch/arm/mach-omap2/Makefile1
-rw-r--r--arch/arm/mach-omap2/board-cm-t3517.c109
-rw-r--r--arch/arm/plat-omap/include/plat/uncompress.h1
4 files changed, 118 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index bb85f24c364..9ceb72b9c59 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -216,6 +216,13 @@ config MACH_CM_T35
216 select OMAP_PACKAGE_CUS 216 select OMAP_PACKAGE_CUS
217 select OMAP_MUX 217 select OMAP_MUX
218 218
219config MACH_CM_T3517
220 bool "CompuLab CM-T3517 module"
221 depends on ARCH_OMAP3
222 default y
223 select OMAP_PACKAGE_CBB
224 select OMAP_MUX
225
219config MACH_IGEP0020 226config MACH_IGEP0020
220 bool "IGEP v2 board" 227 bool "IGEP v2 board"
221 depends on ARCH_OMAP3 228 depends on ARCH_OMAP3
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index e599ae2a5de..9d1a36032fb 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -151,6 +151,7 @@ obj-$(CONFIG_MACH_OMAP_3630SDP) += board-3630sdp.o \
151 hsmmc.o 151 hsmmc.o
152obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o \ 152obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o \
153 hsmmc.o 153 hsmmc.o
154obj-$(CONFIG_MACH_CM_T3517) += board-cm-t3517.o
154obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \ 155obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \
155 hsmmc.o 156 hsmmc.o
156obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \ 157obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c
new file mode 100644
index 00000000000..507d2d51078
--- /dev/null
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
@@ -0,0 +1,109 @@
1/*
2 * linux/arch/arm/mach-omap2/board-cm-t3517.c
3 *
4 * Support for the CompuLab CM-T3517 modules
5 *
6 * Copyright (C) 2010 CompuLab, Ltd.
7 * Author: Igor Grinberg <grinberg@compulab.co.il>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * version 2 as published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21 * 02110-1301 USA
22 *
23 */
24
25#include <linux/kernel.h>
26#include <linux/init.h>
27#include <linux/platform_device.h>
28#include <linux/gpio.h>
29#include <linux/leds.h>
30
31#include <asm/mach-types.h>
32#include <asm/mach/arch.h>
33#include <asm/mach/map.h>
34
35#include <plat/board.h>
36#include <plat/common.h>
37#include <plat/control.h>
38
39#include "mux.h"
40
41#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
42static struct gpio_led cm_t3517_leds[] = {
43 [0] = {
44 .gpio = 186,
45 .name = "cm-t3517:green",
46 .default_trigger = "heartbeat",
47 .active_low = 0,
48 },
49};
50
51static struct gpio_led_platform_data cm_t3517_led_pdata = {
52 .num_leds = ARRAY_SIZE(cm_t3517_leds),
53 .leds = cm_t3517_leds,
54};
55
56static struct platform_device cm_t3517_led_device = {
57 .name = "leds-gpio",
58 .id = -1,
59 .dev = {
60 .platform_data = &cm_t3517_led_pdata,
61 },
62};
63
64static void __init cm_t3517_init_leds(void)
65{
66 platform_device_register(&cm_t3517_led_device);
67}
68#else
69static inline void cm_t3517_init_leds(void) {}
70#endif
71
72
73static struct omap_board_config_kernel cm_t3517_config[] __initdata = {
74};
75
76static void __init cm_t3517_init_irq(void)
77{
78 omap_board_config = cm_t3517_config;
79 omap_board_config_size = ARRAY_SIZE(cm_t3517_config);
80
81 omap2_init_common_hw(NULL, NULL);
82 omap_init_irq();
83 omap_gpio_init();
84}
85
86static struct omap_board_mux board_mux[] __initdata = {
87 /* GPIO186 - Green LED */
88 OMAP3_MUX(SYS_CLKOUT2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
89
90 { .reg_offset = OMAP_MUX_TERMINATOR },
91};
92
93static void __init cm_t3517_init(void)
94{
95 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
96 omap_serial_init();
97 cm_t3517_init_leds();
98}
99
100MACHINE_START(CM_T3517, "Compulab CM-T3517")
101 .phys_io = 0x48000000,
102 .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
103 .boot_params = 0x80000100,
104 .map_io = omap3_map_io,
105 .reserve = omap_reserve,
106 .init_irq = cm_t3517_init_irq,
107 .init_machine = cm_t3517_init,
108 .timer = &omap_timer,
109MACHINE_END
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h
index 57dffa7e3ea..ab60b3560b3 100644
--- a/arch/arm/plat-omap/include/plat/uncompress.h
+++ b/arch/arm/plat-omap/include/plat/uncompress.h
@@ -142,6 +142,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
142 142
143 /* omap3 based boards using UART3 */ 143 /* omap3 based boards using UART3 */
144 DEBUG_LL_OMAP3(3, cm_t35); 144 DEBUG_LL_OMAP3(3, cm_t35);
145 DEBUG_LL_OMAP3(3, cm_t3517);
145 DEBUG_LL_OMAP3(3, igep0020); 146 DEBUG_LL_OMAP3(3, igep0020);
146 DEBUG_LL_OMAP3(3, nokia_rx51); 147 DEBUG_LL_OMAP3(3, nokia_rx51);
147 DEBUG_LL_OMAP3(3, omap3517evm); 148 DEBUG_LL_OMAP3(3, omap3517evm);