aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-08-29 17:09:04 -0400
committerOlof Johansson <olof@lixom.net>2013-08-29 17:09:04 -0400
commit3616257f30316cccb0d92eed83d858f5b49e57ac (patch)
tree52031e5e8b76d998a8a0c7e2357c0922a73e4e44 /arch
parent6f244c9ccf22bc38d2ce39b1c7ee304dab7e5328 (diff)
parente7dc0796083c7a9e8e3620600a80f6bc7a2fce1a (diff)
Merge tag 'highbank-for-3.12' of git://sources.calxeda.com/kernel/linux into late/all
From Rob Herring: Updates for Highbank for 3.12: - A couple of fixes to enable LPAE. - pl08x driver fixes to make it build with ARCH_DMA_ADDR_T_64BIT. - Avoid L2 related smc calls on Midway. - Add selecting of necesssary ARM errata. * tag 'highbank-for-3.12' of git://sources.calxeda.com/kernel/linux: ARM: highbank: clean-up some unused includes ARM: highbank: avoid L2 cache smc calls when PL310 is not present ARM: move outer_cache declaration out of ifdef ARM: highbank: select ARCH_DMA_ADDR_T_64BIT for LPAE DMA: fix printk warning in AMBA PL08x DMA driver DMA: fix AMBA PL08x compilation issue with 64bit DMA address type ARM: highbank: select required errata work-arounds ARM: highbank: select ARCH_HAS_HOLES_MEMORYMODEL ARM: highbank: enable DMA zone for LPAE ARM: use phys_addr_t for DMA zone sizes Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/mach/arch.h2
-rw-r--r--arch/arm/include/asm/outercache.h4
-rw-r--r--arch/arm/mach-highbank/Kconfig6
-rw-r--r--arch/arm/mach-highbank/highbank.c20
-rw-r--r--arch/arm/mm/init.c2
5 files changed, 19 insertions, 15 deletions
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
index 441efc491b50..d91b16857971 100644
--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -35,7 +35,7 @@ struct machine_desc {
35 unsigned int nr_irqs; /* number of IRQs */ 35 unsigned int nr_irqs; /* number of IRQs */
36 36
37#ifdef CONFIG_ZONE_DMA 37#ifdef CONFIG_ZONE_DMA
38 unsigned long dma_zone_size; /* size of DMA-able area */ 38 phys_addr_t dma_zone_size; /* size of DMA-able area */
39#endif 39#endif
40 40
41 unsigned int video_start; /* start of video RAM */ 41 unsigned int video_start; /* start of video RAM */
diff --git a/arch/arm/include/asm/outercache.h b/arch/arm/include/asm/outercache.h
index 12f71a190422..f94784f0e3a6 100644
--- a/arch/arm/include/asm/outercache.h
+++ b/arch/arm/include/asm/outercache.h
@@ -37,10 +37,10 @@ struct outer_cache_fns {
37 void (*resume)(void); 37 void (*resume)(void);
38}; 38};
39 39
40#ifdef CONFIG_OUTER_CACHE
41
42extern struct outer_cache_fns outer_cache; 40extern struct outer_cache_fns outer_cache;
43 41
42#ifdef CONFIG_OUTER_CACHE
43
44static inline void outer_inv_range(phys_addr_t start, phys_addr_t end) 44static inline void outer_inv_range(phys_addr_t start, phys_addr_t end)
45{ 45{
46 if (outer_cache.inv_range) 46 if (outer_cache.inv_range)
diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig
index cd9fcb1cd7ab..b9dd13ae3dca 100644
--- a/arch/arm/mach-highbank/Kconfig
+++ b/arch/arm/mach-highbank/Kconfig
@@ -1,9 +1,14 @@
1config ARCH_HIGHBANK 1config ARCH_HIGHBANK
2 bool "Calxeda ECX-1000/2000 (Highbank/Midway)" if ARCH_MULTI_V7 2 bool "Calxeda ECX-1000/2000 (Highbank/Midway)" if ARCH_MULTI_V7
3 select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
3 select ARCH_HAS_CPUFREQ 4 select ARCH_HAS_CPUFREQ
5 select ARCH_HAS_HOLES_MEMORYMODEL
4 select ARCH_HAS_OPP 6 select ARCH_HAS_OPP
5 select ARCH_WANT_OPTIONAL_GPIOLIB 7 select ARCH_WANT_OPTIONAL_GPIOLIB
6 select ARM_AMBA 8 select ARM_AMBA
9 select ARM_ERRATA_764369
10 select ARM_ERRATA_775420
11 select ARM_ERRATA_798181
7 select ARM_GIC 12 select ARM_GIC
8 select ARM_TIMER_SP804 13 select ARM_TIMER_SP804
9 select CACHE_L2X0 14 select CACHE_L2X0
@@ -18,3 +23,4 @@ config ARCH_HIGHBANK
18 select PL320_MBOX 23 select PL320_MBOX
19 select SPARSE_IRQ 24 select SPARSE_IRQ
20 select USE_OF 25 select USE_OF
26 select ZONE_DMA if ARM_LPAE
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index 88815795fe26..8e63ccdb0de3 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -18,14 +18,11 @@
18#include <linux/clocksource.h> 18#include <linux/clocksource.h>
19#include <linux/dma-mapping.h> 19#include <linux/dma-mapping.h>
20#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/irq.h>
22#include <linux/irqchip.h> 21#include <linux/irqchip.h>
23#include <linux/irqdomain.h>
24#include <linux/of.h> 22#include <linux/of.h>
25#include <linux/of_irq.h> 23#include <linux/of_irq.h>
26#include <linux/of_platform.h> 24#include <linux/of_platform.h>
27#include <linux/of_address.h> 25#include <linux/of_address.h>
28#include <linux/smp.h>
29#include <linux/amba/bus.h> 26#include <linux/amba/bus.h>
30#include <linux/clk-provider.h> 27#include <linux/clk-provider.h>
31 28
@@ -35,7 +32,6 @@
35#include <asm/hardware/cache-l2x0.h> 32#include <asm/hardware/cache-l2x0.h>
36#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
37#include <asm/mach/map.h> 34#include <asm/mach/map.h>
38#include <asm/mach/time.h>
39 35
40#include "core.h" 36#include "core.h"
41#include "sysregs.h" 37#include "sysregs.h"
@@ -65,13 +61,11 @@ void highbank_set_cpu_jump(int cpu, void *jump_addr)
65 HB_JUMP_TABLE_PHYS(cpu) + 15); 61 HB_JUMP_TABLE_PHYS(cpu) + 15);
66} 62}
67 63
68#ifdef CONFIG_CACHE_L2X0
69static void highbank_l2x0_disable(void) 64static void highbank_l2x0_disable(void)
70{ 65{
71 /* Disable PL310 L2 Cache controller */ 66 /* Disable PL310 L2 Cache controller */
72 highbank_smc1(0x102, 0x0); 67 highbank_smc1(0x102, 0x0);
73} 68}
74#endif
75 69
76static void __init highbank_init_irq(void) 70static void __init highbank_init_irq(void)
77{ 71{
@@ -80,12 +74,13 @@ static void __init highbank_init_irq(void)
80 if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9")) 74 if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9"))
81 highbank_scu_map_io(); 75 highbank_scu_map_io();
82 76
83#ifdef CONFIG_CACHE_L2X0
84 /* Enable PL310 L2 Cache controller */ 77 /* Enable PL310 L2 Cache controller */
85 highbank_smc1(0x102, 0x1); 78 if (IS_ENABLED(CONFIG_CACHE_L2X0) &&
86 l2x0_of_init(0, ~0UL); 79 of_find_compatible_node(NULL, NULL, "arm,pl310-cache")) {
87 outer_cache.disable = highbank_l2x0_disable; 80 highbank_smc1(0x102, 0x1);
88#endif 81 l2x0_of_init(0, ~0UL);
82 outer_cache.disable = highbank_l2x0_disable;
83 }
89} 84}
90 85
91static void __init highbank_timer_init(void) 86static void __init highbank_timer_init(void)
@@ -176,6 +171,9 @@ static const char *highbank_match[] __initconst = {
176}; 171};
177 172
178DT_MACHINE_START(HIGHBANK, "Highbank") 173DT_MACHINE_START(HIGHBANK, "Highbank")
174#if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE)
175 .dma_zone_size = (4ULL * SZ_1G),
176#endif
179 .smp = smp_ops(highbank_smp_ops), 177 .smp = smp_ops(highbank_smp_ops),
180 .init_irq = highbank_init_irq, 178 .init_irq = highbank_init_irq,
181 .init_time = highbank_timer_init, 179 .init_time = highbank_timer_init,
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 15225d829d71..c0bb66e69999 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -207,7 +207,7 @@ static void __init arm_bootmem_init(unsigned long start_pfn,
207 207
208#ifdef CONFIG_ZONE_DMA 208#ifdef CONFIG_ZONE_DMA
209 209
210unsigned long arm_dma_zone_size __read_mostly; 210phys_addr_t arm_dma_zone_size __read_mostly;
211EXPORT_SYMBOL(arm_dma_zone_size); 211EXPORT_SYMBOL(arm_dma_zone_size);
212 212
213/* 213/*