Skip to content

Commit 5f7259a

Browse files
committed
bus: ti-sysc: Check for old incomplete dtb
Let's be nice and show an error on the SoCs about old imcomplete devicetree if the dtb is still using "simple-bus" instead of "simple-pm-bus" for the root OCP node. Signed-off-by: Tony Lindgren <[email protected]>
1 parent f2dc075 commit 5f7259a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

drivers/bus/ti-sysc.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2858,6 +2858,7 @@ static int sysc_init_soc(struct sysc *ddata)
28582858
const struct soc_device_attribute *match;
28592859
struct ti_sysc_platform_data *pdata;
28602860
unsigned long features = 0;
2861+
struct device_node *np;
28612862

28622863
if (sysc_soc)
28632864
return 0;
@@ -2878,6 +2879,21 @@ static int sysc_init_soc(struct sysc *ddata)
28782879
if (match && match->data)
28792880
sysc_soc->soc = (int)match->data;
28802881

2882+
/*
2883+
* Check and warn about possible old incomplete dtb. We now want to see
2884+
* simple-pm-bus instead of simple-bus in the dtb for genpd using SoCs.
2885+
*/
2886+
switch (sysc_soc->soc) {
2887+
case SOC_AM3:
2888+
case SOC_AM4:
2889+
np = of_find_node_by_path("/ocp");
2890+
WARN_ONCE(np && of_device_is_compatible(np, "simple-bus"),
2891+
"ti-sysc: Incomplete old dtb, please update\n");
2892+
break;
2893+
default:
2894+
break;
2895+
}
2896+
28812897
/* Ignore devices that are not available on HS and EMU SoCs */
28822898
if (!sysc_soc->general_purpose) {
28832899
switch (sysc_soc->soc) {

0 commit comments

Comments
 (0)