Two omap5 specific aux control module patches for v4.17
On omap5 there is an aux control module that we are not handling currently for clocks, so let's add support for it. -----BEGIN PGP SIGNATURE----- iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAlqz2lIRHHRvbnlAYXRv bWlkZS5jb20ACgkQG9Q+yVyrpXO79xAArmNZj7HmQUCwBlXNV3gRqYo7tznId8aV hd2iMnBS0wcHfshfELaUxjZKh3Jc5RoEiEJceOiPOXOQhpetOW42dc7Ok7V3uG+w ljsdLtDUWkd5XTJ4BIeynec1p5Y/HKfhuKwruAvem/ZWu+RpfQfehIv7mHgt7+3c hxzaPH2uoujurnaQWxF6ROfqlf6sxiR9ZP85ta0toA/gmf4pxIfsWa8nVNRQB6kc TWjuDc64Ztn4quucb9pPbpRFTR67FN+D3ohbsM1y11lxhtUyrj15QmRz+yWHUGP+ UKyCRFb0yphjVVbiJehhXN3/V+F0GQTGgoWJaLBxFp2JeU3jxnp3nIojvrW9b+4B G1jDOFxA6Gl8xq9aFpVcdKt+FtRYnTORL48xXQXynCapdVnzUPXFaySJLaLoEfXn B1henmgROT4ekjA3Efmfg8fCCTPhxO7gW6dmmjEtJwVxTwuw1xkH2zSOHR0MfbR9 6hiGdT8CG8EoPGrxuWqsT/eLL2RSMRUWy9LBofVd5U3ZS9OhlWWzk4Sal29TRvM1 oSj2te59lEySaZAJ0VTWhjhkAAP22MIovk32mSOb7CHOwDUMuCij4wgllujVOLQJ qG73rFF5HpKXnhWoZqVjsdlUB2vO+K1DdMt0KIMnTqjiAIkN3SH5Bv9/0U3SBoTs Lld09xB1MOQ= =WMHn -----END PGP SIGNATURE----- Merge tag 'omap-for-v4.17/soc-pt2-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc Pull "Two omap5 specific aux control module patches for v4.17" from Tony Lindgren: On omap5 there is an aux control module that we are not handling currently for clocks, so let's add support for it. * tag 'omap-for-v4.17/soc-pt2-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP5: control: add support for control module wkup pad config ARM: omap2+: control: add support for auxiliary control module instances
This commit is contained in:
commit
064fe81ef2
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -635,6 +636,10 @@ static const struct control_init_data omap2_ctrl_data = {
|
||||||
.offset = -OMAP2_CONTROL_GENERAL,
|
.offset = -OMAP2_CONTROL_GENERAL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct control_init_data ctrl_aux_data = {
|
||||||
|
.index = TI_CLKM_CTRL_AUX,
|
||||||
|
};
|
||||||
|
|
||||||
static const struct of_device_id omap_scrm_dt_match_table[] = {
|
static const struct of_device_id omap_scrm_dt_match_table[] = {
|
||||||
{ .compatible = "ti,am3-scm", .data = &ctrl_data },
|
{ .compatible = "ti,am3-scm", .data = &ctrl_data },
|
||||||
{ .compatible = "ti,am4-scm", .data = &ctrl_data },
|
{ .compatible = "ti,am4-scm", .data = &ctrl_data },
|
||||||
|
@ -644,6 +649,7 @@ static const struct of_device_id omap_scrm_dt_match_table[] = {
|
||||||
{ .compatible = "ti,dm816-scrm", .data = &ctrl_data },
|
{ .compatible = "ti,dm816-scrm", .data = &ctrl_data },
|
||||||
{ .compatible = "ti,omap4-scm-core", .data = &ctrl_data },
|
{ .compatible = "ti,omap4-scm-core", .data = &ctrl_data },
|
||||||
{ .compatible = "ti,omap5-scm-core", .data = &ctrl_data },
|
{ .compatible = "ti,omap5-scm-core", .data = &ctrl_data },
|
||||||
|
{ .compatible = "ti,omap5-scm-wkup-pad-conf", .data = &ctrl_aux_data },
|
||||||
{ .compatible = "ti,dra7-scm-core", .data = &ctrl_data },
|
{ .compatible = "ti,dra7-scm-core", .data = &ctrl_data },
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
@ -660,15 +666,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 +725,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 a new issue