From 19206b174222f0ffef025fe53c9fbd4ab536fcfb Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Fri, 23 Jul 2010 09:27:18 +0900 Subject: ARM: SAMSUNG: Add new s3c-sdhci card detection methods for Samsung SoCs On some Samsung SoCs not all SDHCI controllers have card detect (CD) line. For some embedded designs it is not even needed, because ususally the device (like SDIO flash memory or wifi controller) is permanently wired to the controller. There are also systems which have a card detect line connected to some of the external interrupt lines or the presence of the card depends on some other actions (like enabling a power regulator). This patch adds all required changes to platform support code, so another patch, which extends the driver with support for the new card detection methods can be applied. Signed-off-by: Marek Szyprowski Signed-off-by: Kyungmin Park [kgene.kim@samsung.com: minor title and coding-style fixes] [kgene.kim@samsung.com: fix build errors] Signed-off-by: Kukjin Kim --- arch/arm/plat-samsung/dev-hsmmc1.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/arm/plat-samsung/dev-hsmmc1.c') diff --git a/arch/arm/plat-samsung/dev-hsmmc1.c b/arch/arm/plat-samsung/dev-hsmmc1.c index e49bc4cd0ee6..1504fd802865 100644 --- a/arch/arm/plat-samsung/dev-hsmmc1.c +++ b/arch/arm/plat-samsung/dev-hsmmc1.c @@ -60,6 +60,11 @@ void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd) struct s3c_sdhci_platdata *set = &s3c_hsmmc1_def_platdata; set->max_width = pd->max_width; + set->cd_type = pd->cd_type; + set->ext_cd_init = pd->ext_cd_init; + set->ext_cd_cleanup = pd->ext_cd_cleanup; + set->ext_cd_gpio = pd->ext_cd_gpio; + set->ext_cd_gpio_invert = pd->ext_cd_gpio_invert; if (pd->cfg_gpio) set->cfg_gpio = pd->cfg_gpio; -- cgit v1.2.3 From 944645c33e4ada914f4c045525a9293610085ccd Mon Sep 17 00:00:00 2001 From: Kyungmin Park Date: Thu, 19 Aug 2010 14:13:34 -0700 Subject: s5pc110: SDHCI-s3c can override host capabilities Each board can override the default sdhci host capabilities. Some board has broken features by hardwares and support 8-bit bandwidth. Signed-off-by: Kyungmin Park Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/arm/plat-samsung/dev-hsmmc1.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm/plat-samsung/dev-hsmmc1.c') diff --git a/arch/arm/plat-samsung/dev-hsmmc1.c b/arch/arm/plat-samsung/dev-hsmmc1.c index 1504fd802865..a6c8295840af 100644 --- a/arch/arm/plat-samsung/dev-hsmmc1.c +++ b/arch/arm/plat-samsung/dev-hsmmc1.c @@ -70,4 +70,6 @@ void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd) set->cfg_gpio = pd->cfg_gpio; if (pd->cfg_card) set->cfg_card = pd->cfg_card; + if (pd->host_caps) + set->host_caps = pd->host_caps; } -- cgit v1.2.3 From 40fcd5b9bf27a8ea78df434a92f3d87533a13fc4 Mon Sep 17 00:00:00 2001 From: Hyuk Lee Date: Fri, 8 Oct 2010 18:03:23 +0900 Subject: ARM: SAMSUNG: Modified to change of bus width and host caps This patch adds to change bus width and host capability of HSMMC, when HSMMC is only configured with another value of bus width and host capability from default one. Signed-off-by: Hyuk Lee Signed-off-by: Jeongbae Seo Signed-off-by: Kukjin Kim --- arch/arm/plat-samsung/dev-hsmmc1.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'arch/arm/plat-samsung/dev-hsmmc1.c') diff --git a/arch/arm/plat-samsung/dev-hsmmc1.c b/arch/arm/plat-samsung/dev-hsmmc1.c index a6c8295840af..9b52828644d6 100644 --- a/arch/arm/plat-samsung/dev-hsmmc1.c +++ b/arch/arm/plat-samsung/dev-hsmmc1.c @@ -59,17 +59,18 @@ void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd) { struct s3c_sdhci_platdata *set = &s3c_hsmmc1_def_platdata; - set->max_width = pd->max_width; set->cd_type = pd->cd_type; set->ext_cd_init = pd->ext_cd_init; set->ext_cd_cleanup = pd->ext_cd_cleanup; set->ext_cd_gpio = pd->ext_cd_gpio; set->ext_cd_gpio_invert = pd->ext_cd_gpio_invert; + if (pd->max_width) + set->max_width = pd->max_width; if (pd->cfg_gpio) set->cfg_gpio = pd->cfg_gpio; if (pd->cfg_card) set->cfg_card = pd->cfg_card; if (pd->host_caps) - set->host_caps = pd->host_caps; + set->host_caps |= pd->host_caps; } -- cgit v1.2.3 From 28c80aa707156d83f679442ea745db301316a4ea Mon Sep 17 00:00:00 2001 From: Jeongbae Seo Date: Fri, 8 Oct 2010 18:03:27 +0900 Subject: ARM: SAMSUNG: Add clock types into platform data This patch adds clock types into platform data to support external clock divider instead of internal clock divider. It is defined that what kinds of clock type is used in machine. Signed-off-by: Jeongbae Seo Signed-off-by: Kukjin Kim --- arch/arm/plat-samsung/dev-hsmmc1.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/arm/plat-samsung/dev-hsmmc1.c') diff --git a/arch/arm/plat-samsung/dev-hsmmc1.c b/arch/arm/plat-samsung/dev-hsmmc1.c index 9b52828644d6..2497321f08d7 100644 --- a/arch/arm/plat-samsung/dev-hsmmc1.c +++ b/arch/arm/plat-samsung/dev-hsmmc1.c @@ -41,6 +41,7 @@ struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata = { .max_width = 4, .host_caps = (MMC_CAP_4_BIT_DATA | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), + .clk_type = S3C_SDHCI_CLK_DIV_INTERNAL, }; struct platform_device s3c_device_hsmmc1 = { @@ -73,4 +74,6 @@ void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd) set->cfg_card = pd->cfg_card; if (pd->host_caps) set->host_caps |= pd->host_caps; + if (pd->clk_type) + set->clk_type = pd->clk_type; } -- cgit v1.2.3