diff options
author | Luka Perkov <luka@openwrt.org> | 2014-02-11 02:07:41 +0000 |
---|---|---|
committer | Luka Perkov <luka@openwrt.org> | 2014-02-11 02:07:41 +0000 |
commit | 3af779eb172b0438f77e8a01a97dd0eb9a146076 (patch) | |
tree | 23838dbde109e79f4c4763dbf78a983aeeefafe1 /target/linux/mvebu/patches-3.10/0125-mtd-nand-pxa3xx-Allow-devices-with-no-dma-resources.patch | |
parent | 69d323f23119ce6986c2803f34d95869144a00e6 (diff) | |
download | upstream-3af779eb172b0438f77e8a01a97dd0eb9a146076.tar.gz upstream-3af779eb172b0438f77e8a01a97dd0eb9a146076.tar.bz2 upstream-3af779eb172b0438f77e8a01a97dd0eb9a146076.zip |
mvebu: backport mainline patches from kernel 3.12
This is a backport of the patches accepted to the Linux mainline related to
mvebu SoC (Armada XP and Armada 370) between Linux v3.11, and Linux v3.12.
This work mainly covers:
* Ground work for sharing the pxa nand driver(drivers/mtd/nand/pxa3xx_nand.c)
between the PXA family,and the Armada family.
* Further updates to the mvebu MBus.
* Work and ground work for enabling MSI on the Armada family.
* some phy / mdio bus initialization related work.
* Device tree binding documentation update.
Signed-off-by: Seif Mazareeb <seif.mazareeb@gmail.com>
CC: Luka Perkov <luka@openwrt.org>
SVN-Revision: 39565
Diffstat (limited to 'target/linux/mvebu/patches-3.10/0125-mtd-nand-pxa3xx-Allow-devices-with-no-dma-resources.patch')
-rw-r--r-- | target/linux/mvebu/patches-3.10/0125-mtd-nand-pxa3xx-Allow-devices-with-no-dma-resources.patch | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-3.10/0125-mtd-nand-pxa3xx-Allow-devices-with-no-dma-resources.patch b/target/linux/mvebu/patches-3.10/0125-mtd-nand-pxa3xx-Allow-devices-with-no-dma-resources.patch new file mode 100644 index 0000000000..3c57e87492 --- /dev/null +++ b/target/linux/mvebu/patches-3.10/0125-mtd-nand-pxa3xx-Allow-devices-with-no-dma-resources.patch @@ -0,0 +1,78 @@ +From c26369f5b9929e1187ccf716d6d1678196ec0b4f Mon Sep 17 00:00:00 2001 +From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> +Date: Mon, 12 Aug 2013 14:14:58 -0300 +Subject: [PATCH 125/203] mtd: nand: pxa3xx: Allow devices with no dma + resources + +When use_dma=0 there's no point in requesting resources for dma, +since they won't be used anyway. Therefore we remove that requirement, +therefore allowing devices without dma to pass the driver probe. + +Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> +Tested-by: Daniel Mack <zonque@gmail.com> +Signed-off-by: Brian Norris <computersforpeace@gmail.com> +Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> +--- + drivers/mtd/nand/pxa3xx_nand.c | 51 +++++++++++++++++++++++------------------- + 1 file changed, 28 insertions(+), 23 deletions(-) + +--- a/drivers/mtd/nand/pxa3xx_nand.c ++++ b/drivers/mtd/nand/pxa3xx_nand.c +@@ -1141,30 +1141,35 @@ static int alloc_nand_resource(struct pl + if (ret < 0) + return ret; + +- /* +- * This is a dirty hack to make this driver work from devicetree +- * bindings. It can be removed once we have a prober DMA controller +- * framework for DT. +- */ +- if (pdev->dev.of_node && of_machine_is_compatible("marvell,pxa3xx")) { +- info->drcmr_dat = 97; +- info->drcmr_cmd = 99; +- } else { +- r = platform_get_resource(pdev, IORESOURCE_DMA, 0); +- if (r == NULL) { +- dev_err(&pdev->dev, "no resource defined for data DMA\n"); +- ret = -ENXIO; +- goto fail_disable_clk; +- } +- info->drcmr_dat = r->start; ++ if (use_dma) { ++ /* ++ * This is a dirty hack to make this driver work from ++ * devicetree bindings. It can be removed once we have ++ * a prober DMA controller framework for DT. ++ */ ++ if (pdev->dev.of_node && ++ of_machine_is_compatible("marvell,pxa3xx")) { ++ info->drcmr_dat = 97; ++ info->drcmr_cmd = 99; ++ } else { ++ r = platform_get_resource(pdev, IORESOURCE_DMA, 0); ++ if (r == NULL) { ++ dev_err(&pdev->dev, ++ "no resource defined for data DMA\n"); ++ ret = -ENXIO; ++ goto fail_disable_clk; ++ } ++ info->drcmr_dat = r->start; + +- r = platform_get_resource(pdev, IORESOURCE_DMA, 1); +- if (r == NULL) { +- dev_err(&pdev->dev, "no resource defined for command DMA\n"); +- ret = -ENXIO; +- goto fail_disable_clk; ++ r = platform_get_resource(pdev, IORESOURCE_DMA, 1); ++ if (r == NULL) { ++ dev_err(&pdev->dev, ++ "no resource defined for cmd DMA\n"); ++ ret = -ENXIO; ++ goto fail_disable_clk; ++ } ++ info->drcmr_cmd = r->start; + } +- info->drcmr_cmd = r->start; + } + + irq = platform_get_irq(pdev, 0); |