From 1217b790aea7ed0af150ba4d85905922e3a292e9 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Fri, 31 Jan 2014 01:48:48 +0100 Subject: 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 Signed-off-by: Thomas Petazzoni Tested-by: Andrew Lunn Tested-by: Thomas Petazzoni --- drivers/pinctrl/mvebu/pinctrl-dove.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'drivers/pinctrl/mvebu/pinctrl-dove.c') diff --git a/drivers/pinctrl/mvebu/pinctrl-dove.c b/drivers/pinctrl/mvebu/pinctrl-dove.c index 0a4afe4bc97e..95a306d64523 100644 --- a/drivers/pinctrl/mvebu/pinctrl-dove.c +++ b/drivers/pinctrl/mvebu/pinctrl-dove.c @@ -367,7 +367,7 @@ static struct mvebu_mpp_ctrl dove_mpp_controls[] = { MPP_FUNC_CTRL(13, 13, "mpp13", dove_pmu_mpp_ctrl), MPP_FUNC_CTRL(14, 14, "mpp14", dove_pmu_mpp_ctrl), MPP_FUNC_CTRL(15, 15, "mpp15", dove_pmu_mpp_ctrl), - MPP_REG_CTRL(16, 23), + MPP_FUNC_CTRL(16, 23, NULL, dove_mpp_ctrl), MPP_FUNC_CTRL(24, 39, "mpp_camera", dove_mpp4_ctrl), MPP_FUNC_CTRL(40, 45, "mpp_sdio0", dove_mpp4_ctrl), MPP_FUNC_CTRL(46, 51, "mpp_sdio1", dove_mpp4_ctrl), @@ -769,6 +769,7 @@ static struct of_device_id dove_pinctrl_of_match[] = { static int dove_pinctrl_probe(struct platform_device *pdev) { + struct resource *res; const struct of_device_id *match = of_match_device(dove_pinctrl_of_match, &pdev->dev); pdev->dev.platform_data = (void *)match->data; @@ -784,6 +785,11 @@ static int dove_pinctrl_probe(struct platform_device *pdev) } clk_prepare_enable(clk); + 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); + return mvebu_pinctrl_probe(pdev); } -- cgit v1.2.3