From patchwork Tue Sep 21 16:03:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Grinberg X-Patchwork-Id: 197372 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8LG3Xfm006925 for ; Tue, 21 Sep 2010 16:03:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755377Ab0IUQDb (ORCPT ); Tue, 21 Sep 2010 12:03:31 -0400 Received: from compulab.co.il ([67.18.134.219]:37431 "EHLO compulab.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754517Ab0IUQD3 (ORCPT ); Tue, 21 Sep 2010 12:03:29 -0400 Received: from [62.90.235.247] (helo=zimbra-mta.compulab.co.il) by compulab.site5.com with esmtp (Exim 4.69) (envelope-from ) id 1Oy5JX-0006b7-Qk; Tue, 21 Sep 2010 11:03:28 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id D2D417E918E; Tue, 21 Sep 2010 18:03:26 +0200 (IST) X-Virus-Scanned: amavisd-new at compulab.co.il Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Zq-zgAmta8KM; Tue, 21 Sep 2010 18:03:26 +0200 (IST) Received: from grinberg-linux (grinberg-pc.compulab.local [10.1.1.13]) by zimbra-mta.compulab.co.il (Postfix) with SMTP id 6D4807E9190; Tue, 21 Sep 2010 18:03:25 +0200 (IST) Received: by grinberg-linux (sSMTP sendmail emulation); Tue, 21 Sep 2010 18:03:20 +0200 From: Igor Grinberg To: Tony Lindgren Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Igor Grinberg Subject: [PATCH 5/5] omap3: cm-t3517: add support for TI HECC Date: Tue, 21 Sep 2010 18:03:13 +0200 Message-Id: <1285084993-27683-6-git-send-email-grinberg@compulab.co.il> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1285084993-27683-1-git-send-email-grinberg@compulab.co.il> References: <1285084993-27683-1-git-send-email-grinberg@compulab.co.il> X-ACL-Warn: { X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - compulab.site5.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - compulab.co.il X-Source: X-Source-Args: X-Source-Dir: Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 21 Sep 2010 16:03:34 +0000 (UTC) diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c index 4c26cf5..1115b8a 100644 --- a/arch/arm/mach-omap2/board-cm-t3517.c +++ b/arch/arm/mach-omap2/board-cm-t3517.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -44,6 +45,8 @@ #include #include +#include + #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")