aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2014-12-08 17:39:07 +0000
committerRafał Miłecki <zajec5@gmail.com>2014-12-08 17:39:07 +0000
commit573007af32341d2fa50c1e43262da1a7776737b8 (patch)
tree7cd7de1ba29b09d0ce4a5b2b9cf31d62977bfa87 /target/linux
parentff439a95744a859c86d3ad7c9b25a394507beb0a (diff)
downloadupstream-573007af32341d2fa50c1e43262da1a7776737b8.tar.gz
upstream-573007af32341d2fa50c1e43262da1a7776737b8.tar.bz2
upstream-573007af32341d2fa50c1e43262da1a7776737b8.zip
bcm53xx: bcm_nand: switch from cmdlinepart to ofpart
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43580 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/bcm53xx/patches-3.14/420-mtd-bcm5301x_nand.patch9
-rw-r--r--target/linux/bcm53xx/patches-3.18/420-mtd-bcm5301x_nand.patch9
2 files changed, 12 insertions, 6 deletions
diff --git a/target/linux/bcm53xx/patches-3.14/420-mtd-bcm5301x_nand.patch b/target/linux/bcm53xx/patches-3.14/420-mtd-bcm5301x_nand.patch
index 53840f3c4b..7571eef8a0 100644
--- a/target/linux/bcm53xx/patches-3.14/420-mtd-bcm5301x_nand.patch
+++ b/target/linux/bcm53xx/patches-3.14/420-mtd-bcm5301x_nand.patch
@@ -22,7 +22,7 @@
nand-objs := nand_base.o nand_bbt.o
--- /dev/null
+++ b/drivers/mtd/nand/bcm_nand.c
-@@ -0,0 +1,1580 @@
+@@ -0,0 +1,1583 @@
+/*
+ * Nortstar NAND controller driver
+ *
@@ -64,6 +64,7 @@
+
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/nand.h>
++#include <linux/mtd/partitions.h>
+
+#define NANDC_MAX_CHIPS 2 /* Only 2 CSn supported in NorthStar */
+
@@ -1515,13 +1516,14 @@
+ return 0;
+}
+
-+static const char * const part_probes[] = { "bcm47xxpart", "cmdlinepart", NULL };
++static const char * const part_probes[] = { "ofpart", "bcm47xxpart", NULL };
+
+/*
+ * Top-level init function
+ */
+static int bcmnand_probe(struct bcma_device *core)
+{
++ struct mtd_part_parser_data parser_data;
+ struct device *dev = &core->dev;
+ struct bcmnand_ctrl *ctrl;
+ int res, i, irq;
@@ -1559,7 +1561,8 @@
+ if (res)
+ return res;
+
-+ res = mtd_device_parse_register(&ctrl->mtd, part_probes, NULL, NULL, 0);
++ parser_data.of_node = np;
++ res = mtd_device_parse_register(&ctrl->mtd, part_probes, &parser_data, NULL, 0);
+ if (res) {
+ dev_err(dev, "Failed to register MTD device: %d\n", res);
+ return res;
diff --git a/target/linux/bcm53xx/patches-3.18/420-mtd-bcm5301x_nand.patch b/target/linux/bcm53xx/patches-3.18/420-mtd-bcm5301x_nand.patch
index 1b2ed8edb2..c4bc51fe9b 100644
--- a/target/linux/bcm53xx/patches-3.18/420-mtd-bcm5301x_nand.patch
+++ b/target/linux/bcm53xx/patches-3.18/420-mtd-bcm5301x_nand.patch
@@ -22,7 +22,7 @@
nand-objs := nand_base.o nand_bbt.o nand_timings.o
--- /dev/null
+++ b/drivers/mtd/nand/bcm_nand.c
-@@ -0,0 +1,1580 @@
+@@ -0,0 +1,1583 @@
+/*
+ * Nortstar NAND controller driver
+ *
@@ -64,6 +64,7 @@
+
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/nand.h>
++#include <linux/mtd/partitions.h>
+
+#define NANDC_MAX_CHIPS 2 /* Only 2 CSn supported in NorthStar */
+
@@ -1515,13 +1516,14 @@
+ return 0;
+}
+
-+static const char * const part_probes[] = { "bcm47xxpart", "cmdlinepart", NULL };
++static const char * const part_probes[] = { "ofpart", "bcm47xxpart", NULL };
+
+/*
+ * Top-level init function
+ */
+static int bcmnand_probe(struct bcma_device *core)
+{
++ struct mtd_part_parser_data parser_data;
+ struct device *dev = &core->dev;
+ struct bcmnand_ctrl *ctrl;
+ int res, i, irq;
@@ -1559,7 +1561,8 @@
+ if (res)
+ return res;
+
-+ res = mtd_device_parse_register(&ctrl->mtd, part_probes, NULL, NULL, 0);
++ parser_data.of_node = np;
++ res = mtd_device_parse_register(&ctrl->mtd, part_probes, &parser_data, NULL, 0);
+ if (res) {
+ dev_err(dev, "Failed to register MTD device: %d\n", res);
+ return res;