From patchwork Mon Aug 8 08:47:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajeshwari Shinde X-Patchwork-Id: 1043382 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p788sNhl032166 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 8 Aug 2011 08:54:44 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QqLaz-000817-Pu; Mon, 08 Aug 2011 08:54:02 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QqLYY-0002VF-9X; Mon, 08 Aug 2011 08:51:30 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QqLXA-000283-PI for linux-arm-kernel@lists.infradead.org; Mon, 08 Aug 2011 08:50:06 +0000 Received: from epcpsbgm1.samsung.com (mailout2.samsung.com [203.254.224.25]) by mailout2.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LPL00J53PUNLQA0@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 08 Aug 2011 17:49:54 +0900 (KST) X-AuditID: cbfee61a-b7cf0ae000006bc6-bc-4e3fa3327947 Received: from epmmp1 ( [203.254.227.16]) by epcpsbgm1.samsung.com (MMPCPMTA) with SMTP id AC.7C.27590.233AF3E4; Mon, 08 Aug 2011 17:49:54 +0900 (KST) Received: from rajeshwari-linux.sisodomain.com ([107.108.215.115]) by mmp1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LPL00BGTPUTHJ@mmp1.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 08 Aug 2011 17:49:55 +0900 (KST) Date: Mon, 08 Aug 2011 14:17:55 +0530 From: Rajeshwari Shinde Subject: RFC[PATCH 5/6] ARM: S5P64X0: Enable SDHCI support In-reply-to: <1312793277-18689-1-git-send-email-rajeshwari.s@samsung.com> To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kgene.kim@samsung.com, cjb@laptop.org, ben-linux@fluff.org Message-id: <1312793277-18689-6-git-send-email-rajeshwari.s@samsung.com> X-Mailer: git-send-email 1.7.4.4 References: <1312793277-18689-1-git-send-email-rajeshwari.s@samsung.com> X-Brightmail-Tracker: AAAAAA== X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110808_045005_238392_A6B3011A X-CRM114-Status: GOOD ( 19.51 ) X-Spam-Score: -3.1 (---) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-3.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [203.254.224.25 listed in list.dnswl.org] -0.8 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 08 Aug 2011 08:54:44 +0000 (UTC) This patch initializes default sdhci devices and platform data for SMDK6440 and SMDK6450. Signed-off-by: Rajeshwari Shinde --- arch/arm/mach-s5p64x0/Makefile | 2 +- .../include/mach/s5p64x0-common-sdhci.h | 15 +++++++++ arch/arm/mach-s5p64x0/mach-smdk6440.c | 10 ++++++ arch/arm/mach-s5p64x0/mach-smdk6450.c | 10 ++++++ arch/arm/mach-s5p64x0/s5p64x0-common-sdhci.c | 34 ++++++++++++++++++++ 5 files changed, 70 insertions(+), 1 deletions(-) create mode 100644 arch/arm/mach-s5p64x0/include/mach/s5p64x0-common-sdhci.h create mode 100644 arch/arm/mach-s5p64x0/s5p64x0-common-sdhci.c diff --git a/arch/arm/mach-s5p64x0/Makefile b/arch/arm/mach-s5p64x0/Makefile index 6642448..e8dd7c6 100644 --- a/arch/arm/mach-s5p64x0/Makefile +++ b/arch/arm/mach-s5p64x0/Makefile @@ -28,5 +28,5 @@ obj-y += dev-audio.o obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o obj-$(CONFIG_S5P64X0_SETUP_I2C1) += setup-i2c1.o -obj-$(CONFIG_S5P64X0_SETUP_SDHCI) += setup-sdhci.o +obj-$(CONFIG_S5P64X0_SETUP_SDHCI) += setup-sdhci.o s5p64x0-common-sdhci.o obj-$(CONFIG_S5P64X0_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o diff --git a/arch/arm/mach-s5p64x0/include/mach/s5p64x0-common-sdhci.h b/arch/arm/mach-s5p64x0/include/mach/s5p64x0-common-sdhci.h new file mode 100644 index 0000000..a3381f0 --- /dev/null +++ b/arch/arm/mach-s5p64x0/include/mach/s5p64x0-common-sdhci.h @@ -0,0 +1,15 @@ +/* linux/arch/arm/mach-s5p64x0/include/mach/s5p64x0-common-sdhci.h + * + * Copyright (c) 2011 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +#include + +extern struct s3c_sdhci_platdata smdk64x0_hsmmc0_pdata; +extern struct s3c_sdhci_platdata smdk64x0_hsmmc1_pdata; +extern struct s3c_sdhci_platdata smdk64x0_hsmmc2_pdata; diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c index 346f8df..065977f 100644 --- a/arch/arm/mach-s5p64x0/mach-smdk6440.c +++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -34,6 +35,7 @@ #include #include #include +#include #include #include @@ -47,6 +49,7 @@ #include #include #include +#include #define SMDK6440_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ S3C2410_UCON_RXILEVEL | \ @@ -101,6 +104,9 @@ static struct platform_device *smdk6440_devices[] __initdata = { &s3c_device_wdt, &samsung_asoc_dma, &s5p6440_device_iis, + &s3c_device_hsmmc0, + &s3c_device_hsmmc1, + &s3c_device_hsmmc2, }; static struct s3c2410_platform_i2c s5p6440_i2c0_data __initdata = { @@ -166,6 +172,10 @@ static void __init smdk6440_machine_init(void) samsung_bl_set(&smdk6440_bl_gpio_info, &smdk6440_bl_data); + s3c_sdhci0_set_platdata(&smdk64x0_hsmmc0_pdata); + s3c_sdhci1_set_platdata(&smdk64x0_hsmmc1_pdata); + s3c_sdhci2_set_platdata(&smdk64x0_hsmmc2_pdata); + platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices)); } diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c index 33f2adf..9e6fcef 100644 --- a/arch/arm/mach-s5p64x0/mach-smdk6450.c +++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -34,6 +35,7 @@ #include #include #include +#include #include #include @@ -47,6 +49,7 @@ #include #include #include +#include #define SMDK6450_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ S3C2410_UCON_RXILEVEL | \ @@ -119,6 +122,9 @@ static struct platform_device *smdk6450_devices[] __initdata = { &s3c_device_wdt, &samsung_asoc_dma, &s5p6450_device_iis0, + &s3c_device_hsmmc0, + &s3c_device_hsmmc1, + &s3c_device_hsmmc2, /* s5p6450_device_spi0 will be added */ }; @@ -185,6 +191,10 @@ static void __init smdk6450_machine_init(void) samsung_bl_set(&smdk6450_bl_gpio_info, &smdk6450_bl_data); + s3c_sdhci0_set_platdata(&smdk64x0_hsmmc0_pdata); + s3c_sdhci1_set_platdata(&smdk64x0_hsmmc1_pdata); + s3c_sdhci2_set_platdata(&smdk64x0_hsmmc2_pdata); + platform_add_devices(smdk6450_devices, ARRAY_SIZE(smdk6450_devices)); } diff --git a/arch/arm/mach-s5p64x0/s5p64x0-common-sdhci.c b/arch/arm/mach-s5p64x0/s5p64x0-common-sdhci.c new file mode 100644 index 0000000..03d89f6 --- /dev/null +++ b/arch/arm/mach-s5p64x0/s5p64x0-common-sdhci.c @@ -0,0 +1,34 @@ +/* linux/arch/arm/mach-s5p64x0/s5p64x0-common-sdhci.c + * + * Copyright (c) 2011 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +#include +#include +#include + +#include + +struct s3c_sdhci_platdata smdk64x0_hsmmc0_pdata __initdata = { + .cd_type = S3C_SDHCI_CD_NONE, + .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, +}; + +struct s3c_sdhci_platdata smdk64x0_hsmmc1_pdata __initdata = { + .cd_type = S3C_SDHCI_CD_NONE, +#if defined(CONFIG_S5P64X0_SD_CH1_8BIT) + .max_width = 8, + .host_caps = MMC_CAP_8_BIT_DATA, +#endif + .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, +}; + +struct s3c_sdhci_platdata smdk64x0_hsmmc2_pdata __initdata = { + .cd_type = S3C_SDHCI_CD_NONE, + .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, +};