Skip to contentSkip to conversation

Support for CompuLab CM-T3517 modules

PATCH New Igor Grinberg 3 participants 9 messages Sep 21, 2010 – Sep 27, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover Support for CompuLab CM-T3517 modules

CompuLab CM-T3517 module is based on AM3517 (Sitara) SoC. CM-T3517 supports on-board 256/128MB DDR2 DRAM, 512/128MB NAND flash, WIFI-BlueTooth combo chip, USB HUB, AC97 Codec, TouchScreen controller, RTC.

This patch series add a basic support for CM-T3517 and some of its peripheral devices.

Based on:
commit 44ed8ecfeb1f639c59897de3f551f50e3f0fd52e
Merge: 96542e6 0cbe681
Author: Tony Lindgren <[email protected]>
Date: Mon Sep 20 15:14:25 2010 -0700

Linux-omap rebuilt: Merged in the smp-on-up patches for testing

Igor Grinberg (5):
omap3: Introduce CompuLab CM-T3517 module.
omap3: cm-t3517: add support for v3020 rtc.
omap3: cm-t3517: add support for usb host.
omap3: cm-t3517: add support for NAND flash
omap3: cm-t3517: add support for TI HECC

 arch/arm/mach-omap2/Kconfig                  |    7 +
 arch/arm/mach-omap2/Makefile                 |    1 +
 arch/arm/mach-omap2/board-cm-t3517.c         |  294 ++++++++++++++++++++++++++
 arch/arm/plat-omap/include/plat/uncompress.h |    1 +
 4 files changed, 303 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-cm-t3517.c
#1 lore raw

PATCH 1/5 omap3: Introduce CompuLab CM-T3517 module.

Add basic suppot, enable uart and led.

---
 arch/arm/mach-omap2/Kconfig                  |    7 ++
 arch/arm/mach-omap2/Makefile                 |    1 +
 arch/arm/mach-omap2/board-cm-t3517.c         |  109 ++++++++++++++++++++++++++
 arch/arm/plat-omap/include/plat/uncompress.h |    1 +
 4 files changed, 118 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-cm-t3517.c
arch/arm/mach-omap2/Kconfig +7 -0
index bb85f24..9ceb72b 100644
@@ -216,6 +216,13 @@ config MACH_CM_T35
 	select OMAP_PACKAGE_CUS
 	select OMAP_MUX
 
+config MACH_CM_T3517
+	bool "CompuLab CM-T3517 module"
+	depends on ARCH_OMAP3
+	default y
+	select OMAP_PACKAGE_CBB
+	select OMAP_MUX
+
 config MACH_IGEP0020
 	bool "IGEP v2 board"
 	depends on ARCH_OMAP3
arch/arm/mach-omap2/Makefile +1 -0
index 88d3a1e..7d991d0 100644
@@ -146,6 +146,7 @@ obj-$(CONFIG_MACH_OMAP_3630SDP)		+= board-3630sdp.o \
 					   hsmmc.o
 obj-$(CONFIG_MACH_CM_T35)		+= board-cm-t35.o \
 					   hsmmc.o
+obj-$(CONFIG_MACH_CM_T3517)		+= board-cm-t3517.o
 obj-$(CONFIG_MACH_IGEP0020)		+= board-igep0020.o \
 					   hsmmc.o
 obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK)	+= board-omap3touchbook.o \
arch/arm/mach-omap2/board-cm-t3517.c new file +109 -0

109 lines not on this page · raw message

arch/arm/plat-omap/include/plat/uncompress.h +1 -0
index ddf723b..4f637b5 100644
@@ -142,6 +142,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
 
 		/* omap3 based boards using UART3 */
 		DEBUG_LL_OMAP3(3, cm_t35);
+		DEBUG_LL_OMAP3(3, cm_t3517);
 		DEBUG_LL_OMAP3(3, igep0020);
 		DEBUG_LL_OMAP3(3, nokia_rx51);
 		DEBUG_LL_OMAP3(3, omap3517evm);
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/5 omap3: cm-t3517: add support for v3020 rtc.

In reply to Igor Grinberg

add support for v3020 rtc.

---
 arch/arm/mach-omap2/board-cm-t3517.c |   36 ++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-cm-t3517.c +36 -0
index 507d2d5..2b41c6d 100644
@@ -27,6 +27,7 @@
 #include <linux/platform_device.h>
 #include <linux/gpio.h>
 #include <linux/leds.h>
+#include <linux/rtc-v3020.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -69,6 +70,35 @@ static void __init cm_t3517_init_leds(void)
 static inline void cm_t3517_init_leds(void) {}
 #endif
 
