* [PATCH] ARM: OMAP: fix MMC2 loopback clock handling
@ 2012-01-12 14:26 Grazvydas Ignotas
2012-01-12 15:22 ` Igor Grinberg
0 siblings, 1 reply; 3+ messages in thread
From: Grazvydas Ignotas @ 2012-01-12 14:26 UTC (permalink / raw)
To: linux-arm-kernel
Currently MMC2 setup code can only enable loopback clock and
relies on reset value for boards that need to have it disabled.
This causes a problem with certain bootloaders that always enable
that clock, resulting with unwanted bootloader dependencies.
Fix this by making it disable the clock if board data says so.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
---
depends on "ARM: OMAP: fix erroneous mmc2 clock change on mmc3 setup"
http://marc.info/?l=linux-omap&m=132416866125291&w=2
arch/arm/mach-omap2/hsmmc.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index 8658bd7..ad0adb5 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -175,11 +175,12 @@ static void hsmmc2_select_input_clk_src(struct omap_mmc_platform_data *mmc)
{
u32 reg;
- if (mmc->slots[0].internal_clock) {
- reg = omap_ctrl_readl(control_devconf1_offset);
+ reg = omap_ctrl_readl(control_devconf1_offset);
+ if (mmc->slots[0].internal_clock)
reg |= OMAP2_MMCSDIO2ADPCLKISEL;
- omap_ctrl_writel(reg, control_devconf1_offset);
- }
+ else
+ reg &= ~OMAP2_MMCSDIO2ADPCLKISEL;
+ omap_ctrl_writel(reg, control_devconf1_offset);
}
static void hsmmc2_before_set_reg(struct device *dev, int slot,
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ARM: OMAP: fix MMC2 loopback clock handling
2012-01-12 14:26 [PATCH] ARM: OMAP: fix MMC2 loopback clock handling Grazvydas Ignotas
@ 2012-01-12 15:22 ` Igor Grinberg
2012-01-27 0:16 ` Tony Lindgren
0 siblings, 1 reply; 3+ messages in thread
From: Igor Grinberg @ 2012-01-12 15:22 UTC (permalink / raw)
To: linux-arm-kernel
On 01/12/12 16:26, Grazvydas Ignotas wrote:
> Currently MMC2 setup code can only enable loopback clock and
> relies on reset value for boards that need to have it disabled.
> This causes a problem with certain bootloaders that always enable
> that clock, resulting with unwanted bootloader dependencies.
>
> Fix this by making it disable the clock if board data says so.
>
> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
> ---
> depends on "ARM: OMAP: fix erroneous mmc2 clock change on mmc3 setup"
> http://marc.info/?l=linux-omap&m=132416866125291&w=2
>
> arch/arm/mach-omap2/hsmmc.c | 9 +++++----
> 1 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
> index 8658bd7..ad0adb5 100644
> --- a/arch/arm/mach-omap2/hsmmc.c
> +++ b/arch/arm/mach-omap2/hsmmc.c
> @@ -175,11 +175,12 @@ static void hsmmc2_select_input_clk_src(struct omap_mmc_platform_data *mmc)
> {
> u32 reg;
>
> - if (mmc->slots[0].internal_clock) {
> - reg = omap_ctrl_readl(control_devconf1_offset);
> + reg = omap_ctrl_readl(control_devconf1_offset);
> + if (mmc->slots[0].internal_clock)
> reg |= OMAP2_MMCSDIO2ADPCLKISEL;
> - omap_ctrl_writel(reg, control_devconf1_offset);
> - }
> + else
> + reg &= ~OMAP2_MMCSDIO2ADPCLKISEL;
> + omap_ctrl_writel(reg, control_devconf1_offset);
> }
>
> static void hsmmc2_before_set_reg(struct device *dev, int slot,
--
Regards,
Igor.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ARM: OMAP: fix MMC2 loopback clock handling
2012-01-12 15:22 ` Igor Grinberg
@ 2012-01-27 0:16 ` Tony Lindgren
0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2012-01-27 0:16 UTC (permalink / raw)
To: linux-arm-kernel
* Igor Grinberg <grinberg@compulab.co.il> [120112 06:50]:
> On 01/12/12 16:26, Grazvydas Ignotas wrote:
> > Currently MMC2 setup code can only enable loopback clock and
> > relies on reset value for boards that need to have it disabled.
> > This causes a problem with certain bootloaders that always enable
> > that clock, resulting with unwanted bootloader dependencies.
> >
> > Fix this by making it disable the clock if board data says so.
> >
> > Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
>
> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Thanks applying into fixes.
Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-27 0:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-12 14:26 [PATCH] ARM: OMAP: fix MMC2 loopback clock handling Grazvydas Ignotas
2012-01-12 15:22 ` Igor Grinberg
2012-01-27 0:16 ` Tony Lindgren
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).