From 518960de5fe311f05e1aeb030601e314af4f3f0c Mon Sep 17 00:00:00 2001 From: florian Date: Tue, 8 Jan 2013 22:20:16 +0000 Subject: mvebu: add inital support for Marvell Armada XP/370 SoCs This brings in the initial support for the Marvell Armada XP/370 SoCs. Successfully tested on RD-A370-A1 and DB-MV784MP-GP boards the following interfaces: - Ethernet - SDIO - GPIOs - SATA Signed-off-by: Florian Fainelli git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35058 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../patches-3.8/009-mmc_mvsdio_add_pinctrl.patch | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 target/linux/mvebu/patches-3.8/009-mmc_mvsdio_add_pinctrl.patch (limited to 'target/linux/mvebu/patches-3.8/009-mmc_mvsdio_add_pinctrl.patch') diff --git a/target/linux/mvebu/patches-3.8/009-mmc_mvsdio_add_pinctrl.patch b/target/linux/mvebu/patches-3.8/009-mmc_mvsdio_add_pinctrl.patch new file mode 100644 index 000000000..394fc4ceb --- /dev/null +++ b/target/linux/mvebu/patches-3.8/009-mmc_mvsdio_add_pinctrl.patch @@ -0,0 +1,48 @@ +On many Marvell SoCs, the pins used for the SDIO interface are part of +the MPP pins, that are muxable pins. In order to get the muxing of +those pins correct, this commit integrates the mvsdio driver with the +pinctrl infrastructure by calling devm_pinctrl_get_select_default() +during ->probe(). + +Note that we permit this function to fail because not all Marvell +platforms have yet been fully converted to using the pinctrl +infrastructure. + +Signed-off-by: Thomas Petazzoni +--- + drivers/mmc/host/mvsdio.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c +index 56954bc..feb16bd 100644 +--- a/drivers/mmc/host/mvsdio.c ++++ b/drivers/mmc/host/mvsdio.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -692,6 +693,7 @@ static int __init mvsd_probe(struct platform_device *pdev) + struct resource *r; + int ret, irq; + int gpio_card_detect, gpio_write_protect; ++ struct pinctrl *pinctrl; + + r = platform_get_resource(pdev, IORESOURCE_MEM, 0); + irq = platform_get_irq(pdev, 0); +@@ -713,6 +715,10 @@ static int __init mvsd_probe(struct platform_device *pdev) + host->dev = &pdev->dev; + host->res = r; + ++ pinctrl = devm_pinctrl_get_select_default(&pdev->dev); ++ if (IS_ERR(pinctrl)) ++ dev_warn(&pdev->dev, "no pins associated\n"); ++ + /* Some non-DT platforms do not pass a clock, and the clock + frequency is passed through platform_data. On DT platforms, + a clock must always be passed, even if there is no gatable +-- +1.7.9.5 -- cgit v1.2.3