kernel: bump 4.19 to 4.19.86
[openwrt/staging/stintel.git] / target / linux / gemini / patches-4.19 / 0005-mtd-physmap_of-Move-custom-initialization.patch
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
5
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
10 them.
11
12 Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
13 ---
14 drivers/mtd/maps/physmap_of_core.c | 15 ++++++++-------
15 1 file changed, 8 insertions(+), 7 deletions(-)
16
17 --- a/drivers/mtd/maps/physmap_of_core.c
18 +++ b/drivers/mtd/maps/physmap_of_core.c
19 @@ -231,6 +231,9 @@ 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;
22
23 + simple_map_init(&info->list[i].map);
24 +
25 + /* Variants can override map accessors */
26 err = of_flash_probe_gemini(dev, dp, &info->list[i].map);
27 if (err)
28 goto err_out;
29 @@ -238,8 +241,6 @@ static int of_flash_probe(struct platfor
30 if (err)
31 goto err_out;
32
33 - simple_map_init(&info->list[i].map);
34 -
35 /*
36 * On some platforms (e.g. MPC5200) a direct 1:1 mapping
37 * may cause problems with JFFS2 usage, as the local bus (LPB)