mvebu: backport mainline patches from kernel 3.11
[openwrt.git] / target / linux / mvebu / patches-3.10 / 0027-arm-mvebu-remove-hardcoded-static-I-O-mapping.patch
1 From fe4fce3c521f5d9f3a64c4d06a73a5e6b7324116 Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Wed, 5 Jun 2013 09:04:57 +0200
4 Subject: [PATCH 027/203] arm: mvebu: remove hardcoded static I/O mapping
5
6 Now that we have removed the need of the static I/O mapping for early
7 initialization reasons, and fixed the registers area length that were
8 broken, we can get rid of the static I/O mapping. Only the earlyprintk
9 mapping needs to be set up, using the debug_ll_io_init() helper
10 function.
11
12 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
13 Acked-by: Arnd Bergmann <arnd@arndb.de>
14 Signed-off-by: Jason Cooper <jason@lakedaemon.net>
15 ---
16  arch/arm/mach-mvebu/armada-370-xp.c | 11 +----------
17  arch/arm/mach-mvebu/armada-370-xp.h |  2 --
18  2 files changed, 1 insertion(+), 12 deletions(-)
19
20 --- a/arch/arm/mach-mvebu/armada-370-xp.c
21 +++ b/arch/arm/mach-mvebu/armada-370-xp.c
22 @@ -29,18 +29,9 @@
23  #include "common.h"
24  #include "coherency.h"
25  
26 -static struct map_desc armada_370_xp_io_desc[] __initdata = {
27 -       {
28 -               .virtual        = (unsigned long) ARMADA_370_XP_REGS_VIRT_BASE,
29 -               .pfn            = __phys_to_pfn(ARMADA_370_XP_REGS_PHYS_BASE),
30 -               .length         = ARMADA_370_XP_REGS_SIZE,
31 -               .type           = MT_DEVICE,
32 -       },
33 -};
34 -
35  static void __init armada_370_xp_map_io(void)
36  {
37 -       iotable_init(armada_370_xp_io_desc, ARRAY_SIZE(armada_370_xp_io_desc));
38 +       debug_ll_io_init();
39  }
40  
41  static void __init armada_370_xp_timer_and_clk_init(void)
42 --- a/arch/arm/mach-mvebu/armada-370-xp.h
43 +++ b/arch/arm/mach-mvebu/armada-370-xp.h
44 @@ -16,8 +16,6 @@
45  #define __MACH_ARMADA_370_XP_H
46  
47  #define ARMADA_370_XP_REGS_PHYS_BASE   0xd0000000
48 -#define ARMADA_370_XP_REGS_VIRT_BASE   IOMEM(0xfec00000)
49 -#define ARMADA_370_XP_REGS_SIZE                SZ_1M
50  
51  /* These defines can go away once mvebu-mbus has a DT binding */
52  #define ARMADA_370_XP_MBUS_WINS_BASE    (ARMADA_370_XP_REGS_PHYS_BASE + 0x20000)