[PATCH 3/6] fixup! pinctrl: mvebu: move resource allocation to SoC specific drivers
From: Thomas Petazzoni
Date: Thu Feb 13 2014 - 11:09:49 EST
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxxxxxxxxx>
---
drivers/pinctrl/mvebu/pinctrl-armada-375.c | 8 +++++++-
drivers/pinctrl/mvebu/pinctrl-armada-38x.c | 8 +++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-375.c b/drivers/pinctrl/mvebu/pinctrl-armada-375.c
index 459ca5d..50d0df05 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-375.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-375.c
@@ -417,7 +417,7 @@ static struct of_device_id armada_375_pinctrl_of_match[] = {
};
static struct mvebu_mpp_ctrl mv88f6720_mpp_controls[] = {
- MPP_REG_CTRL(0, 69),
+ MPP_FUNC_CTRL(0, 69, NULL, armada_375_mpp_ctrl),
};
static struct pinctrl_gpio_range mv88f6720_mpp_gpio_ranges[] = {
@@ -429,6 +429,12 @@ static struct pinctrl_gpio_range mv88f6720_mpp_gpio_ranges[] = {
static int armada_375_pinctrl_probe(struct platform_device *pdev)
{
struct mvebu_pinctrl_soc_info *soc = &armada_375_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 375 */
soc->controls = mv88f6720_mpp_controls;
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-38x.c b/drivers/pinctrl/mvebu/pinctrl-armada-38x.c
index 9265f17..b9e2b11 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-38x.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-38x.c
@@ -416,7 +416,7 @@ static struct of_device_id armada_38x_pinctrl_of_match[] = {
};
static struct mvebu_mpp_ctrl armada_38x_mpp_controls[] = {
- MPP_REG_CTRL(0, 59),
+ MPP_FUNC_CTRL(0, 59, NULL, armada_38x_mpp_ctrl),
};
static struct pinctrl_gpio_range armada_38x_mpp_gpio_ranges[] = {
@@ -429,10 +429,16 @@ static int armada_38x_pinctrl_probe(struct platform_device *pdev)
struct mvebu_pinctrl_soc_info *soc = &armada_38x_pinctrl_info;
const struct of_device_id *match =
of_match_device(armada_38x_pinctrl_of_match, &pdev->dev);
+ struct resource *res;
if (!match)
return -ENODEV;
+ 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 = (unsigned) match->data & 0xff;
soc->controls = armada_38x_mpp_controls;
--
1.8.3.2
--MP_/QCDS/7PET.ceInuxFmlCq=N
Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename=0004-fixup-pinctrl-mvebu-move-resource-allocation-to-SoC-.patch