summaryrefslogtreecommitdiff
path: root/target/linux/mvebu/patches-3.10/0113-mtd-nand-use-dev_get_platdata.patch
diff options
context:
space:
mode:
authorluka <luka@3c298f89-4303-0410-b956-a3cf2f4a3e73>2014-02-11 02:07:41 +0000
committerluka <luka@3c298f89-4303-0410-b956-a3cf2f4a3e73>2014-02-11 02:07:41 +0000
commit79312bc73a529d239ae64957876cc28c87f4b64f (patch)
tree74954deb17c22532d39672450df39812b548af80 /target/linux/mvebu/patches-3.10/0113-mtd-nand-use-dev_get_platdata.patch
parent1d4ea10d6ee10906ee9a605c6ea5119103ceac6f (diff)
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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39565 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/mvebu/patches-3.10/0113-mtd-nand-use-dev_get_platdata.patch')
-rw-r--r--target/linux/mvebu/patches-3.10/0113-mtd-nand-use-dev_get_platdata.patch80
1 files changed, 80 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-3.10/0113-mtd-nand-use-dev_get_platdata.patch b/target/linux/mvebu/patches-3.10/0113-mtd-nand-use-dev_get_platdata.patch
new file mode 100644
index 0000000000..a77ab9f923
--- /dev/null
+++ b/target/linux/mvebu/patches-3.10/0113-mtd-nand-use-dev_get_platdata.patch
@@ -0,0 +1,80 @@
+From f37031e030eb05ba579c82b9e0424d2608c1ad67 Mon Sep 17 00:00:00 2001
+From: Jingoo Han <jg1.han@samsung.com>
+Date: Tue, 30 Jul 2013 17:18:33 +0900
+Subject: [PATCH 113/203] mtd: nand: use dev_get_platdata()
+
+Use the wrapper function for retrieving the platform data instead of
+accessing dev->platform_data directly.
+
+Signed-off-by: Jingoo Han <jg1.han@samsung.com>
+Signed-off-by: Brian Norris <computersforpeace@gmail.com>
+Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
+---
+ drivers/mtd/nand/pxa3xx_nand.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+--- a/drivers/mtd/nand/pxa3xx_nand.c
++++ b/drivers/mtd/nand/pxa3xx_nand.c
+@@ -815,7 +815,7 @@ static int pxa3xx_nand_config_flash(stru
+ const struct pxa3xx_nand_flash *f)
+ {
+ struct platform_device *pdev = info->pdev;
+- struct pxa3xx_nand_platform_data *pdata = pdev->dev.platform_data;
++ struct pxa3xx_nand_platform_data *pdata = dev_get_platdata(&pdev->dev);
+ struct pxa3xx_nand_host *host = info->host[info->cs];
+ uint32_t ndcr = 0x0; /* enable all interrupts */
+
+@@ -958,7 +958,7 @@ static int pxa3xx_nand_scan(struct mtd_i
+ struct pxa3xx_nand_host *host = mtd->priv;
+ struct pxa3xx_nand_info *info = host->info_data;
+ struct platform_device *pdev = info->pdev;
+- struct pxa3xx_nand_platform_data *pdata = pdev->dev.platform_data;
++ struct pxa3xx_nand_platform_data *pdata = dev_get_platdata(&pdev->dev);
+ struct nand_flash_dev pxa3xx_flash_ids[2], *def = NULL;
+ const struct pxa3xx_nand_flash *f = NULL;
+ struct nand_chip *chip = mtd->priv;
+@@ -1058,7 +1058,7 @@ static int alloc_nand_resource(struct pl
+ struct resource *r;
+ int ret, irq, cs;
+
+- pdata = pdev->dev.platform_data;
++ pdata = dev_get_platdata(&pdev->dev);
+ info = devm_kzalloc(&pdev->dev, sizeof(*info) + (sizeof(*mtd) +
+ sizeof(*host)) * pdata->num_cs, GFP_KERNEL);
+ if (!info)
+@@ -1176,7 +1176,7 @@ static int pxa3xx_nand_remove(struct pla
+ if (!info)
+ return 0;
+
+- pdata = pdev->dev.platform_data;
++ pdata = dev_get_platdata(&pdev->dev);
+
+ irq = platform_get_irq(pdev, 0);
+ if (irq >= 0)
+@@ -1239,7 +1239,7 @@ static int pxa3xx_nand_probe(struct plat
+ if (ret)
+ return ret;
+
+- pdata = pdev->dev.platform_data;
++ pdata = dev_get_platdata(&pdev->dev);
+ if (!pdata) {
+ dev_err(&pdev->dev, "no platform data defined\n");
+ return -ENODEV;
+@@ -1286,7 +1286,7 @@ static int pxa3xx_nand_suspend(struct pl
+ struct mtd_info *mtd;
+ int cs;
+
+- pdata = pdev->dev.platform_data;
++ pdata = dev_get_platdata(&pdev->dev);
+ if (info->state) {
+ dev_err(&pdev->dev, "driver busy, state = %d\n", info->state);
+ return -EAGAIN;
+@@ -1307,7 +1307,7 @@ static int pxa3xx_nand_resume(struct pla
+ struct mtd_info *mtd;
+ int cs;
+
+- pdata = pdev->dev.platform_data;
++ pdata = dev_get_platdata(&pdev->dev);
+ /* We don't want to handle interrupt without calling mtd routine */
+ disable_int(info, NDCR_INT_MASK);
+