clk: ti: dra7x: prevent non-existing clkctrl clocks from registering
Certain clkctrl clocks (like the USB_OTG_SS4) do not exist on some variants of the dra7x SoC. Append a flag for these clocks and skip the registration in cases where the clocks do not exist. Reported-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
@@ -446,6 +446,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node)
|
||||
u32 addr;
|
||||
int ret;
|
||||
char *c;
|
||||
u16 soc_mask = 0;
|
||||
|
||||
if (!(ti_clk_get_features()->flags & TI_CLK_CLKCTRL_COMPAT) &&
|
||||
of_node_name_eq(node, "clk"))
|
||||
@@ -469,6 +470,13 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node)
|
||||
else
|
||||
data = dra7_clkctrl_data;
|
||||
}
|
||||
|
||||
if (of_machine_is_compatible("ti,dra72"))
|
||||
soc_mask = CLKF_SOC_DRA72;
|
||||
if (of_machine_is_compatible("ti,dra74"))
|
||||
soc_mask = CLKF_SOC_DRA74;
|
||||
if (of_machine_is_compatible("ti,dra76"))
|
||||
soc_mask = CLKF_SOC_DRA76;
|
||||
#endif
|
||||
#ifdef CONFIG_SOC_AM33XX
|
||||
if (of_machine_is_compatible("ti,am33xx")) {
|
||||
@@ -562,6 +570,12 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node)
|
||||
reg_data = data->regs;
|
||||
|
||||
while (reg_data->parent) {
|
||||
if ((reg_data->flags & CLKF_SOC_MASK) &&
|
||||
(reg_data->flags & soc_mask) == 0) {
|
||||
reg_data++;
|
||||
continue;
|
||||
}
|
||||
|
||||
hw = kzalloc(sizeof(*hw), GFP_KERNEL);
|
||||
if (!hw)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user