diff options
author | Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | 2014-01-31 01:48:48 +0100 |
---|---|---|
committer | Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | 2014-02-25 18:37:53 +0100 |
commit | 1217b790aea7ed0af150ba4d85905922e3a292e9 (patch) | |
tree | 63dae8b71e6fed0cbf7d4d9f19f3f8177e4a82f8 /drivers/pinctrl/mvebu/pinctrl-armada-370.c | |
parent | ad2a4f2b80da74c206dfb1e299475bb1feb5aa03 (diff) | |
download | op-kernel-dev-1217b790aea7ed0af150ba4d85905922e3a292e9.zip op-kernel-dev-1217b790aea7ed0af150ba4d85905922e3a292e9.tar.gz |
pinctrl: mvebu: move resource allocation to SoC specific drivers
The way that mvebu pinctrl is designed, requesting mpp registers
in common pinctrl driver does not allow SoC specific drivers to
access this resource.
Move resource allocation in each SoC pinctrl driver and enable
already provided mpp_{set,get} callbacks.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'drivers/pinctrl/mvebu/pinctrl-armada-370.c')
-rw-r--r-- | drivers/pinctrl/mvebu/pinctrl-armada-370.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-370.c b/drivers/pinctrl/mvebu/pinctrl-armada-370.c index fc3162c..670e5b0 100644 --- a/drivers/pinctrl/mvebu/pinctrl-armada-370.c +++ b/drivers/pinctrl/mvebu/pinctrl-armada-370.c @@ -385,7 +385,7 @@ static struct of_device_id armada_370_pinctrl_of_match[] = { }; static struct mvebu_mpp_ctrl mv88f6710_mpp_controls[] = { - MPP_REG_CTRL(0, 65), + MPP_FUNC_CTRL(0, 65, NULL, armada_370_mpp_ctrl), }; static struct pinctrl_gpio_range mv88f6710_mpp_gpio_ranges[] = { @@ -397,6 +397,12 @@ static struct pinctrl_gpio_range mv88f6710_mpp_gpio_ranges[] = { static int armada_370_pinctrl_probe(struct platform_device *pdev) { struct mvebu_pinctrl_soc_info *soc = &armada_370_pinctrl_info; + struct resource *res; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + mpp_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(mpp_base)) + return PTR_ERR(mpp_base); soc->variant = 0; /* no variants for Armada 370 */ soc->controls = mv88f6710_mpp_controls; |