* [PATCH v3] Samsung: sdhci-s3c: add support for new card detection methods
@ 2010-07-15 8:15 Marek Szyprowski
2010-07-15 20:39 ` Andrew Morton
0 siblings, 1 reply; 8+ messages in thread
From: Marek Szyprowski @ 2010-07-15 8:15 UTC (permalink / raw)
To: linux-arm-kernel
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 support for all these cases. The following card
detection methods are possible:
1. internal sdhci host card detect line
2. external event
3. external gpio interrupt
4. no card detect line, controller will poll for the card
5. no card detect line, card is permanently wired to the controller
(once detected host won't poll it any more)
By default, all existing code would use method #1, what is compatible
with the previous version of the driver.
In case of external event, two callbacks must be provided in platdata:
ext_cd_init and ext_cd_cleanup. Both of them get a callback to a
function that notifies the s3c-sdhci host contoller as their argument.
That callback function should be called from the even dispatcher to let
host notice the card insertion/removal.
In case of external gpio interrupt, a gpio pin number must be provided
in platdata (ext_cd_gpio parameter), as well as the information about
the polarity of that gpio pin (ext_cd_gpio_invert). By default
(ext_cd_gpio_invert == 0) gpio value 0 means 'card has been removed',
but this can be changed to 'card has been removed' when
ext_cd_gpio_invert == 1.
This patch adds all required changes to platform support code.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
This a resend of the previous patch. Relevant patches for sdhci-s3c
driver has been posted in a separate patch series for easier merging,
please refer to the "[PATCH] SDHCI-S3C fixes and enhancements (driver
specific code)" thread. They have been already taken by Andrew Morton
into his patch tracking tree.
I hope these changes to platform specific code gets merged soon, so the
changes to the driver can be merged as well.
The patch has been prepared for the following git tree:
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git for-next
Changes since V2:
- added support for HSMMC3 device
Changes since V1:
- added support for gpio external interrupt card based detect method
directly to sdhci-s3c driver
- removed s3c64xx compilation fix patch from the series
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
---
arch/arm/mach-s3c64xx/setup-sdhci-gpio.c | 14 +++++++++---
arch/arm/mach-s5pc100/setup-sdhci-gpio.c | 21 ++++++++++++++-----
arch/arm/mach-s5pv210/setup-sdhci-gpio.c | 22 +++++++++++++++-----
arch/arm/plat-samsung/dev-hsmmc.c | 5 ++++
arch/arm/plat-samsung/dev-hsmmc1.c | 5 ++++
arch/arm/plat-samsung/dev-hsmmc2.c | 5 ++++
arch/arm/plat-samsung/dev-hsmmc3.c | 5 ++++
arch/arm/plat-samsung/include/plat/sdhci.h | 29 ++++++++++++++++++++++++++++
8 files changed, 90 insertions(+), 16 deletions(-)
diff --git a/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c b/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c
index a58c0cc..54c311c 100644
--- a/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c
+++ b/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c
@@ -22,6 +22,7 @@
void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
{
+ struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
unsigned int gpio;
unsigned int end;
@@ -33,12 +34,15 @@ void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
}
- s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP);
- s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(2));
+ if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) {
+ s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP);
+ s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(2));
+ }
}
void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width)
{
+ struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
unsigned int gpio;
unsigned int end;
@@ -50,8 +54,10 @@ void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width)
s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
}
- s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP);
- s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(3));
+ if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) {
+ s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP);
+ s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(3));
+ }
}
void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width)
diff --git a/arch/arm/mach-s5pc100/setup-sdhci-gpio.c b/arch/arm/mach-s5pc100/setup-sdhci-gpio.c
index 7769c76..e4b6739 100644
--- a/arch/arm/mach-s5pc100/setup-sdhci-gpio.c
+++ b/arch/arm/mach-s5pc100/setup-sdhci-gpio.c
@@ -23,6 +23,7 @@
void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
{
+ struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
unsigned int gpio;
unsigned int end;
unsigned int num;
@@ -47,12 +48,15 @@ void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
}
}
- s3c_gpio_setpull(S5PC100_GPG1(2), S3C_GPIO_PULL_UP);
- s3c_gpio_cfgpin(S5PC100_GPG1(2), S3C_GPIO_SFN(2));
+ if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) {
+ s3c_gpio_setpull(S5PC100_GPG1(2), S3C_GPIO_PULL_UP);
+ s3c_gpio_cfgpin(S5PC100_GPG1(2), S3C_GPIO_SFN(2));
+ }
}
void s5pc100_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width)
{
+ struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
unsigned int gpio;
unsigned int end;
@@ -64,12 +68,15 @@ void s5pc100_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width)
s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
}
- s3c_gpio_setpull(S5PC100_GPG2(6), S3C_GPIO_PULL_UP);
- s3c_gpio_cfgpin(S5PC100_GPG2(6), S3C_GPIO_SFN(2));
+ if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) {
+ s3c_gpio_setpull(S5PC100_GPG2(6), S3C_GPIO_PULL_UP);
+ s3c_gpio_cfgpin(S5PC100_GPG2(6), S3C_GPIO_SFN(2));
+ }
}
void s5pc100_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width)
{
+ struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
unsigned int gpio;
unsigned int end;
@@ -81,6 +88,8 @@ void s5pc100_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width)
s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
}
- s3c_gpio_setpull(S5PC100_GPG3(6), S3C_GPIO_PULL_UP);
- s3c_gpio_cfgpin(S5PC100_GPG3(6), S3C_GPIO_SFN(2));
+ if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) {
+ s3c_gpio_setpull(S5PC100_GPG3(6), S3C_GPIO_PULL_UP);
+ s3c_gpio_cfgpin(S5PC100_GPG3(6), S3C_GPIO_SFN(2));
+ }
}
diff --git a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c b/arch/arm/mach-s5pv210/setup-sdhci-gpio.c
index fe7d86d..b3ad243 100644
--- a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c
+++ b/arch/arm/mach-s5pv210/setup-sdhci-gpio.c
@@ -21,9 +21,11 @@
#include <mach/gpio.h>
#include <plat/gpio-cfg.h>
#include <plat/regs-sdhci.h>
+#include <plat/sdhci.h>
void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
{
+ struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
unsigned int gpio;
/* Set all the necessary GPG0/GPG1 pins to special-function 2 */
@@ -48,12 +50,15 @@ void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
break;
}
- s3c_gpio_setpull(S5PV210_GPG0(2), S3C_GPIO_PULL_UP);
- s3c_gpio_cfgpin(S5PV210_GPG0(2), S3C_GPIO_SFN(2));
+ if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) {
+ s3c_gpio_setpull(S5PV210_GPG0(2), S3C_GPIO_PULL_UP);
+ s3c_gpio_cfgpin(S5PV210_GPG0(2), S3C_GPIO_SFN(2));
+ }
}
void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width)
{
+ struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
unsigned int gpio;
/* Set all the necessary GPG1[0:1] pins to special-function 2 */
@@ -68,12 +73,15 @@ void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width)
s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
}
- s3c_gpio_setpull(S5PV210_GPG1(2), S3C_GPIO_PULL_UP);
- s3c_gpio_cfgpin(S5PV210_GPG1(2), S3C_GPIO_SFN(2));
+ if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) {
+ s3c_gpio_setpull(S5PV210_GPG1(2), S3C_GPIO_PULL_UP);
+ s3c_gpio_cfgpin(S5PV210_GPG1(2), S3C_GPIO_SFN(2));
+ }
}
void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width)
{
+ struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
unsigned int gpio;
/* Set all the necessary GPG2[0:1] pins to special-function 2 */
@@ -99,6 +107,8 @@ void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width)
break;
}
- s3c_gpio_setpull(S5PV210_GPG2(2), S3C_GPIO_PULL_UP);
- s3c_gpio_cfgpin(S5PV210_GPG2(2), S3C_GPIO_SFN(2));
+ if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) {
+ s3c_gpio_setpull(S5PV210_GPG2(2), S3C_GPIO_PULL_UP);
+ s3c_gpio_cfgpin(S5PV210_GPG2(2), S3C_GPIO_SFN(2));
+ }
}
diff --git a/arch/arm/plat-samsung/dev-hsmmc.c b/arch/arm/plat-samsung/dev-hsmmc.c
index 4c05b39..b0f93f1 100644
--- a/arch/arm/plat-samsung/dev-hsmmc.c
+++ b/arch/arm/plat-samsung/dev-hsmmc.c
@@ -60,6 +60,11 @@ void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd)
struct s3c_sdhci_platdata *set = &s3c_hsmmc0_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;
diff --git a/arch/arm/plat-samsung/dev-hsmmc1.c b/arch/arm/plat-samsung/dev-hsmmc1.c
index e49bc4c..1504fd8 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;
diff --git a/arch/arm/plat-samsung/dev-hsmmc2.c b/arch/arm/plat-samsung/dev-hsmmc2.c
index 824580b..b28ef17 100644
--- a/arch/arm/plat-samsung/dev-hsmmc2.c
+++ b/arch/arm/plat-samsung/dev-hsmmc2.c
@@ -61,6 +61,11 @@ void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd)
struct s3c_sdhci_platdata *set = &s3c_hsmmc2_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;
diff --git a/arch/arm/plat-samsung/dev-hsmmc3.c b/arch/arm/plat-samsung/dev-hsmmc3.c
index 57bd394..85aaf0f 100644
--- a/arch/arm/plat-samsung/dev-hsmmc3.c
+++ b/arch/arm/plat-samsung/dev-hsmmc3.c
@@ -64,6 +64,11 @@ void s3c_sdhci3_set_platdata(struct s3c_sdhci_platdata *pd)
struct s3c_sdhci_platdata *set = &s3c_hsmmc3_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;
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h
index c52c6f0..2abb08a 100644
--- a/arch/arm/plat-samsung/include/plat/sdhci.h
+++ b/arch/arm/plat-samsung/include/plat/sdhci.h
@@ -20,10 +20,31 @@ struct mmc_host;
struct mmc_card;
struct mmc_ios;
+enum cd_types {
+ S3C_SDHCI_CD_INTERNAL, /* use mmc internal CD line */
+ S3C_SDHCI_CD_EXTERNAL, /* use external callback */
+ S3C_SDHCI_CD_GPIO, /* use external gpio pin for CD line */
+ S3C_SDHCI_CD_NONE, /* no CD line, use polling to detect card */
+ S3C_SDHCI_CD_PERMANENT, /* no CD line, card permanently wired to host */
+};
+
/**
* struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI
* @max_width: The maximum number of data bits supported.
* @host_caps: Standard MMC host capabilities bit field.
+ * @cd_type: Type of Card Detection method (see cd_types enum above)
+ * @ext_cd_init: Initialize external card detect subsystem. Called on
+ * sdhci-s3c driver probe when cd_type == S3C_SDHCI_CD_EXTERNAL.
+ * notify_func argument is a callback to the sdhci-s3c driver
+ * that triggers the card detection event. Callback arguments:
+ * dev is pointer to platform device of the host controller,
+ * state is new state of the card (0 - removed, 1 - inserted).
+ * @ext_cd_cleanup: Cleanup external card detect subsystem. Called on
+ * sdhci-s3c driver remove when cd_type == S3C_SDHCI_CD_EXTERNAL.
+ * notify_func argument is the same callback as for ext_cd_init.
+ * @ext_cd_gpio: gpio pin used for external CD line, valid only if
+ * cd_type == S3C_SDHCI_CD_GPIO
+ * @ext_cd_gpio_invert: invert values for external CD gpio line
* @cfg_gpio: Configure the GPIO for a specific card bit-width
* @cfg_card: Configure the interface for a specific card and speed. This
* is necessary the controllers and/or GPIO blocks require the
@@ -37,9 +58,17 @@ struct mmc_ios;
struct s3c_sdhci_platdata {
unsigned int max_width;
unsigned int host_caps;
+ enum cd_types cd_type;
char **clocks; /* set of clock sources */
+ int ext_cd_gpio;
+ bool ext_cd_gpio_invert;
+ int (*ext_cd_init)(void (*notify_func)(struct platform_device *,
+ int state));
+ int (*ext_cd_cleanup)(void (*notify_func)(struct platform_device *,
+ int state));
+
void (*cfg_gpio)(struct platform_device *dev, int width);
void (*cfg_card)(struct platform_device *dev,
void __iomem *regbase,
--
1.7.1.569.g6f426
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3] Samsung: sdhci-s3c: add support for new card detection methods
2010-07-15 8:15 [PATCH v3] Samsung: sdhci-s3c: add support for new card detection methods Marek Szyprowski
@ 2010-07-15 20:39 ` Andrew Morton
2010-07-16 6:24 ` Marek Szyprowski
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2010-07-15 20:39 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 15 Jul 2010 10:15:21 +0200
Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> 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 support for all these cases. The following card
> detection methods are possible:
>
> 1. internal sdhci host card detect line
> 2. external event
> 3. external gpio interrupt
> 4. no card detect line, controller will poll for the card
> 5. no card detect line, card is permanently wired to the controller
> (once detected host won't poll it any more)
>
> By default, all existing code would use method #1, what is compatible
> with the previous version of the driver.
>
> In case of external event, two callbacks must be provided in platdata:
> ext_cd_init and ext_cd_cleanup. Both of them get a callback to a
> function that notifies the s3c-sdhci host contoller as their argument.
> That callback function should be called from the even dispatcher to let
> host notice the card insertion/removal.
>
> In case of external gpio interrupt, a gpio pin number must be provided
> in platdata (ext_cd_gpio parameter), as well as the information about
> the polarity of that gpio pin (ext_cd_gpio_invert). By default
> (ext_cd_gpio_invert == 0) gpio value 0 means 'card has been removed',
> but this can be changed to 'card has been removed' when
> ext_cd_gpio_invert == 1.
>
> This patch adds all required changes to platform support code.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
>
> This a resend of the previous patch. Relevant patches for sdhci-s3c
> driver has been posted in a separate patch series for easier merging,
> please refer to the "[PATCH] SDHCI-S3C fixes and enhancements (driver
> specific code)" thread. They have been already taken by Andrew Morton
> into his patch tracking tree.
>
> I hope these changes to platform specific code gets merged soon, so the
> changes to the driver can be merged as well.
>
> The patch has been prepared for the following git tree:
> git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git for-next
>
> Changes since V2:
> - added support for HSMMC3 device
>
> Changes since V1:
> - added support for gpio external interrupt card based detect method
> directly to sdhci-s3c driver
> - removed s3c64xx compilation fix patch from the series
>
> Best regards
> --
> Marek Szyprowski
> Samsung Poland R&D Center
>
> ---
>
> arch/arm/mach-s3c64xx/setup-sdhci-gpio.c | 14 +++++++++---
> arch/arm/mach-s5pc100/setup-sdhci-gpio.c | 21 ++++++++++++++-----
> arch/arm/mach-s5pv210/setup-sdhci-gpio.c | 22 +++++++++++++++-----
> arch/arm/plat-samsung/dev-hsmmc.c | 5 ++++
> arch/arm/plat-samsung/dev-hsmmc1.c | 5 ++++
> arch/arm/plat-samsung/dev-hsmmc2.c | 5 ++++
> arch/arm/plat-samsung/dev-hsmmc3.c | 5 ++++
> arch/arm/plat-samsung/include/plat/sdhci.h | 29 ++++++++++++++++++++++++++++
> 8 files changed, 90 insertions(+), 16 deletions(-)
This is quite confusing. You've already sent a patch called
"sdhci-s3c: add support for new card detection methods". It had the
same changelog as this patch and the same title, but the two patches
are utterly different!
I suggest that you resend this patch under an appropriate title and
with a more specific changelog, please.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3] Samsung: sdhci-s3c: add support for new card detection methods
2010-07-15 20:39 ` Andrew Morton
@ 2010-07-16 6:24 ` Marek Szyprowski
2010-07-21 23:11 ` Andrew Morton
0 siblings, 1 reply; 8+ messages in thread
From: Marek Szyprowski @ 2010-07-16 6:24 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On Thursday, July 15, 2010 10:40 PM Andrew Morton wrote:
> On Thu, 15 Jul 2010 10:15:21 +0200
> Marek Szyprowski <m.szyprowski@samsung.com> wrote:
>
> > 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 support for all these cases. The following card
> > detection methods are possible:
> >
> > 1. internal sdhci host card detect line
> > 2. external event
> > 3. external gpio interrupt
> > 4. no card detect line, controller will poll for the card
> > 5. no card detect line, card is permanently wired to the controller
> > (once detected host won't poll it any more)
> >
> > By default, all existing code would use method #1, what is compatible
> > with the previous version of the driver.
> >
> > In case of external event, two callbacks must be provided in platdata:
> > ext_cd_init and ext_cd_cleanup. Both of them get a callback to a
> > function that notifies the s3c-sdhci host contoller as their argument.
> > That callback function should be called from the even dispatcher to let
> > host notice the card insertion/removal.
> >
> > In case of external gpio interrupt, a gpio pin number must be provided
> > in platdata (ext_cd_gpio parameter), as well as the information about
> > the polarity of that gpio pin (ext_cd_gpio_invert). By default
> > (ext_cd_gpio_invert == 0) gpio value 0 means 'card has been removed',
> > but this can be changed to 'card has been removed' when
> > ext_cd_gpio_invert == 1.
> >
> > This patch adds all required changes to platform support code.
> >
> > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > ---
> >
> > This a resend of the previous patch. Relevant patches for sdhci-s3c
> > driver has been posted in a separate patch series for easier merging,
> > please refer to the "[PATCH] SDHCI-S3C fixes and enhancements (driver
> > specific code)" thread. They have been already taken by Andrew Morton
> > into his patch tracking tree.
> >
> > I hope these changes to platform specific code gets merged soon, so the
> > changes to the driver can be merged as well.
> >
> > The patch has been prepared for the following git tree:
> > git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
> for-next
> >
> > Changes since V2:
> > - added support for HSMMC3 device
> >
> > Changes since V1:
> > - added support for gpio external interrupt card based detect method
> > directly to sdhci-s3c driver
> > - removed s3c64xx compilation fix patch from the series
> >
> > Best regards
> > --
> > Marek Szyprowski
> > Samsung Poland R&D Center
> >
> > ---
> >
> > arch/arm/mach-s3c64xx/setup-sdhci-gpio.c | 14 +++++++++---
> > arch/arm/mach-s5pc100/setup-sdhci-gpio.c | 21 ++++++++++++++-----
> > arch/arm/mach-s5pv210/setup-sdhci-gpio.c | 22 +++++++++++++++-----
> > arch/arm/plat-samsung/dev-hsmmc.c | 5 ++++
> > arch/arm/plat-samsung/dev-hsmmc1.c | 5 ++++
> > arch/arm/plat-samsung/dev-hsmmc2.c | 5 ++++
> > arch/arm/plat-samsung/dev-hsmmc3.c | 5 ++++
> > arch/arm/plat-samsung/include/plat/sdhci.h | 29
> ++++++++++++++++++++++++++++
> > 8 files changed, 90 insertions(+), 16 deletions(-)
>
> This is quite confusing. You've already sent a patch called
> "sdhci-s3c: add support for new card detection methods". It had the
> same changelog as this patch and the same title, but the two patches
> are utterly different!
The real patch has been split into two for easier merging: 1. the driver
part and 2. samsung platform related part. The part which patch belongs
to is indicated in the last line of the change log.
I'm really confused how to submit properly a patch that requires changes
to both the driver (which is merged by the proper driver maintainer's
sub-tree) and the platform (which should go through platform maintainer's
tree).
> I suggest that you resend this patch under an appropriate title and
> with a more specific changelog, please.
Ok, I will add something like "(platform changes)" to the patch title next time.
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3] Samsung: sdhci-s3c: add support for new card detection methods
2010-07-16 6:24 ` Marek Szyprowski
@ 2010-07-21 23:11 ` Andrew Morton
2010-07-22 8:25 ` Marek Szyprowski
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2010-07-21 23:11 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, 16 Jul 2010 08:24:26 +0200
Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> > > arch/arm/mach-s3c64xx/setup-sdhci-gpio.c | 14 +++++++++---
> > > arch/arm/mach-s5pc100/setup-sdhci-gpio.c | 21 ++++++++++++++-----
> > > arch/arm/mach-s5pv210/setup-sdhci-gpio.c | 22 +++++++++++++++-----
> > > arch/arm/plat-samsung/dev-hsmmc.c | 5 ++++
> > > arch/arm/plat-samsung/dev-hsmmc1.c | 5 ++++
> > > arch/arm/plat-samsung/dev-hsmmc2.c | 5 ++++
> > > arch/arm/plat-samsung/dev-hsmmc3.c | 5 ++++
> > > arch/arm/plat-samsung/include/plat/sdhci.h | 29
> > ++++++++++++++++++++++++++++
> > > 8 files changed, 90 insertions(+), 16 deletions(-)
> >
> > This is quite confusing. You've already sent a patch called
> > "sdhci-s3c: add support for new card detection methods". It had the
> > same changelog as this patch and the same title, but the two patches
> > are utterly different!
>
> The real patch has been split into two for easier merging: 1. the driver
> part and 2. samsung platform related part. The part which patch belongs
> to is indicated in the last line of the change log.
>
> I'm really confused how to submit properly a patch that requires changes
> to both the driver (which is merged by the proper driver maintainer's
> sub-tree) and the platform (which should go through platform maintainer's
> tree).
Make the relationship very very clear in the changelog. Send both
patches to both maintainers. Ask that one of them merge both patches
and that the other ack both patches.
Anyway, I've forgotten what's happening here. I appear to be sitting on
sdhci-s3c-add-support-for-the-non-standard-minimal-clock-value.patch
and
sdhci-s3c-add-support-for-new-card-detection-methods.patch
the latter of which is below.
Am I missing something? Is
sdhci-s3c-add-support-for-new-card-detection-methods.patch up to date?
From: Marek Szyprowski <m.szyprowski@samsung.com>
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 support for all these cases. The following card detection
methods are possible:
1. internal sdhci host card detect line
2. external event
3. external gpio interrupt
4. no card detect line, controller will poll for the card
5. no card detect line, card is permanently wired to the controller
(once detected host won't poll it any more)
By default, all existing code would use method #1, what is compatible with
the previous version of the driver.
In case of external event, two callbacks must be provided in platdata:
ext_cd_init and ext_cd_cleanup. Both of them get a callback to a function
that notifies the s3c-sdhci host contoller as their argument. That
callback function should be called from the even dispatcher to let host
notice the card insertion/removal.
In case of external gpio interrupt, a gpio pin number must be provided in
platdata (ext_cd_gpio parameter), as well as the information about the
polarity of that gpio pin (ext_cd_gpio_invert). By default
(ext_cd_gpio_invert == 0) gpio value 0 means 'card has been removed', but
this can be changed to 'card has been removed' when ext_cd_gpio_invert ==
1.
This patch adds changes to sdhci-s3c driver.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/mmc/host/sdhci-s3c.c | 75 +++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)
diff -puN drivers/mmc/host/sdhci-s3c.c~sdhci-s3c-add-support-for-new-card-detection-methods drivers/mmc/host/sdhci-s3c.c
--- a/drivers/mmc/host/sdhci-s3c.c~sdhci-s3c-add-support-for-new-card-detection-methods
+++ a/drivers/mmc/host/sdhci-s3c.c
@@ -18,6 +18,7 @@
#include <linux/slab.h>
#include <linux/clk.h>
#include <linux/io.h>
+#include <linux/gpio.h>
#include <linux/mmc/host.h>
@@ -44,6 +45,8 @@ struct sdhci_s3c {
struct resource *ioarea;
struct s3c_sdhci_platdata *pdata;
unsigned int cur_clk;
+ int ext_cd_irq;
+ int ext_cd_gpio;
struct clk *clk_io;
struct clk *clk_bus[MAX_BUS_CLK];
@@ -242,6 +245,39 @@ static struct sdhci_ops sdhci_s3c_ops =
.get_min_clock = sdhci_s3c_get_min_clock,
};
+static void sdhci_s3c_notify_change(struct platform_device *dev, int state)
+{
+ struct sdhci_host *host;
+ unsigned long flags;
+
+ host = platform_get_drvdata(dev);
+ if (host) {
+ spin_lock_irqsave(&host->lock, flags);
+ if (state) {
+ dev_dbg(&dev->dev, "card inserted.\n");
+ host->flags &= ~SDHCI_DEVICE_DEAD;
+ host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
+ tasklet_schedule(&host->card_tasklet);
+ } else {
+ dev_dbg(&dev->dev, "card removed.\n");
+ host->flags |= SDHCI_DEVICE_DEAD;
+ host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
+ tasklet_schedule(&host->card_tasklet);
+ }
+ spin_unlock_irqrestore(&host->lock, flags);
+ }
+}
+
+static irqreturn_t sdhci_s3c_gpio_card_detect_isr(int irq, void *dev_id)
+{
+ struct sdhci_s3c *sc = dev_id;
+ int status = gpio_get_value(sc->ext_cd_gpio);
+ if (sc->pdata->ext_cd_gpio_invert)
+ status = !status;
+ sdhci_s3c_notify_change(sc->pdev, status);
+ return IRQ_HANDLED;
+}
+
static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
{
struct s3c_sdhci_platdata *pdata = pdev->dev.platform_data;
@@ -279,6 +315,7 @@ static int __devinit sdhci_s3c_probe(str
sc->host = host;
sc->pdev = pdev;
sc->pdata = pdata;
+ sc->ext_cd_gpio = -1;
platform_set_drvdata(pdev, host);
@@ -361,6 +398,13 @@ static int __devinit sdhci_s3c_probe(str
* SDHCI block, or a missing configuration that needs to be set. */
host->quirks |= SDHCI_QUIRK_NO_BUSY_IRQ;
+ if (pdata->cd_type == S3C_SDHCI_CD_NONE ||
+ pdata->cd_type == S3C_SDHCI_CD_PERMANENT)
+ host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
+
+ if (pdata->cd_type == S3C_SDHCI_CD_PERMANENT)
+ host->mmc->caps = MMC_CAP_NONREMOVABLE;
+
host->quirks |= (SDHCI_QUIRK_32BIT_DMA_ADDR |
SDHCI_QUIRK_32BIT_DMA_SIZE);
@@ -370,6 +414,27 @@ static int __devinit sdhci_s3c_probe(str
goto err_add_host;
}
+ /* pdata->ext_cd_init might call sdhci_s3c_notify_change immediately,
+ so it can be called only after sdhci_add_host() */
+ if (pdata->cd_type == S3C_SDHCI_CD_EXTERNAL && pdata->ext_cd_init)
+ pdata->ext_cd_init(&sdhci_s3c_notify_change);
+
+ if (pdata->cd_type == S3C_SDHCI_CD_GPIO &&
+ gpio_is_valid(pdata->ext_cd_gpio)) {
+
+ gpio_request(pdata->ext_cd_gpio, "SDHCI EXT CD");
+ sc->ext_cd_gpio = pdata->ext_cd_gpio;
+
+ sc->ext_cd_irq = gpio_to_irq(pdata->ext_cd_gpio);
+ if (sc->ext_cd_irq &&
+ request_irq(sc->ext_cd_irq, sdhci_s3c_gpio_card_detect_isr,
+ IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+ dev_name(&pdev->dev), sc)) {
+ dev_err(&pdev->dev, "cannot request irq for card detect\n");
+ sc->ext_cd_irq = 0;
+ }
+ }
+
return 0;
err_add_host:
@@ -394,10 +459,20 @@ static int __devinit sdhci_s3c_probe(str
static int __devexit sdhci_s3c_remove(struct platform_device *pdev)
{
+ struct s3c_sdhci_platdata *pdata = pdev->dev.platform_data;
struct sdhci_host *host = platform_get_drvdata(pdev);
struct sdhci_s3c *sc = sdhci_priv(host);
int ptr;
+ if (pdata->cd_type == S3C_SDHCI_CD_EXTERNAL && pdata->ext_cd_cleanup)
+ pdata->ext_cd_cleanup(&sdhci_s3c_notify_change);
+
+ if (sc->ext_cd_irq)
+ free_irq(sc->ext_cd_irq, sdhci_s3c_gpio_card_detect_isr);
+
+ if (sc->ext_cd_gpio != -1)
+ gpio_free(sc->ext_cd_gpio);
+
sdhci_remove_host(host, 1);
for (ptr = 0; ptr < 3; ptr++) {
_
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3] Samsung: sdhci-s3c: add support for new card detection methods
2010-07-21 23:11 ` Andrew Morton
@ 2010-07-22 8:25 ` Marek Szyprowski
2010-07-26 20:57 ` Andrew Morton
0 siblings, 1 reply; 8+ messages in thread
From: Marek Szyprowski @ 2010-07-22 8:25 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On Thursday, July 22, 2010 1:12 AM
> On Fri, 16 Jul 2010 08:24:26 +0200
> Marek Szyprowski <m.szyprowski@samsung.com> wrote:
>
> > > > arch/arm/mach-s3c64xx/setup-sdhci-gpio.c | 14 +++++++++---
> > > > arch/arm/mach-s5pc100/setup-sdhci-gpio.c | 21 ++++++++++++++----
> -
> > > > arch/arm/mach-s5pv210/setup-sdhci-gpio.c | 22 +++++++++++++++---
> --
> > > > arch/arm/plat-samsung/dev-hsmmc.c | 5 ++++
> > > > arch/arm/plat-samsung/dev-hsmmc1.c | 5 ++++
> > > > arch/arm/plat-samsung/dev-hsmmc2.c | 5 ++++
> > > > arch/arm/plat-samsung/dev-hsmmc3.c | 5 ++++
> > > > arch/arm/plat-samsung/include/plat/sdhci.h | 29
> > > ++++++++++++++++++++++++++++
> > > > 8 files changed, 90 insertions(+), 16 deletions(-)
> > >
> > > This is quite confusing. You've already sent a patch called
> > > "sdhci-s3c: add support for new card detection methods". It had the
> > > same changelog as this patch and the same title, but the two patches
> > > are utterly different!
> >
> > The real patch has been split into two for easier merging: 1. the driver
> > part and 2. samsung platform related part. The part which patch belongs
> > to is indicated in the last line of the change log.
> >
> > I'm really confused how to submit properly a patch that requires changes
> > to both the driver (which is merged by the proper driver maintainer's
> > sub-tree) and the platform (which should go through platform maintainer's
> > tree).
>
> Make the relationship very very clear in the changelog. Send both
> patches to both maintainers. Ask that one of them merge both patches
> and that the other ack both patches.
Ok. Thanks for the hint.
> Anyway, I've forgotten what's happening here. I appear to be sitting on
>
> sdhci-s3c-add-support-for-the-non-standard-minimal-clock-value.patch
This one is independent from the card-detection patches and can be applied
directly onto linux-next kernel tree.
> and
> sdhci-s3c-add-support-for-new-card-detection-methods.patch
>
> the latter of which is below.
>
> Am I missing something? Is
> sdhci-s3c-add-support-for-new-card-detection-methods.patch up to date?
>
Ok, I will repost these 2 patches under new names to avoid further
confusion. Currently there exists two
"sdhci-s3c-add-support-for-new-card-detection-methods.patch", both of them
are required.
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3] Samsung: sdhci-s3c: add support for new card detection methods
2010-07-22 8:25 ` Marek Szyprowski
@ 2010-07-26 20:57 ` Andrew Morton
2010-07-27 6:12 ` Marek Szyprowski
2010-07-27 11:27 ` Kukjin Kim
0 siblings, 2 replies; 8+ messages in thread
From: Andrew Morton @ 2010-07-26 20:57 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 22 Jul 2010 10:25:44 +0200
Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> Hello,
>
> On Thursday, July 22, 2010 1:12 AM
>
> > On Fri, 16 Jul 2010 08:24:26 +0200
> > Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> >
> > > > > arch/arm/mach-s3c64xx/setup-sdhci-gpio.c | 14 +++++++++---
> > > > > arch/arm/mach-s5pc100/setup-sdhci-gpio.c | 21 ++++++++++++++----
> > -
> > > > > arch/arm/mach-s5pv210/setup-sdhci-gpio.c | 22 +++++++++++++++---
> > --
> > > > > arch/arm/plat-samsung/dev-hsmmc.c | 5 ++++
> > > > > arch/arm/plat-samsung/dev-hsmmc1.c | 5 ++++
> > > > > arch/arm/plat-samsung/dev-hsmmc2.c | 5 ++++
> > > > > arch/arm/plat-samsung/dev-hsmmc3.c | 5 ++++
> > > > > arch/arm/plat-samsung/include/plat/sdhci.h | 29
> > > > ++++++++++++++++++++++++++++
> > > > > 8 files changed, 90 insertions(+), 16 deletions(-)
> > > >
> > > > This is quite confusing. You've already sent a patch called
> > > > "sdhci-s3c: add support for new card detection methods". It had the
> > > > same changelog as this patch and the same title, but the two patches
> > > > are utterly different!
> > >
> > > The real patch has been split into two for easier merging: 1. the driver
> > > part and 2. samsung platform related part. The part which patch belongs
> > > to is indicated in the last line of the change log.
> > >
> > > I'm really confused how to submit properly a patch that requires changes
> > > to both the driver (which is merged by the proper driver maintainer's
> > > sub-tree) and the platform (which should go through platform maintainer's
> > > tree).
> >
> > Make the relationship very very clear in the changelog. Send both
> > patches to both maintainers. Ask that one of them merge both patches
> > and that the other ack both patches.
>
> Ok. Thanks for the hint.
>
> > Anyway, I've forgotten what's happening here. I appear to be sitting on
> >
> > sdhci-s3c-add-support-for-the-non-standard-minimal-clock-value.patch
>
> This one is independent from the card-detection patches and can be applied
> directly onto linux-next kernel tree.
>
> > and
> > sdhci-s3c-add-support-for-new-card-detection-methods.patch
> >
> > the latter of which is below.
> >
> > Am I missing something? Is
> > sdhci-s3c-add-support-for-new-card-detection-methods.patch up to date?
> >
>
> Ok, I will repost these 2 patches under new names to avoid further
> confusion. Currently there exists two
> "sdhci-s3c-add-support-for-new-card-detection-methods.patch", both of them
> are required.
So the second(?) patch "[PATCH v4] Samsung: add new card detection
methods in s3c-sdhci driver (platform part)" has already been applied
to linux-next by Kukjin Kim, along with modifications which we have not
been shown.
But the first patch
(sdhci-s3c-add-support-for-the-non-standard-minimal-clock-value.patch)
has not been applied to linux-next by anoyne and the third patch
"[PATCH v4] sdhci-s3c: add support for new card detection methods
(driver part)" has not been applied either.
This is a complete mess. What happens if I apply and merge
sdhci-s3c-add-support-for-the-non-standard-minimal-clock-value.patch
and
sdhci-s3c-add-support-for-new-card-detection-methods-driver-part.patch?
I have no idea.
I think I'll just drop all of it. Please sort all of this out then let
me know what you want me to do.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3] Samsung: sdhci-s3c: add support for new card detection methods
2010-07-26 20:57 ` Andrew Morton
@ 2010-07-27 6:12 ` Marek Szyprowski
2010-07-27 11:27 ` Kukjin Kim
1 sibling, 0 replies; 8+ messages in thread
From: Marek Szyprowski @ 2010-07-27 6:12 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On Monday, July 26, 2010 10:57 PM Andrew Morton wrote:
> On Thu, 22 Jul 2010 10:25:44 +0200
> Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> > On Thursday, July 22, 2010 1:12 AM
> > > On Fri, 16 Jul 2010 08:24:26 +0200
> > > Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> > >
> > > > > > arch/arm/mach-s3c64xx/setup-sdhci-gpio.c | 14 +++++++++---
> > > > > > arch/arm/mach-s5pc100/setup-sdhci-gpio.c | 21
> ++++++++++++++----
> > > -
> > > > > > arch/arm/mach-s5pv210/setup-sdhci-gpio.c | 22
> +++++++++++++++---
> > > --
> > > > > > arch/arm/plat-samsung/dev-hsmmc.c | 5 ++++
> > > > > > arch/arm/plat-samsung/dev-hsmmc1.c | 5 ++++
> > > > > > arch/arm/plat-samsung/dev-hsmmc2.c | 5 ++++
> > > > > > arch/arm/plat-samsung/dev-hsmmc3.c | 5 ++++
> > > > > > arch/arm/plat-samsung/include/plat/sdhci.h | 29
> > > > > ++++++++++++++++++++++++++++
> > > > > > 8 files changed, 90 insertions(+), 16 deletions(-)
> > > > >
> > > > > This is quite confusing. You've already sent a patch called
> > > > > "sdhci-s3c: add support for new card detection methods". It had
> the
> > > > > same changelog as this patch and the same title, but the two
> patches
> > > > > are utterly different!
> > > >
> > > > The real patch has been split into two for easier merging: 1. the
> driver
> > > > part and 2. samsung platform related part. The part which patch
> belongs
> > > > to is indicated in the last line of the change log.
> > > >
> > > > I'm really confused how to submit properly a patch that requires
> changes
> > > > to both the driver (which is merged by the proper driver maintainer's
> > > > sub-tree) and the platform (which should go through platform
> maintainer's
> > > > tree).
> > >
> > > Make the relationship very very clear in the changelog. Send both
> > > patches to both maintainers. Ask that one of them merge both patches
> > > and that the other ack both patches.
> >
> > Ok. Thanks for the hint.
> >
> > > Anyway, I've forgotten what's happening here. I appear to be sitting
> on
> > >
> > > sdhci-s3c-add-support-for-the-non-standard-minimal-clock-value.patch
> >
> > This one is independent from the card-detection patches and can be
> applied
> > directly onto linux-next kernel tree.
> >
> > > and
> > > sdhci-s3c-add-support-for-new-card-detection-methods.patch
> > >
> > > the latter of which is below.
> > >
> > > Am I missing something? Is
> > > sdhci-s3c-add-support-for-new-card-detection-methods.patch up to date?
> > >
> >
> > Ok, I will repost these 2 patches under new names to avoid further
> > confusion. Currently there exists two
> > "sdhci-s3c-add-support-for-new-card-detection-methods.patch", both of
> them
> > are required.
>
> So the second(?) patch "[PATCH v4] Samsung: add new card detection
> methods in s3c-sdhci driver (platform part)" has already been applied
> to linux-next by Kukjin Kim, along with modifications which we have not
> been shown.
>
> But the first patch
> (sdhci-s3c-add-support-for-the-non-standard-minimal-clock-value.patch)
> has not been applied to linux-next by anoyne and the third patch
> "[PATCH v4] sdhci-s3c: add support for new card detection methods
> (driver part)" has not been applied either.
>
> This is a complete mess. What happens if I apply and merge
> sdhci-s3c-add-support-for-the-non-standard-minimal-clock-value.patch
> and
> sdhci-s3c-add-support-for-new-card-detection-methods-driver-part.patch?
> I have no idea.
"[PATCH v4] Samsung: add new card detection methods in s3c-sdhci driver
(platform part)" perform some important changes in platform setup code.
It does not influence the driver itself (the driver can be still compiled
as before and works without changes).
The only changes added by Kukjin Kim were compilation fixes (looks I've
forgot one include on the platform that has not been tested).
This patch is also a prerequisite for "[PATCH v4] sdhci-s3c: add support
for new card detection methods (driver part)".
> I think I'll just drop all of it. Please sort all of this out then let
> me know what you want me to do.
I would to ask not for dropping. As all required platform changes has been
already merged by Kukjin, s
dhci-s3c-add-support-for-the-non-standard-minimal-clock-value.patch and
sdhci-s3c-add-support-for-new-card-detection-methods-driver-part.patch can
be merged without causing compilation break in the 'next' kernel tree.
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3] Samsung: sdhci-s3c: add support for new card detection methods
2010-07-26 20:57 ` Andrew Morton
2010-07-27 6:12 ` Marek Szyprowski
@ 2010-07-27 11:27 ` Kukjin Kim
1 sibling, 0 replies; 8+ messages in thread
From: Kukjin Kim @ 2010-07-27 11:27 UTC (permalink / raw)
To: linux-arm-kernel
Andrew Morton wrote:
>
> On Thu, 22 Jul 2010 10:25:44 +0200
> Marek Szyprowski <m.szyprowski@samsung.com> wrote:
>
> > Hello,
> >
> > On Thursday, July 22, 2010 1:12 AM
> >
> > > On Fri, 16 Jul 2010 08:24:26 +0200
> > > Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> > >
> > > > > > arch/arm/mach-s3c64xx/setup-sdhci-gpio.c | 14 +++++++++---
> > > > > > arch/arm/mach-s5pc100/setup-sdhci-gpio.c | 21
> ++++++++++++++----
> > > -
> > > > > > arch/arm/mach-s5pv210/setup-sdhci-gpio.c | 22
> +++++++++++++++---
> > > --
> > > > > > arch/arm/plat-samsung/dev-hsmmc.c | 5 ++++
> > > > > > arch/arm/plat-samsung/dev-hsmmc1.c | 5 ++++
> > > > > > arch/arm/plat-samsung/dev-hsmmc2.c | 5 ++++
> > > > > > arch/arm/plat-samsung/dev-hsmmc3.c | 5 ++++
> > > > > > arch/arm/plat-samsung/include/plat/sdhci.h | 29
> > > > > ++++++++++++++++++++++++++++
> > > > > > 8 files changed, 90 insertions(+), 16 deletions(-)
> > > > >
> > > > > This is quite confusing. You've already sent a patch called
> > > > > "sdhci-s3c: add support for new card detection methods". It had
the
> > > > > same changelog as this patch and the same title, but the two
patches
> > > > > are utterly different!
> > > >
> > > > The real patch has been split into two for easier merging: 1. the
driver
> > > > part and 2. samsung platform related part. The part which patch
belongs
> > > > to is indicated in the last line of the change log.
> > > >
> > > > I'm really confused how to submit properly a patch that requires
changes
> > > > to both the driver (which is merged by the proper driver
maintainer's
> > > > sub-tree) and the platform (which should go through platform
maintainer's
> > > > tree).
> > >
> > > Make the relationship very very clear in the changelog. Send both
> > > patches to both maintainers. Ask that one of them merge both patches
> > > and that the other ack both patches.
> >
> > Ok. Thanks for the hint.
> >
> > > Anyway, I've forgotten what's happening here. I appear to be sitting
on
> > >
> > > sdhci-s3c-add-support-for-the-non-standard-minimal-clock-value.patch
> >
> > This one is independent from the card-detection patches and can be
applied
> > directly onto linux-next kernel tree.
> >
> > > and
> > > sdhci-s3c-add-support-for-new-card-detection-methods.patch
> > >
> > > the latter of which is below.
> > >
> > > Am I missing something? Is
> > > sdhci-s3c-add-support-for-new-card-detection-methods.patch up to date?
> > >
> >
> > Ok, I will repost these 2 patches under new names to avoid further
> > confusion. Currently there exists two
> > "sdhci-s3c-add-support-for-new-card-detection-methods.patch", both of
them
> > are required.
>
> So the second(?) patch "[PATCH v4] Samsung: add new card detection
> methods in s3c-sdhci driver (platform part)" has already been applied
> to linux-next by Kukjin Kim, along with modifications which we have not
> been shown.
Yeah, I applied it in my tree which can be merged linux-next.
>
> But the first patch
> (sdhci-s3c-add-support-for-the-non-standard-minimal-clock-value.patch)
> has not been applied to linux-next by anoyne and the third patch
> "[PATCH v4] sdhci-s3c: add support for new card detection methods
> (driver part)" has not been applied either.
>
> This is a complete mess. What happens if I apply and merge
> sdhci-s3c-add-support-for-the-non-standard-minimal-clock-value.patch
> and
> sdhci-s3c-add-support-for-new-card-detection-methods-driver-part.patch?
> I have no idea.
Hmm...
>
> I think I'll just drop all of it. Please sort all of this out then let
> me know what you want me to do.
If any updates, please let me know.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-07-27 11:27 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-15 8:15 [PATCH v3] Samsung: sdhci-s3c: add support for new card detection methods Marek Szyprowski
2010-07-15 20:39 ` Andrew Morton
2010-07-16 6:24 ` Marek Szyprowski
2010-07-21 23:11 ` Andrew Morton
2010-07-22 8:25 ` Marek Szyprowski
2010-07-26 20:57 ` Andrew Morton
2010-07-27 6:12 ` Marek Szyprowski
2010-07-27 11:27 ` Kukjin Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox