Skip to contentSkip to conversation

ARM: DRA7: Fixup DPLL clock rate fixup logic for newer kernels

PATCH New Suman Anna 2 participants 2 messages Aug 16, 2019 – Aug 21, 2019

Subsystems (3)
lore
Share & tools
lore

Suman Anna

author
#0 lore raw

PATCH 1/1 ARM: DRA7: Fixup DPLL clock rate fixup logic for newer kernels

The commit 1b42ab3eda8a ("ARM: DRA7: Fixup DSPEVE, IVA and GPU clock frequencies based on OPP") updates the kernel device-tree blob to adjust the DSP, IVA and GPU DPLL clocks based on a one-time OPP choice selected in U-Boot. All these DPLL clocks are children of the cm_core_aon clocks DT node.

The hierarchy of this clocks DT node has changed in newer Linux kernels starting from v5.0, and this results in a failure in ft_fixup_clocks() function to update the clock rates on these newer kernels. Fix this by updating the lookup logic to look through both the newer and older DT hierarchy paths for the cm_core_aon clocks node.

---
 arch/arm/mach-omap2/omap5/fdt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/omap5/fdt.c +3 -1
index 3626d79199af..8dee555c10c6 100644
@@ -201,7 +201,9 @@ static int ft_fixup_clocks(void *fdt, const char **names, u32 *rates, int num)
 	int offs, node_offs, ret, i;
 	uint32_t phandle;
 
-	offs = fdt_path_offset(fdt, "/ocp/l4 at 4a000000/cm_core_aon at 5000/clocks");
+	offs = fdt_path_offset(fdt, "/ocp/interconnect at 4a000000/segment at 0/target-module at 5000/cm_core_aon at 0/clocks");
+	if (offs < 0)
+		offs = fdt_path_offset(fdt, "/ocp/l4 at 4a000000/cm_core_aon@5000/clocks");
 	if (offs < 0) {
 		debug("Could not find cm_core_aon clocks node path offset : %s\n",
 		      fdt_strerror(offs));
Signature · 1 line
2.22.0
#1 lore raw

PATCH 1/1 ARM: DRA7: Fixup DPLL clock rate fixup logic for newer kernels

Quoted 6 lines · Suman Anna

The commit 1b42ab3eda8a ("ARM: DRA7: Fixup DSPEVE, IVA and GPU clock frequencies based on OPP") updates the kernel device-tree blob to adjust the DSP, IVA and GPU DPLL clocks based on a one-time OPP choice selected in U-Boot. All these DPLL clocks are children of the cm_core_aon clocks DT node.

Quoted 7 lines

The hierarchy of this clocks DT node has changed in newer Linux kernels starting from v5.0, and this results in a failure in ft_fixup_clocks() function to update the clock rates on these newer kernels. Fix this by updating the lookup logic to look through both the newer and older DT hierarchy paths for the cm_core_aon clocks node.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190821/6ec0c754/attachment.sig>