Skip to contentSkip to conversation

drivers/of/platform: Add powerpc 4xx embedded busses to default list

RFC/PATCH Benjamin Herrenschmidt 3 participants 6 messages Sep 1, 2017 – Sep 5, 2017 Device tree

lore
Share & tools
lore
#0 lore raw

This allow to (slowly) migrate those embedded platforms to of_platform_default_populate()

---

I'm here to collect acks (or comments :-) I'd like this to go via the powerpc tree along with the patches converting some of the platforms. I'll be adding more bus types if/when I start tackling other powerpc embedded families but for now I'm dealing with 4xx.

 drivers/of/platform.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/of/platform.c +6 -0
index b19524623498..f3f2aab4eda1 100644
@@ -34,6 +34,12 @@ const struct of_device_id of_default_bus_match_table[] = {
 #ifdef CONFIG_ARM_AMBA
 	{ .compatible = "arm,amba-bus", },
 #endif /* CONFIG_ARM_AMBA */
+#ifdef CONFIG_PPC
+	{ .compatible = "ibm,plb3", },
+	{ .compatible = "ibm,plb4", },
+	{ .compatible = "ibm,opb", },
+	{ .compatible = "ibm,ebc", },
+#endif
 	{} /* Empty terminated list */
 };
 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw
Quoted 6 lines · Benjamin Herrenschmidt

This allow to (slowly) migrate those embedded platforms to of_platform_default_populate()

---

Quoted 8 lines

I'm here to collect acks (or comments :-) I'd like this to go via the powerpc tree along with the patches converting some of the platforms. I'll be adding more bus types if/when I start tackling other powerpc embedded families but for now I'm dealing with 4xx.

 drivers/of/platform.c | 6 ++++++
 1 file changed, 6 insertions(+)

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer Acked-by
#2 lore raw
In reply to Benjamin Herrenschmidt
Quoted 10 lines · Benjamin Herrenschmidt

This allow to (slowly) migrate those embedded platforms to of_platform_default_populate()

---

I'm here to collect acks (or comments :-) I'd like this to go via the powerpc tree along with the patches converting some of the platforms. I'll be adding more bus types if/when I start tackling other powerpc embedded families but for now I'm dealing with 4xx.

Glad to see it.

Rob

#3 lore raw
Quoted 8 lines · Rob Herring
Quoted 6 lines · Benjamin Herrenschmidt

This allow to (slowly) migrate those embedded platforms to of_platform_default_populate()

---

Quoted 6 lines
Quoted 4 lines

I'm here to collect acks (or comments :-) I'd like this to go via the powerpc tree along with the patches converting some of the platforms. I'll be adding more bus types if/when I start tackling other powerpc embedded families but for now I'm dealing with 4xx.

Glad to see it.

So my end game is to remove the #ifndef CONFIG_PPC around of_platform_default_populate_init(void). However, for that to work, I need to add a way to disable that on some platforms.

However, it might take time, especially when it comes to dealing with the old Macs or some more obscure embedded platforms.

So in the meantime, I'm thinking adding some kind of runtime way of disabling this default populate. Would you be ok with that ?

Something like:

bool arch_wants_of_platform_defaults(void)

With a weak implementation returning true.

Cheers,
Ben.

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer
#4 lore raw
Quoted 23 lines · Benjamin Herrenschmidt
Quoted 8 lines · Rob Herring
Quoted 6 lines · Benjamin Herrenschmidt

This allow to (slowly) migrate those embedded platforms to of_platform_default_populate()

---

Quoted 6 lines
Quoted 4 lines

I'm here to collect acks (or comments :-) I'd like this to go via the powerpc tree along with the patches converting some of the platforms. I'll be adding more bus types if/when I start tackling other powerpc embedded families but for now I'm dealing with 4xx.

Glad to see it.

So my end game is to remove the #ifndef CONFIG_PPC around of_platform_default_populate_init(void). However, for that to work, I need to add a way to disable that on some platforms.

However, it might take time, especially when it comes to dealing with the old Macs or some more obscure embedded platforms.

Quoted 8 lines

So in the meantime, I'm thinking adding some kind of runtime way of disabling this default populate. Would you be ok with that ?

Something like:

bool arch_wants_of_platform_defaults(void)

With a weak implementation returning true.

That seems fine. The intention was that you can call of_platform_default_populate multiple times with arch specific match lists and the default. There could be ordering issues both with initcall levels and device creation ordering.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw
Quoted 5 lines · Rob Herring
Quoted 5 lines

So in the meantime, I'm thinking adding some kind of runtime way of disabling this default populate. Would you be ok with that ?

Something like:

Quoted 8 lines
Quoted 3 lines

bool arch_wants_of_platform_defaults(void)

With a weak implementation returning true.

That seems fine. The intention was that you can call of_platform_default_populate multiple times with arch specific match lists and the default. There could be ordering issues both with initcall levels and device creation ordering.

Right but I want to skip the default completely on things like old macs because they manually create their own cherry-picks and I worry about conflicts here. Also Apple has history of random crap in the root of the DT.

Cheers,
Ben.