aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2018-08-30 02:58:31 -0400
committerTero Kristo <t-kristo@ti.com>2018-10-03 08:02:26 -0400
commit1dc88f78da594042b549f1ea70de2fb721990e3c (patch)
treefcf86c2df05adfd6753b29c7fa13311c15a1783f
parent47b00dcf141172c4c1c583701ec91923672cec39 (diff)
clk: ti: clkctrl: replace dashes from clkdm name with underscore
The change in the DTS data node naming prevents using underscore within the node names and force usage of dash instead. On the other hand, clockdomains use underscore instead of dash, so this must be replaced within the driver code so that the mapping between the two can be done properly. Signed-off-by: Tero Kristo <t-kristo@ti.com> Tested-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--drivers/clk/ti/clkctrl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/clk/ti/clkctrl.c b/drivers/clk/ti/clkctrl.c
index 9bff57f0345d..e4b431b63e6b 100644
--- a/drivers/clk/ti/clkctrl.c
+++ b/drivers/clk/ti/clkctrl.c
@@ -445,6 +445,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node)
445 const __be32 *addrp; 445 const __be32 *addrp;
446 u32 addr; 446 u32 addr;
447 int ret; 447 int ret;
448 char *c;
448 449
449 if (!(ti_clk_get_features()->flags & TI_CLK_CLKCTRL_COMPAT) && 450 if (!(ti_clk_get_features()->flags & TI_CLK_CLKCTRL_COMPAT) &&
450 !strcmp(node->name, "clk")) 451 !strcmp(node->name, "clk"))
@@ -532,6 +533,15 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node)
532 533
533 strcat(provider->clkdm_name, "clkdm"); 534 strcat(provider->clkdm_name, "clkdm");
534 535
536 /* Replace any dash from the clkdm name with underscore */
537 c = provider->clkdm_name;
538
539 while (*c) {
540 if (*c == '-')
541 *c = '_';
542 c++;
543 }
544
535 INIT_LIST_HEAD(&provider->clocks); 545 INIT_LIST_HEAD(&provider->clocks);
536 546
537 /* Generate clocks */ 547 /* Generate clocks */