aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/patches-3.6/433-MTD-m25p80-allow-passing-pp_data.patch
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2012-10-25 21:16:51 +0000
committerFlorian Fainelli <florian@openwrt.org>2012-10-25 21:16:51 +0000
commit8d69af7c9fff947e2e53ba955cf6c84df3f1391e (patch)
tree192a79439e8d6b82dd39af6ac6f019c472cdc1c3 /target/linux/brcm63xx/patches-3.6/433-MTD-m25p80-allow-passing-pp_data.patch
parent6a699a8ae80b5b6ff6559bad1297242c8daf8934 (diff)
downloadupstream-8d69af7c9fff947e2e53ba955cf6c84df3f1391e.tar.gz
upstream-8d69af7c9fff947e2e53ba955cf6c84df3f1391e.tar.bz2
upstream-8d69af7c9fff947e2e53ba955cf6c84df3f1391e.zip
add preliminary support for 3.6 kernel
SVN-Revision: 33936
Diffstat (limited to 'target/linux/brcm63xx/patches-3.6/433-MTD-m25p80-allow-passing-pp_data.patch')
-rw-r--r--target/linux/brcm63xx/patches-3.6/433-MTD-m25p80-allow-passing-pp_data.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-3.6/433-MTD-m25p80-allow-passing-pp_data.patch b/target/linux/brcm63xx/patches-3.6/433-MTD-m25p80-allow-passing-pp_data.patch
new file mode 100644
index 0000000000..75e58896ed
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.6/433-MTD-m25p80-allow-passing-pp_data.patch
@@ -0,0 +1,40 @@
+From 7f17dfe9009beb07a3de0e380932a725293829df Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jonas.gorski@gmail.com>
+Date: Tue, 1 May 2012 17:33:03 +0200
+Subject: [PATCH 64/79] MTD: m25p80: allow passing pp_data
+
+---
+ drivers/mtd/devices/m25p80.c | 3 +++
+ include/linux/spi/flash.h | 2 ++
+ 2 files changed, 5 insertions(+)
+
+--- a/drivers/mtd/devices/m25p80.c
++++ b/drivers/mtd/devices/m25p80.c
+@@ -861,6 +861,9 @@ static int __devinit m25p_probe(struct s
+ dev_warn(&spi->dev, "unrecognized id %s\n", data->type);
+ }
+
++ if (data && data->pp_data)
++ memcpy(&ppdata, data->pp_data, sizeof(ppdata));
++
+ info = (void *)id->driver_data;
+
+ if (info->jedec_id) {
+--- a/include/linux/spi/flash.h
++++ b/include/linux/spi/flash.h
+@@ -12,6 +12,7 @@ struct mtd_part_parser_data;
+ * with chips that can't be queried for JEDEC or other IDs
+ * @part_probe_types: optional list of MTD parser names to use for
+ * partitioning
++ * @pp_data: optional partition parser data.
+ *
+ * @max_transfer_len: option maximum read/write length limitation for
+ * SPI controllers not able to transfer any length commands.
+@@ -30,6 +31,7 @@ struct flash_platform_data {
+ char *type;
+
+ const char **part_probe_types;
++ struct mtd_part_parser_data *pp_data;
+
+ unsigned int max_transfer_len;
+ /* we'll likely add more ... use JEDEC IDs, etc */