ARM: omap2+: control: add support for auxiliary control module instances
Control module can have multiple instances in a system, each with separate address space and features. Add base support for these auxiliary instances, with support for syscon and clock mappings under them. Signed-off-by: Tero Kristo <t-kristo@ti.com> Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
parent
e33509c19d
commit
04dfac0906
|
@ -623,6 +623,7 @@ void __init omap3_ctrl_init(void)
|
||||||
|
|
||||||
struct control_init_data {
|
struct control_init_data {
|
||||||
int index;
|
int index;
|
||||||
|
void __iomem *mem;
|
||||||
s16 offset;
|
s16 offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -660,15 +661,21 @@ int __init omap2_control_base_init(void)
|
||||||
struct device_node *np;
|
struct device_node *np;
|
||||||
const struct of_device_id *match;
|
const struct of_device_id *match;
|
||||||
struct control_init_data *data;
|
struct control_init_data *data;
|
||||||
|
void __iomem *mem;
|
||||||
|
|
||||||
for_each_matching_node_and_match(np, omap_scrm_dt_match_table, &match) {
|
for_each_matching_node_and_match(np, omap_scrm_dt_match_table, &match) {
|
||||||
data = (struct control_init_data *)match->data;
|
data = (struct control_init_data *)match->data;
|
||||||
|
|
||||||
omap2_ctrl_base = of_iomap(np, 0);
|
mem = of_iomap(np, 0);
|
||||||
if (!omap2_ctrl_base)
|
if (!mem)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
omap2_ctrl_offset = data->offset;
|
if (data->index == TI_CLKM_CTRL) {
|
||||||
|
omap2_ctrl_base = mem;
|
||||||
|
omap2_ctrl_offset = data->offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
data->mem = mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -713,7 +720,7 @@ int __init omap_control_init(void)
|
||||||
} else {
|
} else {
|
||||||
/* No scm_conf found, direct access */
|
/* No scm_conf found, direct access */
|
||||||
ret = omap2_clk_provider_init(np, data->index, NULL,
|
ret = omap2_clk_provider_init(np, data->index, NULL,
|
||||||
omap2_ctrl_base);
|
data->mem);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,6 +203,7 @@ enum {
|
||||||
TI_CLKM_PRM,
|
TI_CLKM_PRM,
|
||||||
TI_CLKM_SCRM,
|
TI_CLKM_SCRM,
|
||||||
TI_CLKM_CTRL,
|
TI_CLKM_CTRL,
|
||||||
|
TI_CLKM_CTRL_AUX,
|
||||||
TI_CLKM_PLLSS,
|
TI_CLKM_PLLSS,
|
||||||
CLK_MAX_MEMMAPS
|
CLK_MAX_MEMMAPS
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue