From: Tony Lindgren <tony@atomide.com>
To: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org
Subject: [PATCH 03/11] ARM: OMAP2+: Add support for board specific auxdata quirks
Date: Thu, 14 Nov 2013 16:09:50 -0800 [thread overview]
Message-ID: <1384474198-20756-4-git-send-email-tony@atomide.com> (raw)
In-Reply-To: <1384474198-20756-1-git-send-email-tony@atomide.com>
Looks like some boards need to fill in the auxdata before
we call of_platform_populate(). Let's add support for
auxdata quirks like we already have for pdata quirks for
legacy drivers.
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/pdata-quirks.c | 32 +++++++++++++++++++++++++-------
1 file changed, 25 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index 10c7145..cb2863d 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -125,7 +125,18 @@ void omap_pcs_legacy_init(int irq, void (*rearm)(void))
pcs_pdata.rearm = rearm;
}
+/*
+ * Few boards still need auxdata populated before we populate
+ * the dev entries in of_platform_populate().
+ */
+static struct pdata_init auxdata_quirks[] __initdata = {
+ { /* sentinel */ },
+};
+
struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
+#ifdef CONFIG_MACH_NOKIA_N8X0
+ OF_DEV_AUXDATA("ti,omap2420-mmc", 0x4809c000, "mmci-omap.0", NULL),
+#endif
#ifdef CONFIG_ARCH_OMAP3
OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002030, "48002030.pinmux", &pcs_pdata),
OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002a00, "48002a00.pinmux", &pcs_pdata),
@@ -137,6 +148,10 @@ struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
{ /* sentinel */ },
};
+/*
+ * Few boards still need to initialize some legacy devices with
+ * platform data until the drivers support device tree.
+ */
static struct pdata_init pdata_quirks[] __initdata = {
#ifdef CONFIG_ARCH_OMAP3
{ "nokia,omap3-n9", hsmmc2_internal_input_clk, },
@@ -155,14 +170,8 @@ static struct pdata_init pdata_quirks[] __initdata = {
{ /* sentinel */ },
};
-void __init pdata_quirks_init(struct of_device_id *omap_dt_match_table)
+static void pdata_quirks_check(struct pdata_init *quirks)
{
- struct pdata_init *quirks = pdata_quirks;
-
- omap_sdrc_init(NULL, NULL);
- of_platform_populate(NULL, omap_dt_match_table,
- omap_auxdata_lookup, NULL);
-
while (quirks->compatible) {
if (of_machine_is_compatible(quirks->compatible)) {
if (quirks->fn)
@@ -172,3 +181,12 @@ void __init pdata_quirks_init(struct of_device_id *omap_dt_match_table)
quirks++;
}
}
+
+void __init pdata_quirks_init(struct of_device_id *omap_dt_match_table)
+{
+ omap_sdrc_init(NULL, NULL);
+ pdata_quirks_check(auxdata_quirks);
+ of_platform_populate(NULL, omap_dt_match_table,
+ omap_auxdata_lookup, NULL);
+ pdata_quirks_check(pdata_quirks);
+}
--
1.8.1.1
next prev parent reply other threads:[~2013-11-15 0:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-15 0:09 [PATCH 00/11] Make omap24xx booting device tree based for v3.14 merge window Tony Lindgren
2013-11-15 0:09 ` [PATCH 01/11] ARM: dts: Add basic device tree support for omap2430 sdp Tony Lindgren
2013-11-15 0:09 ` [PATCH 02/11] ARM: dts: Add basic Nokia N8X0 support Tony Lindgren
2013-11-15 0:09 ` Tony Lindgren [this message]
2013-11-15 0:09 ` [PATCH 04/11] ARM: OMAP2+: Add device tree compatible revision checks for n8x0 Tony Lindgren
2013-11-15 0:09 ` [PATCH 05/11] ARM: OMAP2+: Make n8x0 behave better with device tree based booting Tony Lindgren
2013-11-15 0:09 ` [PATCH 06/11] ARM: OMAP2+: Add quirks support for n8x0 Tony Lindgren
2013-11-15 0:09 ` [PATCH 07/11] ARM: OMAP2+: Remove legacy booting " Tony Lindgren
2013-11-15 0:09 ` [PATCH 08/11] ARM: OMAP2+: Remove board file for H4 Tony Lindgren
2013-11-15 0:09 ` [PATCH 09/11] ARM: OMAP2+: Remove legacy board file for 2430sdp Tony Lindgren
2013-11-15 0:09 ` [PATCH 10/11] ARM: OMAP2+: Remove legacy mux code for omap2 Tony Lindgren
2013-11-15 0:09 ` [PATCH 11/11] ARM: OMAP2+: Remove legacy hwmod entries " Tony Lindgren
2013-11-15 18:47 ` [PATCH 00/11] Make omap24xx booting device tree based for v3.14 merge window Aaro Koskinen
2013-11-15 19:02 ` Tony Lindgren
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=1384474198-20756-4-git-send-email-tony@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
/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).