diff mbox

[1/3] ARM: OMAP2: HACK: hardcode hsmmc2 input clock source for N950/N9

Message ID 1379771142-29087-2-git-send-email-aaro.koskinen@iki.fi (mailing list archive)
State New, archived
Headers show

Commit Message

Aaro Koskinen Sept. 21, 2013, 1:45 p.m. UTC
Without this the eMMC (root file system) cannot be used on N950/N9.
Any ideas for a proper solution?

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
 arch/arm/mach-omap2/board-generic.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Tony Lindgren Sept. 23, 2013, 5:38 p.m. UTC | #1
* Aaro Koskinen <aaro.koskinen@iki.fi> [130921 06:56]:
> Without this the eMMC (root file system) cannot be used on N950/N9.
> Any ideas for a proper solution?
> 
> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
> ---
>  arch/arm/mach-omap2/board-generic.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
> index 39c7838..8be49b3 100644
> --- a/arch/arm/mach-omap2/board-generic.c
> +++ b/arch/arm/mach-omap2/board-generic.c
> @@ -20,6 +20,7 @@
>  #include <asm/mach/arch.h>
>  
>  #include "common.h"
> +#include "control.h"
>  #include "common-board-devices.h"
>  #include "dss-common.h"
>  
> @@ -51,12 +52,26 @@ static void __init legacy_init_ehci_clk(char *clkname)
>  	}
>  }
>  
> +static void __init hsmmc2_input_clk(void)
> +{
> +	u32 reg;
> +
> +	reg = omap_ctrl_readl(OMAP343X_CONTROL_DEVCONF1);
> +	reg |= OMAP2_MMCSDIO2ADPCLKISEL;
> +	omap_ctrl_writel(reg, OMAP343X_CONTROL_DEVCONF1);
> +}
> +
>  static void __init omap_generic_init(void)
>  {
>  	omap_sdrc_init(NULL, NULL);
>  
>  	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
>  
> +	/* HACK: Configure the MMC input clock source on N950/N9. */
> +	if (of_machine_is_compatible("nokia,omap3-n950") ||
> +	    of_machine_is_compatible("nokia,omap3-n9"))
> +		hsmmc2_input_clk();
> +
>  	/*
>  	 * HACK: call display setup code for selected boards to enable omapdss.
>  	 * This will be removed when omapdss supports DT.
> 

Can you please update this patch on the quirks series I posted
few days ago?

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Aaro Koskinen Sept. 23, 2013, 6:03 p.m. UTC | #2
Hi,

On Mon, Sep 23, 2013 at 10:38:43AM -0700, Tony Lindgren wrote:
> * Aaro Koskinen <aaro.koskinen@iki.fi> [130921 06:56]:
> > Without this the eMMC (root file system) cannot be used on N950/N9.
> > Any ideas for a proper solution?

> Can you please update this patch on the quirks series I posted
> few days ago?

Ok, will do (sorry I missed that series).

Thanks,

A.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 39c7838..8be49b3 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -20,6 +20,7 @@ 
 #include <asm/mach/arch.h>
 
 #include "common.h"
+#include "control.h"
 #include "common-board-devices.h"
 #include "dss-common.h"
 
@@ -51,12 +52,26 @@  static void __init legacy_init_ehci_clk(char *clkname)
 	}
 }
 
+static void __init hsmmc2_input_clk(void)
+{
+	u32 reg;
+
+	reg = omap_ctrl_readl(OMAP343X_CONTROL_DEVCONF1);
+	reg |= OMAP2_MMCSDIO2ADPCLKISEL;
+	omap_ctrl_writel(reg, OMAP343X_CONTROL_DEVCONF1);
+}
+
 static void __init omap_generic_init(void)
 {
 	omap_sdrc_init(NULL, NULL);
 
 	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
 
+	/* HACK: Configure the MMC input clock source on N950/N9. */
+	if (of_machine_is_compatible("nokia,omap3-n950") ||
+	    of_machine_is_compatible("nokia,omap3-n9"))
+		hsmmc2_input_clk();
+
 	/*
 	 * HACK: call display setup code for selected boards to enable omapdss.
 	 * This will be removed when omapdss supports DT.