diff options
author | Tony Lindgren <tony@atomide.com> | 2013-11-25 18:17:09 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2013-11-25 18:31:16 -0500 |
commit | 036582f76ad900e4c1b9ec290ce66c6f698bd00d (patch) | |
tree | c9cb938888a9b25fbf8bc8bf65c9133913747edd /arch | |
parent | 282ce32e6245379e395758bbf1911be61714ef18 (diff) |
ARM: OMAP2+: Add support for board specific auxdata quirks
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/pdata-quirks.c | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 39f020c982e8..468e4c1f2976 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)) | |||
125 | pcs_pdata.rearm = rearm; | 125 | pcs_pdata.rearm = rearm; |
126 | } | 126 | } |
127 | 127 | ||
128 | /* | ||
129 | * Few boards still need auxdata populated before we populate | ||
130 | * the dev entries in of_platform_populate(). | ||
131 | */ | ||
132 | static struct pdata_init auxdata_quirks[] __initdata = { | ||
133 | { /* sentinel */ }, | ||
134 | }; | ||
135 | |||
128 | struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { | 136 | struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { |
137 | #ifdef CONFIG_MACH_NOKIA_N8X0 | ||
138 | OF_DEV_AUXDATA("ti,omap2420-mmc", 0x4809c000, "mmci-omap.0", NULL), | ||
139 | #endif | ||
129 | #ifdef CONFIG_ARCH_OMAP3 | 140 | #ifdef CONFIG_ARCH_OMAP3 |
130 | OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002030, "48002030.pinmux", &pcs_pdata), | 141 | OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002030, "48002030.pinmux", &pcs_pdata), |
131 | OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002a00, "48002a00.pinmux", &pcs_pdata), | 142 | OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002a00, "48002a00.pinmux", &pcs_pdata), |
@@ -137,6 +148,10 @@ struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { | |||
137 | { /* sentinel */ }, | 148 | { /* sentinel */ }, |
138 | }; | 149 | }; |
139 | 150 | ||
151 | /* | ||
152 | * Few boards still need to initialize some legacy devices with | ||
153 | * platform data until the drivers support device tree. | ||
154 | */ | ||
140 | static struct pdata_init pdata_quirks[] __initdata = { | 155 | static struct pdata_init pdata_quirks[] __initdata = { |
141 | #ifdef CONFIG_ARCH_OMAP3 | 156 | #ifdef CONFIG_ARCH_OMAP3 |
142 | { "nokia,omap3-n900", hsmmc2_internal_input_clk, }, | 157 | { "nokia,omap3-n900", hsmmc2_internal_input_clk, }, |
@@ -156,14 +171,8 @@ static struct pdata_init pdata_quirks[] __initdata = { | |||
156 | { /* sentinel */ }, | 171 | { /* sentinel */ }, |
157 | }; | 172 | }; |
158 | 173 | ||
159 | void __init pdata_quirks_init(struct of_device_id *omap_dt_match_table) | 174 | static void pdata_quirks_check(struct pdata_init *quirks) |
160 | { | 175 | { |
161 | struct pdata_init *quirks = pdata_quirks; | ||
162 | |||
163 | omap_sdrc_init(NULL, NULL); | ||
164 | of_platform_populate(NULL, omap_dt_match_table, | ||
165 | omap_auxdata_lookup, NULL); | ||
166 | |||
167 | while (quirks->compatible) { | 176 | while (quirks->compatible) { |
168 | if (of_machine_is_compatible(quirks->compatible)) { | 177 | if (of_machine_is_compatible(quirks->compatible)) { |
169 | if (quirks->fn) | 178 | if (quirks->fn) |
@@ -173,3 +182,12 @@ void __init pdata_quirks_init(struct of_device_id *omap_dt_match_table) | |||
173 | quirks++; | 182 | quirks++; |
174 | } | 183 | } |
175 | } | 184 | } |
185 | |||
186 | void __init pdata_quirks_init(struct of_device_id *omap_dt_match_table) | ||
187 | { | ||
188 | omap_sdrc_init(NULL, NULL); | ||
189 | pdata_quirks_check(auxdata_quirks); | ||
190 | of_platform_populate(NULL, omap_dt_match_table, | ||
191 | omap_auxdata_lookup, NULL); | ||
192 | pdata_quirks_check(pdata_quirks); | ||
193 | } | ||