devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaro Koskinen <aaro.koskinen@iki.fi>
To: "Tony Lindgren" <tony@atomide.com>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-omap@vger.kernel.org
Cc: Sakari Ailus <sakari.ailus@iki.fi>, Aaro Koskinen <aaro.koskinen@iki.fi>
Subject: [PATCH 1/3] ARM: OMAP2: HACK: hardcode hsmmc2 input clock source for N950/N9
Date: Sat, 21 Sep 2013 16:45:40 +0300	[thread overview]
Message-ID: <1379771142-29087-2-git-send-email-aaro.koskinen@iki.fi> (raw)
In-Reply-To: <1379771142-29087-1-git-send-email-aaro.koskinen@iki.fi>

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.
-- 
1.8.4.rc3


  reply	other threads:[~2013-09-21 13:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-21 13:45 [PATCH 0/3] ARM: OMAP: convert N950/N9 to DT Aaro Koskinen
2013-09-21 13:45 ` Aaro Koskinen [this message]
     [not found]   ` <1379771142-29087-2-git-send-email-aaro.koskinen-X3B1VOXEql0@public.gmane.org>
2013-09-23 17:38     ` [PATCH 1/3] ARM: OMAP2: HACK: hardcode hsmmc2 input clock source for N950/N9 Tony Lindgren
2013-09-23 18:03       ` Aaro Koskinen
2013-09-21 13:45 ` [PATCH 2/3] ARM: dts: add minimal DT support for Nokia N950 & N9 phones Aaro Koskinen
2013-09-21 13:45 ` [PATCH 3/3] ARM: OMAP2: delete board-rm680 Aaro Koskinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1379771142-29087-2-git-send-email-aaro.koskinen@iki.fi \
    --to=aaro.koskinen@iki.fi \
    --cc=bcousson@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=sakari.ailus@iki.fi \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).