Alan, Cannot find you patch for sdhci.c for reset -- can you send it to me. The approach of having a reset call into the platform specific code is fine. This is the way I implemented our code originally but .... this was not felt when I did the code as the right direction to go in. What I did in my code was call back into the driver reset and then reset the private registers. I felt this gave me more control. Philip On Sep 24, 2010, at 10:26 AM, Alan Cox wrote: > On Fri, 24 Sep 2010 09:42:15 -0700 > Philip Rakity <prakity@xxxxxxxxxxx> wrote: > >>> From 9d64df0fa6874371446147f67c071e78c587c0d6 Mon Sep 17 00:00:00 2001 >> From: Philip Rakity <prakity@xxxxxxxxxxx> >> Date: Fri, 24 Sep 2010 05:27:11 -0700 >> Subject: [PATCH] sdhci: allow controller private registers to be changaed on reset >> >> allow controllers that have private registers that are reset when >> the controller is reset. They need to be reprogrammed back to their >> values when the reset happens. Provide a hook to allow this to happen. >> >> Signed-off-by: Philip Rakity <prakity@xxxxxxxxxxx> >> --- >> drivers/mmc/host/sdhci.c | 3 +++ >> drivers/mmc/host/sdhci.h | 1 + >> 2 files changed, 4 insertions(+), 0 deletions(-) >> >> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c >> index 401527d..0774dad 100644 >> --- a/drivers/mmc/host/sdhci.c >> +++ b/drivers/mmc/host/sdhci.c >> @@ -174,6 +174,9 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask) >> >> if (host->quirks & SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET) >> sdhci_clear_set_irqs(host, SDHCI_INT_ALL_MASK, ier); >> + >> + if (host->ops->platform_specific_reset) >> + host->ops->platform_specific_reset(host, mask); >> } >> >> static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios); >> diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h >> index d316bc7..f68af47 100644 >> --- a/drivers/mmc/host/sdhci.h >> +++ b/drivers/mmc/host/sdhci.h >> @@ -323,6 +323,7 @@ struct sdhci_ops { >> unsigned int (*get_max_clock)(struct sdhci_host *host); >> unsigned int (*get_min_clock)(struct sdhci_host *host); >> unsigned int (*get_timeout_clock)(struct sdhci_host *host); >> + void (*platform_specific_reset)(struct sdhci_host *host, u8 mask); > > See the patches I posted earlier about reset. All of sdhci_reset could be > cleaned up further by replacing sdhci_reset as a whole with a hookable > interface, and the hook you propose isn't sufficient for the Intel > devices, nor can it eliminate some of the other quirk flags. > > Alan -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html