diff options
| -rw-r--r-- | arch/arm/include/asm/mach/map.h | 7 | ||||
| -rw-r--r-- | arch/arm/kernel/debug.S | 14 | ||||
| -rw-r--r-- | arch/arm/mach-highbank/Makefile | 1 | ||||
| -rw-r--r-- | arch/arm/mach-highbank/core.h | 5 | ||||
| -rw-r--r-- | arch/arm/mach-highbank/highbank.c | 8 | ||||
| -rw-r--r-- | arch/arm/mach-highbank/lluart.c | 34 | ||||
| -rw-r--r-- | arch/arm/mm/mmu.c | 16 |
7 files changed, 39 insertions, 46 deletions
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h index 195ac2f9d3d3..2fe141fcc8d6 100644 --- a/arch/arm/include/asm/mach/map.h +++ b/arch/arm/include/asm/mach/map.h | |||
| @@ -40,6 +40,13 @@ extern void iotable_init(struct map_desc *, int); | |||
| 40 | extern void vm_reserve_area_early(unsigned long addr, unsigned long size, | 40 | extern void vm_reserve_area_early(unsigned long addr, unsigned long size, |
| 41 | void *caller); | 41 | void *caller); |
| 42 | 42 | ||
| 43 | #ifdef CONFIG_DEBUG_LL | ||
| 44 | extern void debug_ll_addr(unsigned long *paddr, unsigned long *vaddr); | ||
| 45 | extern void debug_ll_io_init(void); | ||
| 46 | #else | ||
| 47 | static inline void debug_ll_io_init(void) {} | ||
| 48 | #endif | ||
| 49 | |||
| 43 | struct mem_type; | 50 | struct mem_type; |
| 44 | extern const struct mem_type *get_mem_type(unsigned int type); | 51 | extern const struct mem_type *get_mem_type(unsigned int type); |
| 45 | /* | 52 | /* |
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index 66f711b2e0e8..6809200c31fb 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S | |||
| @@ -100,6 +100,13 @@ ENTRY(printch) | |||
| 100 | b 1b | 100 | b 1b |
| 101 | ENDPROC(printch) | 101 | ENDPROC(printch) |
| 102 | 102 | ||
| 103 | ENTRY(debug_ll_addr) | ||
| 104 | addruart r2, r3, ip | ||
| 105 | str r2, [r0] | ||
| 106 | str r3, [r1] | ||
| 107 | mov pc, lr | ||
| 108 | ENDPROC(debug_ll_addr) | ||
| 109 | |||
| 103 | #else | 110 | #else |
| 104 | 111 | ||
| 105 | ENTRY(printascii) | 112 | ENTRY(printascii) |
| @@ -119,4 +126,11 @@ ENTRY(printch) | |||
| 119 | mov pc, lr | 126 | mov pc, lr |
| 120 | ENDPROC(printch) | 127 | ENDPROC(printch) |
| 121 | 128 | ||
| 129 | ENTRY(debug_ll_addr) | ||
| 130 | mov r2, #0 | ||
| 131 | str r2, [r0] | ||
| 132 | str r2, [r1] | ||
| 133 | mov pc, lr | ||
| 134 | ENDPROC(debug_ll_addr) | ||
| 135 | |||
| 122 | #endif | 136 | #endif |
diff --git a/arch/arm/mach-highbank/Makefile b/arch/arm/mach-highbank/Makefile index 3ec8bdd25d09..8a1ef576d79f 100644 --- a/arch/arm/mach-highbank/Makefile +++ b/arch/arm/mach-highbank/Makefile | |||
| @@ -3,7 +3,6 @@ obj-y := highbank.o system.o smc.o | |||
| 3 | plus_sec := $(call as-instr,.arch_extension sec,+sec) | 3 | plus_sec := $(call as-instr,.arch_extension sec,+sec) |
| 4 | AFLAGS_smc.o :=-Wa,-march=armv7-a$(plus_sec) | 4 | AFLAGS_smc.o :=-Wa,-march=armv7-a$(plus_sec) |
| 5 | 5 | ||
| 6 | obj-$(CONFIG_DEBUG_HIGHBANK_UART) += lluart.o | ||
| 7 | obj-$(CONFIG_SMP) += platsmp.o | 6 | obj-$(CONFIG_SMP) += platsmp.o |
| 8 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 7 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
| 9 | obj-$(CONFIG_PM_SLEEP) += pm.o | 8 | obj-$(CONFIG_PM_SLEEP) += pm.o |
diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h index 068c68795c8c..80235b46cb58 100644 --- a/arch/arm/mach-highbank/core.h +++ b/arch/arm/mach-highbank/core.h | |||
| @@ -5,11 +5,6 @@ extern void highbank_set_cpu_jump(int cpu, void *jump_addr); | |||
| 5 | extern void highbank_clocks_init(void); | 5 | extern void highbank_clocks_init(void); |
| 6 | extern void highbank_restart(char, const char *); | 6 | extern void highbank_restart(char, const char *); |
| 7 | extern void __iomem *scu_base_addr; | 7 | extern void __iomem *scu_base_addr; |
| 8 | #ifdef CONFIG_DEBUG_HIGHBANK_UART | ||
| 9 | extern void highbank_lluart_map_io(void); | ||
| 10 | #else | ||
| 11 | static inline void highbank_lluart_map_io(void) {} | ||
| 12 | #endif | ||
| 13 | 8 | ||
| 14 | #ifdef CONFIG_PM_SLEEP | 9 | #ifdef CONFIG_PM_SLEEP |
| 15 | extern void highbank_pm_init(void); | 10 | extern void highbank_pm_init(void); |
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index 3e60e5744157..dc248167d206 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | #include <asm/hardware/gic.h> | 35 | #include <asm/hardware/gic.h> |
| 36 | #include <asm/hardware/cache-l2x0.h> | 36 | #include <asm/hardware/cache-l2x0.h> |
| 37 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
| 38 | #include <asm/mach/map.h> | ||
| 38 | #include <asm/mach/time.h> | 39 | #include <asm/mach/time.h> |
| 39 | 40 | ||
| 40 | #include "core.h" | 41 | #include "core.h" |
| @@ -53,11 +54,6 @@ static void __init highbank_scu_map_io(void) | |||
| 53 | scu_base_addr = ioremap(base, SZ_4K); | 54 | scu_base_addr = ioremap(base, SZ_4K); |
| 54 | } | 55 | } |
| 55 | 56 | ||
| 56 | static void __init highbank_map_io(void) | ||
| 57 | { | ||
| 58 | highbank_lluart_map_io(); | ||
| 59 | } | ||
| 60 | |||
| 61 | #define HB_JUMP_TABLE_PHYS(cpu) (0x40 + (0x10 * (cpu))) | 57 | #define HB_JUMP_TABLE_PHYS(cpu) (0x40 + (0x10 * (cpu))) |
| 62 | #define HB_JUMP_TABLE_VIRT(cpu) phys_to_virt(HB_JUMP_TABLE_PHYS(cpu)) | 58 | #define HB_JUMP_TABLE_VIRT(cpu) phys_to_virt(HB_JUMP_TABLE_PHYS(cpu)) |
| 63 | 59 | ||
| @@ -211,7 +207,7 @@ static const char *highbank_match[] __initconst = { | |||
| 211 | 207 | ||
| 212 | DT_MACHINE_START(HIGHBANK, "Highbank") | 208 | DT_MACHINE_START(HIGHBANK, "Highbank") |
| 213 | .smp = smp_ops(highbank_smp_ops), | 209 | .smp = smp_ops(highbank_smp_ops), |
| 214 | .map_io = highbank_map_io, | 210 | .map_io = debug_ll_io_init, |
| 215 | .init_irq = highbank_init_irq, | 211 | .init_irq = highbank_init_irq, |
| 216 | .timer = &highbank_timer, | 212 | .timer = &highbank_timer, |
| 217 | .handle_irq = gic_handle_irq, | 213 | .handle_irq = gic_handle_irq, |
diff --git a/arch/arm/mach-highbank/lluart.c b/arch/arm/mach-highbank/lluart.c deleted file mode 100644 index 371575019f33..000000000000 --- a/arch/arm/mach-highbank/lluart.c +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2011 Calxeda, Inc. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it | ||
| 5 | * under the terms and conditions of the GNU General Public License, | ||
| 6 | * version 2, as published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 11 | * more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License along with | ||
| 14 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include <linux/init.h> | ||
| 17 | #include <asm/page.h> | ||
| 18 | #include <asm/sizes.h> | ||
| 19 | #include <asm/mach/map.h> | ||
| 20 | |||
| 21 | #define HB_DEBUG_LL_PHYS_BASE 0xfff36000 | ||
| 22 | #define HB_DEBUG_LL_VIRT_BASE 0xfee36000 | ||
| 23 | |||
| 24 | static struct map_desc lluart_io_desc __initdata = { | ||
| 25 | .virtual = HB_DEBUG_LL_VIRT_BASE, | ||
| 26 | .pfn = __phys_to_pfn(HB_DEBUG_LL_PHYS_BASE), | ||
| 27 | .length = SZ_4K, | ||
| 28 | .type = MT_DEVICE, | ||
| 29 | }; | ||
| 30 | |||
| 31 | void __init highbank_lluart_map_io(void) | ||
| 32 | { | ||
| 33 | iotable_init(&lluart_io_desc, 1); | ||
| 34 | } | ||
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 941dfb9e9a78..39719bb93caa 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
| @@ -876,6 +876,22 @@ static void __init pci_reserve_io(void) | |||
| 876 | #define pci_reserve_io() do { } while (0) | 876 | #define pci_reserve_io() do { } while (0) |
| 877 | #endif | 877 | #endif |
| 878 | 878 | ||
| 879 | #ifdef CONFIG_DEBUG_LL | ||
| 880 | void __init debug_ll_io_init(void) | ||
| 881 | { | ||
| 882 | struct map_desc map; | ||
| 883 | |||
| 884 | debug_ll_addr(&map.pfn, &map.virtual); | ||
| 885 | if (!map.pfn || !map.virtual) | ||
| 886 | return; | ||
| 887 | map.pfn = __phys_to_pfn(map.pfn); | ||
| 888 | map.virtual &= PAGE_MASK; | ||
| 889 | map.length = PAGE_SIZE; | ||
| 890 | map.type = MT_DEVICE; | ||
| 891 | create_mapping(&map); | ||
| 892 | } | ||
| 893 | #endif | ||
| 894 | |||
| 879 | static void * __initdata vmalloc_min = | 895 | static void * __initdata vmalloc_min = |
| 880 | (void *)(VMALLOC_END - (240 << 20) - VMALLOC_OFFSET); | 896 | (void *)(VMALLOC_END - (240 << 20) - VMALLOC_OFFSET); |
| 881 | 897 | ||
