Commit f90bec20 authored by Antoine Tenart's avatar Antoine Tenart Committed by Sebastian Hesselbarth

pinctrl: berlin: drop SoC stub provided regmap

With convertsion to simple-mfd sub-nodes, drop the regmap registration
by SoC stubs.
Signed-off-by: default avatarAntoine Tenart <antoine.tenart@free-electrons.com>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
parent 630c986b
...@@ -217,14 +217,6 @@ static const struct berlin_pinctrl_desc berlin2_sysmgr_pinctrl_data = { ...@@ -217,14 +217,6 @@ static const struct berlin_pinctrl_desc berlin2_sysmgr_pinctrl_data = {
}; };
static const struct of_device_id berlin2_pinctrl_match[] = { static const struct of_device_id berlin2_pinctrl_match[] = {
{
.compatible = "marvell,berlin2-chip-ctrl",
.data = &berlin2_soc_pinctrl_data
},
{
.compatible = "marvell,berlin2-system-ctrl",
.data = &berlin2_sysmgr_pinctrl_data
},
{ {
.compatible = "marvell,berlin2-soc-pinctrl", .compatible = "marvell,berlin2-soc-pinctrl",
.data = &berlin2_soc_pinctrl_data .data = &berlin2_soc_pinctrl_data
...@@ -241,28 +233,6 @@ static int berlin2_pinctrl_probe(struct platform_device *pdev) ...@@ -241,28 +233,6 @@ static int berlin2_pinctrl_probe(struct platform_device *pdev)
{ {
const struct of_device_id *match = const struct of_device_id *match =
of_match_device(berlin2_pinctrl_match, &pdev->dev); of_match_device(berlin2_pinctrl_match, &pdev->dev);
struct regmap_config *rmconfig;
struct regmap *regmap;
struct resource *res;
void __iomem *base;
rmconfig = devm_kzalloc(&pdev->dev, sizeof(*rmconfig), GFP_KERNEL);
if (!rmconfig)
return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base))
return PTR_ERR(base);
rmconfig->reg_bits = 32,
rmconfig->val_bits = 32,
rmconfig->reg_stride = 4,
rmconfig->max_register = resource_size(res);
regmap = devm_regmap_init_mmio(&pdev->dev, base, rmconfig);
if (IS_ERR(regmap))
return PTR_ERR(regmap);
return berlin_pinctrl_probe(pdev, match->data); return berlin_pinctrl_probe(pdev, match->data);
} }
......
...@@ -160,14 +160,6 @@ static const struct berlin_pinctrl_desc berlin2cd_sysmgr_pinctrl_data = { ...@@ -160,14 +160,6 @@ static const struct berlin_pinctrl_desc berlin2cd_sysmgr_pinctrl_data = {
}; };
static const struct of_device_id berlin2cd_pinctrl_match[] = { static const struct of_device_id berlin2cd_pinctrl_match[] = {
{
.compatible = "marvell,berlin2cd-chip-ctrl",
.data = &berlin2cd_soc_pinctrl_data
},
{
.compatible = "marvell,berlin2cd-system-ctrl",
.data = &berlin2cd_sysmgr_pinctrl_data
},
{ {
.compatible = "marvell,berlin2cd-soc-pinctrl", .compatible = "marvell,berlin2cd-soc-pinctrl",
.data = &berlin2cd_soc_pinctrl_data .data = &berlin2cd_soc_pinctrl_data
...@@ -184,28 +176,6 @@ static int berlin2cd_pinctrl_probe(struct platform_device *pdev) ...@@ -184,28 +176,6 @@ static int berlin2cd_pinctrl_probe(struct platform_device *pdev)
{ {
const struct of_device_id *match = const struct of_device_id *match =
of_match_device(berlin2cd_pinctrl_match, &pdev->dev); of_match_device(berlin2cd_pinctrl_match, &pdev->dev);
struct regmap_config *rmconfig;
struct regmap *regmap;
struct resource *res;
void __iomem *base;
rmconfig = devm_kzalloc(&pdev->dev, sizeof(*rmconfig), GFP_KERNEL);
if (!rmconfig)
return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base))
return PTR_ERR(base);
rmconfig->reg_bits = 32,
rmconfig->val_bits = 32,
rmconfig->reg_stride = 4,
rmconfig->max_register = resource_size(res);
regmap = devm_regmap_init_mmio(&pdev->dev, base, rmconfig);
if (IS_ERR(regmap))
return PTR_ERR(regmap);
return berlin_pinctrl_probe(pdev, match->data); return berlin_pinctrl_probe(pdev, match->data);
} }
......
...@@ -379,14 +379,6 @@ static const struct berlin_pinctrl_desc berlin2q_sysmgr_pinctrl_data = { ...@@ -379,14 +379,6 @@ static const struct berlin_pinctrl_desc berlin2q_sysmgr_pinctrl_data = {
}; };
static const struct of_device_id berlin2q_pinctrl_match[] = { static const struct of_device_id berlin2q_pinctrl_match[] = {
{
.compatible = "marvell,berlin2q-chip-ctrl",
.data = &berlin2q_soc_pinctrl_data,
},
{
.compatible = "marvell,berlin2q-system-ctrl",
.data = &berlin2q_sysmgr_pinctrl_data,
},
{ {
.compatible = "marvell,berlin2q-soc-pinctrl", .compatible = "marvell,berlin2q-soc-pinctrl",
.data = &berlin2q_soc_pinctrl_data, .data = &berlin2q_soc_pinctrl_data,
...@@ -403,28 +395,6 @@ static int berlin2q_pinctrl_probe(struct platform_device *pdev) ...@@ -403,28 +395,6 @@ static int berlin2q_pinctrl_probe(struct platform_device *pdev)
{ {
const struct of_device_id *match = const struct of_device_id *match =
of_match_device(berlin2q_pinctrl_match, &pdev->dev); of_match_device(berlin2q_pinctrl_match, &pdev->dev);
struct regmap_config *rmconfig;
struct regmap *regmap;
struct resource *res;
void __iomem *base;
rmconfig = devm_kzalloc(&pdev->dev, sizeof(*rmconfig), GFP_KERNEL);
if (!rmconfig)
return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base))
return PTR_ERR(base);
rmconfig->reg_bits = 32,
rmconfig->val_bits = 32,
rmconfig->reg_stride = 4,
rmconfig->max_register = resource_size(res);
regmap = devm_regmap_init_mmio(&pdev->dev, base, rmconfig);
if (IS_ERR(regmap))
return PTR_ERR(regmap);
return berlin_pinctrl_probe(pdev, match->data); return berlin_pinctrl_probe(pdev, match->data);
} }
......
...@@ -301,8 +301,6 @@ int berlin_pinctrl_probe(struct platform_device *pdev, ...@@ -301,8 +301,6 @@ int berlin_pinctrl_probe(struct platform_device *pdev,
struct regmap *regmap; struct regmap *regmap;
int ret; int ret;
regmap = dev_get_regmap(&pdev->dev, NULL);
if (!regmap)
regmap = syscon_node_to_regmap(parent_np); regmap = syscon_node_to_regmap(parent_np);
of_node_put(parent_np); of_node_put(parent_np);
if (IS_ERR(regmap)) if (IS_ERR(regmap))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment