aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bus
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2014-11-05 12:21:23 -0500
committerTony Lindgren <tony@atomide.com>2014-11-05 12:23:14 -0500
commitaa25729cfd9709156661bea0f9293deb7729f57a (patch)
tree01215348060e3a684e9bf87efb924302ab484350 /drivers/bus
parent0df1f2487d2f0d04703f142813d53615d62a1da4 (diff)
ARM: OMAP3: Fix errors for omap_l3_smx when booted with device tree
When booting omap3 in device tree mode, we're currently getting the following errors: omap_l3_smx omap_l3_smx.0: couldn't request debug irq omap_l3_smx: probe of omap_l3_smx.0 failed with error -22 This is because we don't have handling in the driver for the compatible property and instead assume platform data being passed. Note that this binding is already documented, and implemented for the related omap_l3_noc driver for omap4 and later. Looks like the binding somehow never got never implemented for this omap_l3_smx driver though. Let's also remove __exit_p to allow binding and unbinding of the driver while at it. Reported-by: Pavel Machek <pavel@ucw.cz> Reported-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Santosh Shilimkar <ssantosh@kernel.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers/bus')
-rw-r--r--drivers/bus/omap_l3_smx.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/drivers/bus/omap_l3_smx.c b/drivers/bus/omap_l3_smx.c
index acc216491b8a..597fdaee7315 100644
--- a/drivers/bus/omap_l3_smx.c
+++ b/drivers/bus/omap_l3_smx.c
@@ -27,6 +27,10 @@
27#include <linux/platform_device.h> 27#include <linux/platform_device.h>
28#include <linux/interrupt.h> 28#include <linux/interrupt.h>
29#include <linux/io.h> 29#include <linux/io.h>
30#include <linux/module.h>
31#include <linux/of.h>
32#include <linux/of_device.h>
33
30#include "omap_l3_smx.h" 34#include "omap_l3_smx.h"
31 35
32static inline u64 omap3_l3_readll(void __iomem *base, u16 reg) 36static inline u64 omap3_l3_readll(void __iomem *base, u16 reg)
@@ -211,7 +215,17 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3)
211 return ret; 215 return ret;
212} 216}
213 217
214static int __init omap3_l3_probe(struct platform_device *pdev) 218#if IS_BUILTIN(CONFIG_OF)
219static const struct of_device_id omap3_l3_match[] = {
220 {
221 .compatible = "ti,omap3-l3-smx",
222 },
223 { },
224};
225MODULE_DEVICE_TABLE(of, omap3_l3_match);
226#endif
227
228static int omap3_l3_probe(struct platform_device *pdev)
215{ 229{
216 struct omap3_l3 *l3; 230 struct omap3_l3 *l3;
217 struct resource *res; 231 struct resource *res;
@@ -265,7 +279,7 @@ err0:
265 return ret; 279 return ret;
266} 280}
267 281
268static int __exit omap3_l3_remove(struct platform_device *pdev) 282static int omap3_l3_remove(struct platform_device *pdev)
269{ 283{
270 struct omap3_l3 *l3 = platform_get_drvdata(pdev); 284 struct omap3_l3 *l3 = platform_get_drvdata(pdev);
271 285
@@ -278,15 +292,17 @@ static int __exit omap3_l3_remove(struct platform_device *pdev)
278} 292}
279 293
280static struct platform_driver omap3_l3_driver = { 294static struct platform_driver omap3_l3_driver = {
281 .remove = __exit_p(omap3_l3_remove), 295 .probe = omap3_l3_probe,
296 .remove = omap3_l3_remove,
282 .driver = { 297 .driver = {
283 .name = "omap_l3_smx", 298 .name = "omap_l3_smx",
299 .of_match_table = of_match_ptr(omap3_l3_match),
284 }, 300 },
285}; 301};
286 302
287static int __init omap3_l3_init(void) 303static int __init omap3_l3_init(void)
288{ 304{
289 return platform_driver_probe(&omap3_l3_driver, omap3_l3_probe); 305 return platform_driver_register(&omap3_l3_driver);
290} 306}
291postcore_initcall_sync(omap3_l3_init); 307postcore_initcall_sync(omap3_l3_init);
292 308