brcm63xx: register SPI controllers through DT
[openwrt/openwrt.git] / target / linux / brcm63xx / patches-4.4 / 414-MTD-m25p80-allow-passing-pp_data.patch
1 From 7f17dfe9009beb07a3de0e380932a725293829df Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jonas.gorski@gmail.com>
3 Date: Tue, 1 May 2012 17:33:03 +0200
4 Subject: [PATCH 64/79] MTD: m25p80: allow passing pp_data
5
6 ---
7 drivers/mtd/devices/m25p80.c | 5 +++--
8 include/linux/spi/flash.h | 2 ++
9 2 files changed, 5 insertions(+)
10
11 --- a/drivers/mtd/devices/m25p80.c
12 +++ b/drivers/mtd/devices/m25p80.c
13 @@ -261,7 +261,8 @@ static int m25p_probe(struct spi_device
14 return ret;
15
16 return mtd_device_parse_register(&nor->mtd,
17 - data ? data->part_probe_types : NULL, NULL,
18 + data ? data->part_probe_types : NULL,
19 + data ? data->pp_data : NULL,
20 data ? data->parts : NULL,
21 data ? data->nr_parts : 0);
22 }
23 --- a/include/linux/spi/flash.h
24 +++ b/include/linux/spi/flash.h
25 @@ -12,6 +12,7 @@ struct mtd_part_parser_data;
26 * with chips that can't be queried for JEDEC or other IDs
27 * @part_probe_types: optional list of MTD parser names to use for
28 * partitioning
29 + * @pp_data: optional partition parser data.
30 *
31 * Board init code (in arch/.../mach-xxx/board-yyy.c files) can
32 * provide information about SPI flash parts (such as DataFlash) to
33 @@ -28,6 +29,7 @@ struct flash_platform_data {
34 char *type;
35
36 const char **part_probe_types;
37 + struct mtd_part_parser_data *pp_data;
38 /* we'll likely add more ... use JEDEC IDs, etc */
39 };
40