From patchwork Tue Aug 17 18:56:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juha.Kuikka@elektrobit.com X-Patchwork-Id: 120004 Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7HIwfnG028173 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 17 Aug 2010 18:59:17 GMT Received: from dlep33.itg.ti.com ([157.170.170.112]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id o7HIuruY022025 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 Aug 2010 13:56:53 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id o7HIuqoH004983; Tue, 17 Aug 2010 13:56:52 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 542328062A; Tue, 17 Aug 2010 13:56:52 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 8457D80626 for ; Tue, 17 Aug 2010 13:56:51 -0500 (CDT) Received: from medina.ext.ti.com (localhost [127.0.0.1]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id o7HIupZR019273 for ; Tue, 17 Aug 2010 13:56:51 -0500 (CDT) Received: from psmtp.com (na3sys009amx239.postini.com [74.125.149.123]) by medina.ext.ti.com (8.13.7/8.13.7) with SMTP id o7HIuoGa020345 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 17 Aug 2010 13:56:50 -0500 Received: from source ([207.170.229.72]) (using TLSv1) by na3sys009amx239.postini.com ([74.125.148.10]) with SMTP; Tue, 17 Aug 2010 13:56:50 CDT Received: from usrdes03.ebgroup.elektrobit.com (usrdes03.ebgroup.elektrobit.com [172.18.145.10]) by smtpgw2us.elektrobit.com (8.13.8/8.13.8) with ESMTP id o7HIunuQ016962 for ; Tue, 17 Aug 2010 11:56:49 -0700 Received: from localhost.localdomain ([172.18.145.22]) by usrdes03.ebgroup.elektrobit.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 17 Aug 2010 11:56:48 -0700 From: Juha Kuikka To: davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH v2 3/3] DA850: Add MMCSD1 resources, platform device and convenience registration function Date: Tue, 17 Aug 2010 11:56:48 -0700 Message-Id: <1282071408-1213-4-git-send-email-juha.kuikka@elektrobit.com> X-Mailer: git-send-email 1.6.0.1 In-Reply-To: <1282071408-1213-3-git-send-email-juha.kuikka@elektrobit.com> References: <1282071408-1213-1-git-send-email-juha.kuikka@elektrobit.com> <1282071408-1213-2-git-send-email-juha.kuikka@elektrobit.com> <1282071408-1213-3-git-send-email-juha.kuikka@elektrobit.com> X-OriginalArrivalTime: 17 Aug 2010 18:56:48.0869 (UTC) FILETIME=[F2447150:01CB3E3D] X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 17 Aug 2010 18:59:18 +0000 (UTC) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (smtpgw2us.elektrobit.com [10.127.1.12]); Tue, 17 Aug 2010 11:56:49 -0700 (PDT) X-Virus-Scanned: at elektrobit.com MIME-Version: 1.0 Content-Disposition: inline X-Scanned-By: MIMEDefang 2.67 on 10.127.1.12 X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-settings: 2 (0.5000:0.5000) s cv gt3 gt2 gt1 r p m c X-pstn-addresses: from [db-null] Cc: Juha Kuikka X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index 52bc7b1..104f1ba 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c @@ -37,6 +37,7 @@ #define DA8XX_EMAC_MDIO_BASE 0x01e24000 #define DA8XX_GPIO_BASE 0x01e26000 #define DA8XX_I2C1_BASE 0x01e28000 +#define DA850_MMCSD1_BASE 0x01e1b000 #define DA8XX_EMAC_CTRL_REG_OFFSET 0x3000 #define DA8XX_EMAC_MOD_REG_OFFSET 0x2000 @@ -566,6 +567,42 @@ int __init da8xx_register_mmcsd0(struct davinci_mmc_config *config) return platform_device_register(&da8xx_mmcsd0_device); } +static struct resource da850_mmcsd1_resources[] = { + { /* registers */ + .start = DA850_MMCSD1_BASE, + .end = DA850_MMCSD1_BASE + SZ_4K - 1, + .flags = IORESOURCE_MEM, + }, + { /* interrupt */ + .start = IRQ_DA850_MMCSDINT0_1, + .end = IRQ_DA850_MMCSDINT0_1, + .flags = IORESOURCE_IRQ, + }, + { /* DMA RX */ + .start = EDMA_CTLR_CHAN(1, 28), + .end = EDMA_CTLR_CHAN(1, 28), + .flags = IORESOURCE_DMA, + }, + { /* DMA TX */ + .start = EDMA_CTLR_CHAN(1, 29), + .end = EDMA_CTLR_CHAN(1, 29), + .flags = IORESOURCE_DMA, + }, +}; + +static struct platform_device da850_mmcsd1_device = { + .name = "davinci_mmc", + .id = 1, + .num_resources = ARRAY_SIZE(da850_mmcsd1_resources), + .resource = da850_mmcsd1_resources, +}; + +int __init da850_register_mmcsd1(struct davinci_mmc_config *config) +{ + da850_mmcsd1_device.dev.platform_data = config; + return platform_device_register(&da850_mmcsd1_device); +} + static struct resource da8xx_rtc_resources[] = { { .start = DA8XX_RTC_BASE, diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h index 3c07059..7c0b5ab 100644 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h @@ -76,6 +76,7 @@ int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata); int da8xx_register_emac(void); int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata); int da8xx_register_mmcsd0(struct davinci_mmc_config *config); +int da850_register_mmcsd1(struct davinci_mmc_config *config); void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata); int da8xx_register_rtc(void); int da850_register_cpufreq(void);