1 From 58ecb60d53d43e8d584708722a2cf851ba88f9e1 Mon Sep 17 00:00:00 2001
2 From: Linus Walleij <linus.walleij@linaro.org>
3 Date: Thu, 11 Oct 2018 19:53:40 +0200
4 Subject: [PATCH 05/18] mtd: physmap_of: Move custom initialization
6 In order to be able to assign custom complex mappings
7 to the physmap_of plugin for Gemini, move the initialization
8 so that the simple map is initialized before we enter the
9 platform-specific functions so the latter can override
12 Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
14 drivers/mtd/maps/physmap_of_core.c | 15 ++++++++-------
15 1 file changed, 8 insertions(+), 7 deletions(-)
17 --- a/drivers/mtd/maps/physmap_of_core.c
18 +++ b/drivers/mtd/maps/physmap_of_core.c
19 @@ -239,13 +239,6 @@ static int of_flash_probe(struct platfor
20 else if (of_property_read_bool(dp, "little-endian"))
21 info->list[i].map.swap = CFI_LITTLE_ENDIAN;
23 - err = of_flash_probe_gemini(dev, dp, &info->list[i].map);
26 - err = of_flash_probe_versatile(dev, dp, &info->list[i].map);
31 info->list[i].map.virt = ioremap(info->list[i].map.phys,
32 info->list[i].map.size);
33 @@ -257,6 +250,14 @@ static int of_flash_probe(struct platfor
35 simple_map_init(&info->list[i].map);
37 + /* Variants can override map accessors */
38 + err = of_flash_probe_gemini(dev, dp, &info->list[i].map);
41 + err = of_flash_probe_versatile(dev, dp, &info->list[i].map);
46 * On some platforms (e.g. MPC5200) a direct 1:1 mapping
47 * may cause problems with JFFS2 usage, as the local bus (LPB)