OpenWrt – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 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 @@ -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;
22  
23 - err = of_flash_probe_gemini(dev, dp, &info->list[i].map);
24 - if (err)
25 - goto err_out;
26 - err = of_flash_probe_versatile(dev, dp, &info->list[i].map);
27 - if (err)
28 - goto err_out;
29 -
30 err = -ENOMEM;
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
34  
35 simple_map_init(&info->list[i].map);
36  
37 + /* Variants can override map accessors */
38 + err = of_flash_probe_gemini(dev, dp, &info->list[i].map);
39 + if (err)
40 + goto err_out;
41 + err = of_flash_probe_versatile(dev, dp, &info->list[i].map);
42 + if (err)
43 + goto err_out;
44 +
45 /*
46 * On some platforms (e.g. MPC5200) a direct 1:1 mapping
47 * may cause problems with JFFS2 usage, as the local bus (LPB)