summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/mvebu/pinctrl-kirkwood.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2017-01-13 11:03:30 +0000
committerLinus Walleij <linus.walleij@linaro.org>2017-01-18 09:56:35 +0100
commitad9ec4ecee6889321ae1752ce8793524a8cdfa7a (patch)
tree3db527cd0ad1da68a344ee2404c9715f48f3e25a /drivers/pinctrl/mvebu/pinctrl-kirkwood.c
parent44aa9d0604f578cdd839d2f5295a9d920fb54999 (diff)
downloadtalos-obmc-linux-ad9ec4ecee6889321ae1752ce8793524a8cdfa7a.tar.gz
talos-obmc-linux-ad9ec4ecee6889321ae1752ce8793524a8cdfa7a.zip
pinctrl: mvebu: switch drivers to generic simple mmio
Move the mvebu pinctrl drivers over to the generic simple mmio implementation, saving a substantial number of lines of code in the process. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/mvebu/pinctrl-kirkwood.c')
-rw-r--r--drivers/pinctrl/mvebu/pinctrl-kirkwood.c28
1 files changed, 5 insertions, 23 deletions
diff --git a/drivers/pinctrl/mvebu/pinctrl-kirkwood.c b/drivers/pinctrl/mvebu/pinctrl-kirkwood.c
index 89101f36f5d0..dad38d6dc646 100644
--- a/drivers/pinctrl/mvebu/pinctrl-kirkwood.c
+++ b/drivers/pinctrl/mvebu/pinctrl-kirkwood.c
@@ -21,20 +21,6 @@
#include "pinctrl-mvebu.h"
-static void __iomem *mpp_base;
-
-static int kirkwood_mpp_ctrl_get(struct mvebu_mpp_ctrl_data *data,
- unsigned pid, unsigned long *config)
-{
- return default_mpp_ctrl_get(mpp_base, pid, config);
-}
-
-static int kirkwood_mpp_ctrl_set(struct mvebu_mpp_ctrl_data *data,
- unsigned pid, unsigned long config)
-{
- return default_mpp_ctrl_set(mpp_base, pid, config);
-}
-
#define V(f6180, f6190, f6192, f6281, f6282, dx4122) \
((f6180 << 0) | (f6190 << 1) | (f6192 << 2) | \
(f6281 << 3) | (f6282 << 4) | (dx4122 << 5))
@@ -373,7 +359,7 @@ static struct mvebu_mpp_mode mv88f6xxx_mpp_modes[] = {
};
static const struct mvebu_mpp_ctrl mv88f6180_mpp_controls[] = {
- MPP_FUNC_CTRL(0, 44, NULL, kirkwood_mpp_ctrl),
+ MPP_FUNC_CTRL(0, 44, NULL, mvebu_mmio_mpp_ctrl),
};
static struct pinctrl_gpio_range mv88f6180_gpio_ranges[] = {
@@ -382,7 +368,7 @@ static struct pinctrl_gpio_range mv88f6180_gpio_ranges[] = {
};
static const struct mvebu_mpp_ctrl mv88f619x_mpp_controls[] = {
- MPP_FUNC_CTRL(0, 35, NULL, kirkwood_mpp_ctrl),
+ MPP_FUNC_CTRL(0, 35, NULL, mvebu_mmio_mpp_ctrl),
};
static struct pinctrl_gpio_range mv88f619x_gpio_ranges[] = {
@@ -391,7 +377,7 @@ static struct pinctrl_gpio_range mv88f619x_gpio_ranges[] = {
};
static const struct mvebu_mpp_ctrl mv88f628x_mpp_controls[] = {
- MPP_FUNC_CTRL(0, 49, NULL, kirkwood_mpp_ctrl),
+ MPP_FUNC_CTRL(0, 49, NULL, mvebu_mmio_mpp_ctrl),
};
static struct pinctrl_gpio_range mv88f628x_gpio_ranges[] = {
@@ -474,14 +460,10 @@ static int kirkwood_pinctrl_probe(struct platform_device *pdev)
struct resource *res;
const struct of_device_id *match =
of_match_device(kirkwood_pinctrl_of_match, &pdev->dev);
- pdev->dev.platform_data = (void *)match->data;
- 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);
+ pdev->dev.platform_data = (void *)match->data;
- return mvebu_pinctrl_probe(pdev);
+ return mvebu_pinctrl_simple_mmio_probe(pdev);
}
static struct platform_driver kirkwood_pinctrl_driver = {
OpenPOWER on IntegriCloud