2021-03-08 12:27:19

by Tony Lindgren

[permalink] [raw]
Subject: [PATCH 0/4] ti-sysc changes for dropping omap4/5 legacy data

Hi all,

Here are few ti-sysc related changes that are needed to drop legacy data
for omap4/5. The last patch also starts warning users about old incomplete
dtb, we do that initially only for am3/4 that no longer have the legacy
data.

Regards,

Tony


Tony Lindgren (4):
ARM: OMAP2+: Init both prm and prcm nodes early for clocks
soc: ti: omap-prm: Allow hardware supported retention when idle
clk: ti: omap5: Add missing gpmc and ocmc clkctrl
bus: ti-sysc: Check for old incomplete dtb

arch/arm/mach-omap2/pdata-quirks.c | 29 +++++++++++++++++++++--------
drivers/bus/ti-sysc.c | 16 ++++++++++++++++
drivers/clk/ti/clk-54xx.c | 2 ++
drivers/soc/ti/omap_prm.c | 16 ++++++++++++----
include/dt-bindings/clock/omap5.h | 2 ++
5 files changed, 53 insertions(+), 12 deletions(-)

--
2.30.1


2021-03-08 15:57:53

by Tony Lindgren

[permalink] [raw]
Subject: [PATCH 4/4] 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]>
---
drivers/bus/ti-sysc.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -2858,6 +2858,7 @@ static int sysc_init_soc(struct sysc *ddata)
const struct soc_device_attribute *match;
struct ti_sysc_platform_data *pdata;
unsigned long features = 0;
+ struct device_node *np;

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

+ /*
+ * Check and warn about possible old incomplete dtb. We now want to see
+ * simple-pm-bus instead of simple-bus in the dtb for genpd using SoCs.
+ */
+ switch (sysc_soc->soc) {
+ case SOC_AM3:
+ case SOC_AM4:
+ np = of_find_node_by_path("/ocp");
+ WARN_ONCE(np && of_device_is_compatible(np, "simple-bus"),
+ "ti-sysc: Incomplete old dtb, please update\n");
+ break;
+ default:
+ break;
+ }
+
/* Ignore devices that are not available on HS and EMU SoCs */
if (!sysc_soc->general_purpose) {
switch (sysc_soc->soc) {
--
2.30.1