* [PATCH 7/23] Alternative mmc structure to support pxa168, pxa910, mmp2 family SD
@ 2010-12-22 7:08 Philip Rakity
2010-12-22 23:06 ` Fwd: " Philip Rakity
0 siblings, 1 reply; 3+ messages in thread
From: Philip Rakity @ 2010-12-22 7:08 UTC (permalink / raw)
To: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Mark Brown
[-- Attachment #1: Type: text/plain, Size: 1965 bytes --]
>From 499888df1a52491c201077c8a0f8310b70583290 Mon Sep 17 00:00:00 2001
From: philip <philip@philip-laptop.(none)>
Date: Sat, 11 Dec 2010 16:58:59 -0800
Subject: [PATCH] sdhci: Add pre and post reset processing for chip specific reset
Marvell pxa controllers have private registers that need to be
touched before and after a reset is done. Implement hooks
to allow this to happen.
Signed-off-by: philip <philip@philip-laptop.(none)>
---
drivers/mmc/host/sdhci.c | 6 ++++++
drivers/mmc/host/sdhci.h | 2 ++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index d5febe5..f439881 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -157,6 +157,9 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask)
if (host->quirks & SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET)
ier = sdhci_readl(host, SDHCI_INT_ENABLE);
+ if (host->ops->platform_reset_enter)
+ host->ops->platform_reset_enter(host, mask);
+
sdhci_writeb(host, mask, SDHCI_SOFTWARE_RESET);
if (mask & SDHCI_RESET_ALL)
@@ -177,6 +180,9 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask)
mdelay(1);
}
+ if (host->ops->platform_reset_exit)
+ host->ops->platform_reset_exit(host, mask);
+
if (host->quirks & SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET)
sdhci_clear_set_irqs(host, SDHCI_INT_ALL_MASK, ier);
}
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 6e0969e..9dd7bc1 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -222,6 +222,8 @@ struct sdhci_ops {
void (*platform_send_init_74_clocks)(struct sdhci_host *host,
u8 power_mode);
unsigned int (*get_ro)(struct sdhci_host *host);
+ void (*platform_reset_enter)(struct sdhci_host *host, u8 mask);
+ void (*platform_reset_exit)(struct sdhci_host *host, u8 mask);
};
#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
--
1.6.0.4
[-- Attachment #2: 0007-sdhci-Add-pre-and-post-reset-processing-for-chip-sp.patch --]
[-- Type: application/octet-stream, Size: 1911 bytes --]
From 499888df1a52491c201077c8a0f8310b70583290 Mon Sep 17 00:00:00 2001
From: philip <philip@philip-laptop.(none)>
Date: Sat, 11 Dec 2010 16:58:59 -0800
Subject: [PATCH] sdhci: Add pre and post reset processing for chip specific reset
Marvell pxa controllers have private registers that need to be
touched before and after a reset is done. Implement hooks
to allow this to happen.
Signed-off-by: philip <philip@philip-laptop.(none)>
---
drivers/mmc/host/sdhci.c | 6 ++++++
drivers/mmc/host/sdhci.h | 2 ++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index d5febe5..f439881 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -157,6 +157,9 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask)
if (host->quirks & SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET)
ier = sdhci_readl(host, SDHCI_INT_ENABLE);
+ if (host->ops->platform_reset_enter)
+ host->ops->platform_reset_enter(host, mask);
+
sdhci_writeb(host, mask, SDHCI_SOFTWARE_RESET);
if (mask & SDHCI_RESET_ALL)
@@ -177,6 +180,9 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask)
mdelay(1);
}
+ if (host->ops->platform_reset_exit)
+ host->ops->platform_reset_exit(host, mask);
+
if (host->quirks & SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET)
sdhci_clear_set_irqs(host, SDHCI_INT_ALL_MASK, ier);
}
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 6e0969e..9dd7bc1 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -222,6 +222,8 @@ struct sdhci_ops {
void (*platform_send_init_74_clocks)(struct sdhci_host *host,
u8 power_mode);
unsigned int (*get_ro)(struct sdhci_host *host);
+ void (*platform_reset_enter)(struct sdhci_host *host, u8 mask);
+ void (*platform_reset_exit)(struct sdhci_host *host, u8 mask);
};
#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
--
1.6.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Fwd: [PATCH 7/23] Alternative mmc structure to support pxa168, pxa910, mmp2 family SD
2010-12-22 7:08 [PATCH 7/23] Alternative mmc structure to support pxa168, pxa910, mmp2 family SD Philip Rakity
@ 2010-12-22 23:06 ` Philip Rakity
2010-12-22 23:23 ` Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: Philip Rakity @ 2010-12-22 23:06 UTC (permalink / raw)
To: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Mark Brown, Arnd Bergmann
[-- Attachment #1.1: Type: text/plain, Size: 2607 bytes --]
Resend adding correct name and e-mail for
Signed-off-by:
Begin forwarded message:
From: Philip Rakity <prakity@marvell.com<mailto:prakity@marvell.com>>
Date: December 21, 2010 11:08:35 PM PST
To: "linux-mmc@vger.kernel.org<mailto:linux-mmc@vger.kernel.org>" <linux-mmc@vger.kernel.org<mailto:linux-mmc@vger.kernel.org>>, "linux-arm-kernel@lists.infradead.org<mailto:linux-arm-kernel@lists.infradead.org>" <linux-arm-kernel@lists.infradead.org<mailto:linux-arm-kernel@lists.infradead.org>>
Cc: Mark Brown <markb@marvell.com<mailto:markb@marvell.com>>
Subject: [PATCH 7/23] Alternative mmc structure to support pxa168, pxa910, mmp2 family SD
>From 499888df1a52491c201077c8a0f8310b70583290 Mon Sep 17 00:00:00 2001
From: philip <philip@philip-laptop.(none)>
Date: Sat, 11 Dec 2010 16:58:59 -0800
Subject: [PATCH] sdhci: Add pre and post reset processing for chip specific reset
Marvell pxa controllers have private registers that need to be
touched before and after a reset is done. Implement hooks
to allow this to happen.
Signed-off-by: Philip Rakity <prakity@marvell.com<mailto:prakity@marvell.com>>
---
drivers/mmc/host/sdhci.c | 6 ++++++
drivers/mmc/host/sdhci.h | 2 ++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index d5febe5..f439881 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -157,6 +157,9 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask)
if (host->quirks & SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET)
ier = sdhci_readl(host, SDHCI_INT_ENABLE);
+ if (host->ops->platform_reset_enter)
+ host->ops->platform_reset_enter(host, mask);
+
sdhci_writeb(host, mask, SDHCI_SOFTWARE_RESET);
if (mask & SDHCI_RESET_ALL)
@@ -177,6 +180,9 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask)
mdelay(1);
}
+ if (host->ops->platform_reset_exit)
+ host->ops->platform_reset_exit(host, mask);
+
if (host->quirks & SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET)
sdhci_clear_set_irqs(host, SDHCI_INT_ALL_MASK, ier);
}
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 6e0969e..9dd7bc1 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -222,6 +222,8 @@ struct sdhci_ops {
void (*platform_send_init_74_clocks)(struct sdhci_host *host,
u8 power_mode);
unsigned int (*get_ro)(struct sdhci_host *host);
+ void (*platform_reset_enter)(struct sdhci_host *host, u8 mask);
+ void (*platform_reset_exit)(struct sdhci_host *host, u8 mask);
};
#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
--
1.6.0.4
[-- Attachment #1.2: Type: text/html, Size: 6227 bytes --]
[-- Attachment #2: 0007-sdhci-Add-pre-and-post-reset-processing-for-chip-sp.patch --]
[-- Type: application/octet-stream, Size: 1910 bytes --]
From 499888df1a52491c201077c8a0f8310b70583290 Mon Sep 17 00:00:00 2001
From: philip <philip@philip-laptop.(none)>
Date: Sat, 11 Dec 2010 16:58:59 -0800
Subject: [PATCH] sdhci: Add pre and post reset processing for chip specific reset
Marvell pxa controllers have private registers that need to be
touched before and after a reset is done. Implement hooks
to allow this to happen.
Signed-off-by: Philip Rakity <prakity@marvell.com>
---
drivers/mmc/host/sdhci.c | 6 ++++++
drivers/mmc/host/sdhci.h | 2 ++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index d5febe5..f439881 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -157,6 +157,9 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask)
if (host->quirks & SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET)
ier = sdhci_readl(host, SDHCI_INT_ENABLE);
+ if (host->ops->platform_reset_enter)
+ host->ops->platform_reset_enter(host, mask);
+
sdhci_writeb(host, mask, SDHCI_SOFTWARE_RESET);
if (mask & SDHCI_RESET_ALL)
@@ -177,6 +180,9 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask)
mdelay(1);
}
+ if (host->ops->platform_reset_exit)
+ host->ops->platform_reset_exit(host, mask);
+
if (host->quirks & SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET)
sdhci_clear_set_irqs(host, SDHCI_INT_ALL_MASK, ier);
}
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 6e0969e..9dd7bc1 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -222,6 +222,8 @@ struct sdhci_ops {
void (*platform_send_init_74_clocks)(struct sdhci_host *host,
u8 power_mode);
unsigned int (*get_ro)(struct sdhci_host *host);
+ void (*platform_reset_enter)(struct sdhci_host *host, u8 mask);
+ void (*platform_reset_exit)(struct sdhci_host *host, u8 mask);
};
#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
--
1.6.0.4
[-- Attachment #3: ATT00001..htm --]
[-- Type: text/html, Size: 147 bytes --]
[-- Attachment #4: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: Fwd: [PATCH 7/23] Alternative mmc structure to support pxa168, pxa910, mmp2 family SD
2010-12-22 23:06 ` Fwd: " Philip Rakity
@ 2010-12-22 23:23 ` Arnd Bergmann
0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2010-12-22 23:23 UTC (permalink / raw)
To: Philip Rakity
Cc: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Mark Brown
On Thursday 23 December 2010 00:06:51 Philip Rakity wrote:
>
> host->ops->platform_reset_exit(host, mask);<br>+<br> <span class=3D"A=
> pple-tab-span" style=3D"white-space:pre"> </span>if (host->quirks & =
> SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET)<br> <span class=3D"Apple-tab-span" st=
> yle=3D"white-space:pre"> </span><span class=3D"Apple-tab-span" style=3D"whi=
> te-space:pre"> </span>sdhci_clear_set_irqs(host, SDHCI_INT_ALL_MASK, ier);<=
> br> }<br>diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h<b=
> r>index 6e0969e..9dd7bc1 100644<br>--- a/drivers/mmc/host/sdhci.h<br>+++ b/=
> drivers/mmc/host/sdhci.h<br>@@ -222,6 +222,8 @@ struct sdhci_ops {<br> <spa=
> n class=3D"Apple-tab-span" style=3D"white-space:pre"> </span>void (*platfor=
> m_send_init_74_clocks)(struct sdhci_host *host,<br> <span class=3D"Apple-ta=
This must be the first time I've seen someone post a patch as HTML ;-)
Please reread Documentation/SubmittingPatches. I doubt that you will be
able to make your current email client do the right thing, so best
start looking at "git send-email", which should solve most of the basic
problems you currently experience.
Feel free to send the patch to me in private (after sending it to yourself
first and convincing yourself that you did it right) first if you want to
avoid spamming the mailing lists with more patches that are somewhat wrong.
Arnd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-22 23:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-22 7:08 [PATCH 7/23] Alternative mmc structure to support pxa168, pxa910, mmp2 family SD Philip Rakity
2010-12-22 23:06 ` Fwd: " Philip Rakity
2010-12-22 23:23 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).