diff options
author | Igor Grinberg <grinberg@compulab.co.il> | 2010-09-21 12:03:13 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-09-27 18:15:35 -0400 |
commit | b6a26b4b87d7b030a546e7bdaf390ffc58323f36 (patch) | |
tree | 865ab5dbc0df6a2544f732fe2917115b5c4415fc /arch/arm/mach-omap2/board-cm-t3517.c | |
parent | ec34fccd3a8ed4997c38797b49e37535ad387401 (diff) |
omap3: cm-t3517: add support for TI HECC
add support for TI HECC.
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-cm-t3517.c')
-rw-r--r-- | arch/arm/mach-omap2/board-cm-t3517.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c index 4c26cf53a6e5..1115b8ab5e1d 100644 --- a/arch/arm/mach-omap2/board-cm-t3517.c +++ b/arch/arm/mach-omap2/board-cm-t3517.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/mtd/mtd.h> | 32 | #include <linux/mtd/mtd.h> |
33 | #include <linux/mtd/nand.h> | 33 | #include <linux/mtd/nand.h> |
34 | #include <linux/mtd/partitions.h> | 34 | #include <linux/mtd/partitions.h> |
35 | #include <linux/can/platform/ti_hecc.h> | ||
35 | 36 | ||
36 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
37 | #include <asm/mach/arch.h> | 38 | #include <asm/mach/arch.h> |
@@ -44,6 +45,8 @@ | |||
44 | #include <plat/nand.h> | 45 | #include <plat/nand.h> |
45 | #include <plat/gpmc.h> | 46 | #include <plat/gpmc.h> |
46 | 47 | ||
48 | #include <mach/am35xx.h> | ||
49 | |||
47 | #include "mux.h" | 50 | #include "mux.h" |
48 | 51 | ||
49 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) | 52 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) |
@@ -77,6 +80,47 @@ static void __init cm_t3517_init_leds(void) | |||
77 | static inline void cm_t3517_init_leds(void) {} | 80 | static inline void cm_t3517_init_leds(void) {} |
78 | #endif | 81 | #endif |
79 | 82 | ||
83 | #if defined(CONFIG_CAN_TI_HECC) || defined(CONFIG_CAN_TI_HECC_MODULE) | ||
84 | static struct resource cm_t3517_hecc_resources[] = { | ||
85 | { | ||
86 | .start = AM35XX_IPSS_HECC_BASE, | ||
87 | .end = AM35XX_IPSS_HECC_BASE + SZ_16K - 1, | ||
88 | .flags = IORESOURCE_MEM, | ||
89 | }, | ||
90 | { | ||
91 | .start = INT_35XX_HECC0_IRQ, | ||
92 | .end = INT_35XX_HECC0_IRQ, | ||
93 | .flags = IORESOURCE_IRQ, | ||
94 | }, | ||
95 | }; | ||
96 | |||
97 | static struct ti_hecc_platform_data cm_t3517_hecc_pdata = { | ||
98 | .scc_hecc_offset = AM35XX_HECC_SCC_HECC_OFFSET, | ||
99 | .scc_ram_offset = AM35XX_HECC_SCC_RAM_OFFSET, | ||
100 | .hecc_ram_offset = AM35XX_HECC_RAM_OFFSET, | ||
101 | .mbx_offset = AM35XX_HECC_MBOX_OFFSET, | ||
102 | .int_line = AM35XX_HECC_INT_LINE, | ||
103 | .version = AM35XX_HECC_VERSION, | ||
104 | }; | ||
105 | |||
106 | static struct platform_device cm_t3517_hecc_device = { | ||
107 | .name = "ti_hecc", | ||
108 | .id = 1, | ||
109 | .num_resources = ARRAY_SIZE(cm_t3517_hecc_resources), | ||
110 | .resource = cm_t3517_hecc_resources, | ||
111 | .dev = { | ||
112 | .platform_data = &cm_t3517_hecc_pdata, | ||
113 | }, | ||
114 | }; | ||
115 | |||
116 | static void cm_t3517_init_hecc(void) | ||
117 | { | ||
118 | platform_device_register(&cm_t3517_hecc_device); | ||
119 | } | ||
120 | #else | ||
121 | static inline void cm_t3517_init_hecc(void) {} | ||
122 | #endif | ||
123 | |||
80 | #if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE) | 124 | #if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE) |
81 | #define RTC_IO_GPIO (153) | 125 | #define RTC_IO_GPIO (153) |
82 | #define RTC_WR_GPIO (154) | 126 | #define RTC_WR_GPIO (154) |
@@ -235,6 +279,7 @@ static void __init cm_t3517_init(void) | |||
235 | cm_t3517_init_nand(); | 279 | cm_t3517_init_nand(); |
236 | cm_t3517_init_rtc(); | 280 | cm_t3517_init_rtc(); |
237 | cm_t3517_init_usbh(); | 281 | cm_t3517_init_usbh(); |
282 | cm_t3517_init_hecc(); | ||
238 | } | 283 | } |
239 | 284 | ||
240 | MACHINE_START(CM_T3517, "Compulab CM-T3517") | 285 | MACHINE_START(CM_T3517, "Compulab CM-T3517") |