This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6421: bugfix clock probe from firmware

Part Number: AM6421

Hello,

I am pleased to inform you that I have resolved a issue in the keystone sci-ti.c driver for the am64xx Rev.B device. This issue arises when using the Kernelconfig "CONFIG_TI_SCI_CLK_PROBE_FROM_FW".

The error results in the following kernel log messages:

clk: couldn't get parent clock 0 for /bus@f4000/cdns-usb@f900000
clk: couldn't get parent clock 0 for /bus@f4000/watchdog@e000000
clk: couldn't get parent clock 0 for /bus@f4000/watchdog@e010000

Rev.A devices have maximum device ID gap of five or lower. However, with the Rev.B devices, the minimum gap is seven, as stated in the following link: softwaredl.ti.com/.../devices.html

To resolve this issue, the gap that defines the sci break for clocks needs to be set higher. As such, I suggest setting the gap size to ten.

I hope that this information is of value to those experiencing similar issues with the keystone sci-ti.c driver for the am64xx Rev.B device.

diff --git a/drivers/clk/keystone/sci-clk.c b/drivers/clk/keystone/sci-clk.c
index 7e1b136e71ae..33389575f023 100644
--- a/drivers/clk/keystone/sci-clk.c
+++ b/drivers/clk/keystone/sci-clk.c
@@ -445,7 +445,7 @@ static int ti_sci_scan_clocks_from_fw(struct sci_clk_provider *provider)
        if (ret) {
            gap_size++;
            if (!clk_id) {
-               if (gap_size >= 5)
+               if (gap_size >= 10) /* am64x Rev.B have a gap of 7 */
                    break;
                dev_id++;
            } else {

Sincerely,

Stefan