aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/arm/omap/l3-noc.txt19
-rw-r--r--arch/arm/mach-omap2/omap_l3_noc.c25
2 files changed, 38 insertions, 6 deletions
diff --git a/Documentation/devicetree/bindings/arm/omap/l3-noc.txt b/Documentation/devicetree/bindings/arm/omap/l3-noc.txt
new file mode 100644
index 000000000000..6888a5efc860
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/omap/l3-noc.txt
@@ -0,0 +1,19 @@
1* TI - L3 Network On Chip (NoC)
2
3This version is an implementation of the generic NoC IP
4provided by Arteris.
5
6Required properties:
7- compatible : Should be "ti,omap3-l3-smx" for OMAP3 family
8 Should be "ti,omap4-l3-noc" for OMAP4 family
9- ti,hwmods: "l3_main_1", ... One hwmod for each noc domain.
10
11Examples:
12
13ocp {
14 compatible = "ti,omap4-l3-noc", "simple-bus";
15 #address-cells = <1>;
16 #size-cells = <1>;
17 ranges;
18 ti,hwmods = "l3_main_1", "l3_main_2", "l3_main_3";
19};
diff --git a/arch/arm/mach-omap2/omap_l3_noc.c b/arch/arm/mach-omap2/omap_l3_noc.c
index 07a3d3ede768..c8b1bef92e5a 100644
--- a/arch/arm/mach-omap2/omap_l3_noc.c
+++ b/arch/arm/mach-omap2/omap_l3_noc.c
@@ -127,7 +127,7 @@ static irqreturn_t l3_interrupt_handler(int irq, void *_l3)
127 return IRQ_HANDLED; 127 return IRQ_HANDLED;
128} 128}
129 129
130static int __init omap4_l3_probe(struct platform_device *pdev) 130static int __devinit omap4_l3_probe(struct platform_device *pdev)
131{ 131{
132 static struct omap4_l3 *l3; 132 static struct omap4_l3 *l3;
133 struct resource *res; 133 struct resource *res;
@@ -218,7 +218,7 @@ err0:
218 return ret; 218 return ret;
219} 219}
220 220
221static int __exit omap4_l3_remove(struct platform_device *pdev) 221static int __devexit omap4_l3_remove(struct platform_device *pdev)
222{ 222{
223 struct omap4_l3 *l3 = platform_get_drvdata(pdev); 223 struct omap4_l3 *l3 = platform_get_drvdata(pdev);
224 224
@@ -232,16 +232,29 @@ static int __exit omap4_l3_remove(struct platform_device *pdev)
232 return 0; 232 return 0;
233} 233}
234 234
235#if defined(CONFIG_OF)
236static const struct of_device_id l3_noc_match[] = {
237 {.compatible = "ti,omap4-l3-noc", },
238 {},
239}
240MODULE_DEVICE_TABLE(of, l3_noc_match);
241#else
242#define l3_noc_match NULL
243#endif
244
235static struct platform_driver omap4_l3_driver = { 245static struct platform_driver omap4_l3_driver = {
236 .remove = __exit_p(omap4_l3_remove), 246 .probe = omap4_l3_probe,
237 .driver = { 247 .remove = __devexit_p(omap4_l3_remove),
238 .name = "omap_l3_noc", 248 .driver = {
249 .name = "omap_l3_noc",
250 .owner = THIS_MODULE,
251 .of_match_table = l3_noc_match,
239 }, 252 },
240}; 253};
241 254
242static int __init omap4_l3_init(void) 255static int __init omap4_l3_init(void)
243{ 256{
244 return platform_driver_probe(&omap4_l3_driver, omap4_l3_probe); 257 return platform_driver_register(&omap4_l3_driver);
245} 258}
246postcore_initcall_sync(omap4_l3_init); 259postcore_initcall_sync(omap4_l3_init);
247 260