+#if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE)
+#define RTC_IO_GPIO		(153)
+#define RTC_WR_GPIO		(154)
+#define RTC_RD_GPIO		(160)
+#define RTC_CS_GPIO		(163)
+
+struct v3020_platform_data cm_t3517_v3020_pdata = {
+	.use_gpio	= 1,
+	.gpio_cs	= RTC_CS_GPIO,
+	.gpio_wr	= RTC_WR_GPIO,
+	.gpio_rd	= RTC_RD_GPIO,
+	.gpio_io	= RTC_IO_GPIO,
+};
+
+static struct platform_device cm_t3517_rtc_device = {
+	.name		= "v3020",
+	.id		= -1,
+	.dev		= {
+		.platform_data = &cm_t3517_v3020_pdata,
+	}
+};
+
+static void __init cm_t3517_init_rtc(void)
+{
+	platform_device_register(&cm_t3517_rtc_device);
+}
+#else
+static inline void cm_t3517_init_rtc(void) {}
+#endif
 
 static struct omap_board_config_kernel cm_t3517_config[] __initdata = {
 };
@@ -86,6 +116,11 @@ static void __init cm_t3517_init_irq(void)
 static struct omap_board_mux board_mux[] __initdata = {
 	/* GPIO186 - Green LED */
 	OMAP3_MUX(SYS_CLKOUT2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
+	/* RTC GPIOs: IO, WR#, RD#, CS# */
+	OMAP3_MUX(MCBSP4_DR, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
+	OMAP3_MUX(MCBSP4_DX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
+	OMAP3_MUX(MCBSP_CLKS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
+	OMAP3_MUX(UART3_CTS_RCTX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
 
 	{ .reg_offset = OMAP_MUX_TERMINATOR },
 };
@@ -95,6 +130,7 @@ static void __init cm_t3517_init(void)
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 	omap_serial_init();
 	cm_t3517_init_leds();
+	cm_t3517_init_rtc();
 }
 
 MACHINE_START(CM_T3517, "Compulab CM-T3517")
Signature · 1 line
1.7.1
#3 lore raw

PATCH 3/5 omap3: cm-t3517: add support for usb host.

In reply to Igor Grinberg

add support for hsusb host ports 1, 2 and on-module usb hub.

---
 arch/arm/mach-omap2/board-cm-t3517.c |   50 ++++++++++++++++++++++++++++++++++
 1 files changed, 50 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-cm-t3517.c +50 -0
index 2b41c6d..2c7082d 100644
@@ -25,6 +25,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/delay.h>
 #include <linux/gpio.h>
 #include <linux/leds.h>
 #include <linux/rtc-v3020.h>
@@ -36,6 +37,7 @@
 #include <plat/board.h>
 #include <plat/common.h>
 #include <plat/control.h>
+#include <plat/usb.h>
 
 #include "mux.h"
 
@@ -100,6 +102,47 @@ static void __init cm_t3517_init_rtc(void)
 static inline void cm_t3517_init_rtc(void) {}
 #endif
 
+#if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_EHCI_HCD_MODULE)
+#define HSUSB1_RESET_GPIO	(146)
+#define HSUSB2_RESET_GPIO	(147)
+#define USB_HUB_RESET_GPIO	(152)
+
+static struct ehci_hcd_omap_platform_data cm_t3517_ehci_pdata __initdata = {
+	.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
+	.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
+	.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+
+	.phy_reset  = true,
+	.reset_gpio_port[0]  = HSUSB1_RESET_GPIO,
+	.reset_gpio_port[1]  = HSUSB2_RESET_GPIO,
+	.reset_gpio_port[2]  = -EINVAL,
+};
+
+static int cm_t3517_init_usbh(void)
+{
+	int err;
+
+	err = gpio_request(USB_HUB_RESET_GPIO, "usb hub rst");
+	if (err) {
+		pr_err("CM-T3517: usb hub rst gpio request failed: %d\n", err);
+	} else {
+		gpio_direction_output(USB_HUB_RESET_GPIO, 0);
+		udelay(10);
+		gpio_set_value(USB_HUB_RESET_GPIO, 1);
+		msleep(1);
+	}
+
+	usb_ehci_init(&cm_t3517_ehci_pdata);
+
+	return 0;
+}
+#else
+static inline int cm_t3517_init_usbh(void)
+{
+	return 0;
+}
+#endif
+
 static struct omap_board_config_kernel cm_t3517_config[] __initdata = {
 };
 
@@ -121,6 +164,12 @@ static struct omap_board_mux board_mux[] __initdata = {
 	OMAP3_MUX(MCBSP4_DX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
 	OMAP3_MUX(MCBSP_CLKS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
 	OMAP3_MUX(UART3_CTS_RCTX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
+	/* HSUSB1 RESET */
+	OMAP3_MUX(UART2_TX, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
+	/* HSUSB2 RESET */
+	OMAP3_MUX(UART2_RX, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
+	/* CM-T3517 USB HUB nRESET */
+	OMAP3_MUX(MCBSP4_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
 
 	{ .reg_offset = OMAP_MUX_TERMINATOR },
 };
@@ -131,6 +180,7 @@ static void __init cm_t3517_init(void)
 	omap_serial_init();
 	cm_t3517_init_leds();
 	cm_t3517_init_rtc();
+	cm_t3517_init_usbh();
 }
 
 MACHINE_START(CM_T3517, "Compulab CM-T3517")
Signature · 1 line
1.7.1
#4 lore raw

PATCH 3/5 omap3: cm-t3517: add support for usb host.

Quoted 5 lines · Igor Grinberg

add support for hsusb host ports 1, 2 and on-module usb hub.

---
?arch/arm/mach-omap2/board-cm-t3517.c | ? 50 ++++++++++++++++++++++++++++++++++

...

Quoted 5 lines
(quoted diff) +0 -0
@@ -100,6 +102,47 @@ static void __init cm_t3517_init_rtc(void)
 ?static inline void cm_t3517_init_rtc(void) {}

?#endif

+#if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_EHCI_HCD_MODULE)

Hi Igor,

Do we really need to make these conditional on the driver being built?

The hardware is present on the board at all times, right?
It should be okay to execute this code independent of whether the driver is built or not. The device registration can be unconditional and if there is no driver present, we won't probe anyway.

(I see some similar logic in usb-ehci.c - probably a good idea to remove it as well).

- Anand

Quoted 40 lines
(quoted diff) +40 -0
+#define HSUSB1_RESET_GPIO ? ? ?(146)
+#define HSUSB2_RESET_GPIO ? ? ?(147)
+#define USB_HUB_RESET_GPIO ? ? (152)
+
+static struct ehci_hcd_omap_platform_data cm_t3517_ehci_pdata __initdata = {
+ ? ? ? .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
+ ? ? ? .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
+ ? ? ? .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+
+ ? ? ? .phy_reset ?= true,
+ ? ? ? .reset_gpio_port[0] ?= HSUSB1_RESET_GPIO,
+ ? ? ? .reset_gpio_port[1] ?= HSUSB2_RESET_GPIO,
+ ? ? ? .reset_gpio_port[2] ?= -EINVAL,
+};
+
+static int cm_t3517_init_usbh(void)
+{
+ ? ? ? int err;
+
+ ? ? ? err = gpio_request(USB_HUB_RESET_GPIO, "usb hub rst");
+ ? ? ? if (err) {
+ ? ? ? ? ? ? ? pr_err("CM-T3517: usb hub rst gpio request failed: %d\n", err);
+ ? ? ? } else {
+ ? ? ? ? ? ? ? gpio_direction_output(USB_HUB_RESET_GPIO, 0);
+ ? ? ? ? ? ? ? udelay(10);
+ ? ? ? ? ? ? ? gpio_set_value(USB_HUB_RESET_GPIO, 1);
+ ? ? ? ? ? ? ? msleep(1);
+ ? ? ? }
+
+ ? ? ? usb_ehci_init(&cm_t3517_ehci_pdata);
+
+ ? ? ? return 0;
+}
+#else
+static inline int cm_t3517_init_usbh(void)
+{
+ ? ? ? return 0;
+}
+#endif
+
#5 lore raw

PATCH 3/5 omap3: cm-t3517: add support for usb host.

Quoted 6 lines · Anand
Quoted 5 lines · Igor Grinberg

add support for hsusb host ports 1, 2 and on-module usb hub.

---
 arch/arm/mach-omap2/board-cm-t3517.c |   50 ++++++++++++++++++++++++++++++++++
Quoted 8 lines

...

arch/arm/mach-omap2/board-cm-t3517.c static void __init cm_t3517_init_rtc(void) · line 105

Quoted 5 lines
arch/arm/mach-omap2/board-cm-t3517.c +1 -0
@@ -100,6 +102,47 @@ static void __init cm_t3517_init_rtc(void)
 static inline void cm_t3517_init_rtc(void) {}
 #endif
 
+#if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_EHCI_HCD_MODULE)

Hi Igor,

Hi

Quoted 1 line

Do we really need to make these conditional on the driver being built?

This is depends on what are we trying to achieve...
I can think of two things:
[1] Simple, clear and nice code without ifdefs
[2] Smaller kernel, a bit less resources wasted and a bit faster boot time

Quoted 1 line

The hardware is present on the board at all times, right?

Yes, it is inside the SoC, except for the usb hub.

Quoted 3 lines

It should be okay to execute this code independent of whether the driver is built or not. The device registration can be unconditional and if there is no driver present, we won't probe anyway.

It is ok, but again it depends on what we are trying to achieve here.

If we want [1], then indeed we need to remove the ifdefs also inside usb-ehci.c, so pros:
* we'll get nice and clean code,
cons:
* a bit bigger kernel,
* "floating" device without a driver,
* a bit resources wasted for this device,
* a bit slower startup time (device registration, gpio toggling, etc.).

If we want [2], then we'll have the opposite of [1] ;)

Personally, I don't mind either way... ,
but I want the code to be consistent (in this case with usb-ehci.c).

Quoted 2 lines

(I see some similar logic in usb-ehci.c - probably a good idea to remove it as well).

...

Quoted 47 lines

- Anand

Quoted 30 lines
arch/arm/mach-omap2/board-cm-t3517.c +30 -0
+#define HSUSB1_RESET_GPIO      (146)
+#define HSUSB2_RESET_GPIO      (147)
+#define USB_HUB_RESET_GPIO     (152)
+
+static struct ehci_hcd_omap_platform_data cm_t3517_ehci_pdata __initdata = {
+       .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
+       .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
+       .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+
+       .phy_reset  = true,
+       .reset_gpio_port[0]  = HSUSB1_RESET_GPIO,
+       .reset_gpio_port[1]  = HSUSB2_RESET_GPIO,
+       .reset_gpio_port[2]  = -EINVAL,
+};
+
+static int cm_t3517_init_usbh(void)
+{
+       int err;
+
+       err = gpio_request(USB_HUB_RESET_GPIO, "usb hub rst");
+       if (err) {
+               pr_err("CM-T3517: usb hub rst gpio request failed: %d\n", err);
+       } else {
+               gpio_direction_output(USB_HUB_RESET_GPIO, 0);
+               udelay(10);
+               gpio_set_value(USB_HUB_RESET_GPIO, 1);
+               msleep(1);
+       }
+
+       usb_ehci_init(&cm_t3517_ehci_pdata);

arch/arm/mach-omap2/board-cm-t3517.c static void __init cm_t3517_init_rtc(void) · line 145

Quoted 10 lines
arch/arm/mach-omap2/board-cm-t3517.c +10 -0
+
+       return 0;
+}
+#else
+static inline int cm_t3517_init_usbh(void)
+{
+       return 0;
+}
+#endif
+

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 2 lines
Regards,
Igor.
maintainer
#6 lore raw

PATCH 3/5 omap3: cm-t3517: add support for usb host.

Quoted 4 lines · Igor Grinberg
Quoted 4 lines

It should be okay to execute this code independent of whether the driver is built or not. The device registration can be unconditional and if there is no driver present, we won't probe anyway.

The current patch looks OK to me, adding all of them into omap-for-linus.

Regards,

Tony

#7 lore raw

PATCH 4/5 omap3: cm-t3517: add support for NAND flash

In reply to Igor Grinberg

add support for NAND flash.

---
 arch/arm/mach-omap2/board-cm-t3517.c |   54 ++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-cm-t3517.c +54 -0
index 2c7082d..4c26cf5 100644
@@ -29,6 +29,9 @@
 #include <linux/gpio.h>
 #include <linux/leds.h>
 #include <linux/rtc-v3020.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/nand.h>
+#include <linux/mtd/partitions.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -38,6 +41,8 @@
 #include <plat/common.h>
 #include <plat/control.h>
 #include <plat/usb.h>
+#include <plat/nand.h>
+#include <plat/gpmc.h>
 
 #include "mux.h"
 
@@ -143,6 +148,54 @@ static inline int cm_t3517_init_usbh(void)
 }
 #endif
 
+#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
+#define NAND_BLOCK_SIZE		SZ_128K
+
+static struct mtd_partition cm_t3517_nand_partitions[] = {
+	{
+		.name           = "xloader",
+		.offset         = 0,			/* Offset = 0x00000 */
+		.size           = 4 * NAND_BLOCK_SIZE,
+		.mask_flags     = MTD_WRITEABLE
+	},
+	{
+		.name           = "uboot",
+		.offset         = MTDPART_OFS_APPEND,	/* Offset = 0x80000 */
+		.size           = 15 * NAND_BLOCK_SIZE,
+	},
+	{
+		.name           = "uboot environment",
+		.offset         = MTDPART_OFS_APPEND,	/* Offset = 0x260000 */
+		.size           = 2 * NAND_BLOCK_SIZE,
+	},
+	{
+		.name           = "linux",
+		.offset         = MTDPART_OFS_APPEND,	/* Offset = 0x280000 */
+		.size           = 32 * NAND_BLOCK_SIZE,
+	},
+	{
+		.name           = "rootfs",
+		.offset         = MTDPART_OFS_APPEND,	/* Offset = 0x680000 */
+		.size           = MTDPART_SIZ_FULL,
+	},
+};
+
+static struct omap_nand_platform_data cm_t3517_nand_data = {
+	.parts			= cm_t3517_nand_partitions,
+	.nr_parts		= ARRAY_SIZE(cm_t3517_nand_partitions),
+	.dma_channel		= -1,	/* disable DMA in OMAP NAND driver */
+	.cs			= 0,
+};
+
+static void __init cm_t3517_init_nand(void)
+{
+	if (gpmc_nand_init(&cm_t3517_nand_data) < 0)
+		pr_err("CM-T3517: NAND initialization failed\n");
+}
+#else
+static inline void cm_t3517_init_nand(void) {}
+#endif
+
 static struct omap_board_config_kernel cm_t3517_config[] __initdata = {
 };
 
@@ -179,6 +232,7 @@ static void __init cm_t3517_init(void)
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 	omap_serial_init();
 	cm_t3517_init_leds();
+	cm_t3517_init_nand();
 	cm_t3517_init_rtc();
 	cm_t3517_init_usbh();
 }
Signature · 1 line
1.7.1
#8 lore raw

PATCH 5/5 omap3: cm-t3517: add support for TI HECC

In reply to Igor Grinberg

add support for TI HECC.

---
 arch/arm/mach-omap2/board-cm-t3517.c |   45 ++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-cm-t3517.c +45 -0
index 4c26cf5..1115b8a 100644
@@ -32,6 +32,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
+#include <linux/can/platform/ti_hecc.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -44,6 +45,8 @@
 #include <plat/nand.h>
 #include <plat/gpmc.h>
 
+#include <mach/am35xx.h>
+
 #include "mux.h"
 
 #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
@@ -77,6 +80,47 @@ static void __init cm_t3517_init_leds(void)
 static inline void cm_t3517_init_leds(void) {}
 #endif
 
+#if defined(CONFIG_CAN_TI_HECC) || defined(CONFIG_CAN_TI_HECC_MODULE)
+static struct resource cm_t3517_hecc_resources[] = {
+	{
+		.start	= AM35XX_IPSS_HECC_BASE,
+		.end	= AM35XX_IPSS_HECC_BASE + SZ_16K - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	{
+		.start	= INT_35XX_HECC0_IRQ,
+		.end	= INT_35XX_HECC0_IRQ,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static struct ti_hecc_platform_data cm_t3517_hecc_pdata = {
+	.scc_hecc_offset	= AM35XX_HECC_SCC_HECC_OFFSET,
+	.scc_ram_offset		= AM35XX_HECC_SCC_RAM_OFFSET,
+	.hecc_ram_offset	= AM35XX_HECC_RAM_OFFSET,
+	.mbx_offset		= AM35XX_HECC_MBOX_OFFSET,
+	.int_line		= AM35XX_HECC_INT_LINE,
+	.version		= AM35XX_HECC_VERSION,
+};
+
+static struct platform_device cm_t3517_hecc_device = {
+	.name		= "ti_hecc",
+	.id		= 1,
+	.num_resources	= ARRAY_SIZE(cm_t3517_hecc_resources),
+	.resource	= cm_t3517_hecc_resources,
+	.dev		= {
+		.platform_data	= &cm_t3517_hecc_pdata,
+	},
+};
+
+static void cm_t3517_init_hecc(void)
+{
+	platform_device_register(&cm_t3517_hecc_device);
+}
+#else
+static inline void cm_t3517_init_hecc(void) {}
+#endif
+
 #if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE)
 #define RTC_IO_GPIO		(153)
 #define RTC_WR_GPIO		(154)
@@ -235,6 +279,7 @@ static void __init cm_t3517_init(void)
 	cm_t3517_init_nand();
 	cm_t3517_init_rtc();
 	cm_t3517_init_usbh();
+	cm_t3517_init_hecc();
 }
 
 MACHINE_START(CM_T3517, "Compulab CM-T3517")
Signature · 1 line
1.7.1