diff options
Diffstat (limited to 'arch/arm/mach-cns3xxx')
-rw-r--r-- | arch/arm/mach-cns3xxx/cns3420vb.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-cns3xxx/core.c | 43 | ||||
-rw-r--r-- | arch/arm/mach-cns3xxx/core.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-cns3xxx/include/mach/hardware.h | 22 | ||||
-rw-r--r-- | arch/arm/mach-cns3xxx/include/mach/pm.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-cns3xxx/include/mach/vmalloc.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-cns3xxx/pcie.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-cns3xxx/pm.c | 2 |
8 files changed, 57 insertions, 26 deletions
diff --git a/arch/arm/mach-cns3xxx/cns3420vb.c b/arch/arm/mach-cns3xxx/cns3420vb.c index 08e5c8759502..3e7d1496cb47 100644 --- a/arch/arm/mach-cns3xxx/cns3420vb.c +++ b/arch/arm/mach-cns3xxx/cns3420vb.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
30 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
31 | #include <asm/mach/time.h> | 31 | #include <asm/mach/time.h> |
32 | #include <mach/hardware.h> | ||
33 | #include <mach/cns3xxx.h> | 32 | #include <mach/cns3xxx.h> |
34 | #include <mach/irqs.h> | 33 | #include <mach/irqs.h> |
35 | #include "core.h" | 34 | #include "core.h" |
@@ -170,6 +169,8 @@ static struct platform_device *cns3420_pdevs[] __initdata = { | |||
170 | 169 | ||
171 | static void __init cns3420_init(void) | 170 | static void __init cns3420_init(void) |
172 | { | 171 | { |
172 | cns3xxx_l2x0_init(); | ||
173 | |||
173 | platform_add_devices(cns3420_pdevs, ARRAY_SIZE(cns3420_pdevs)); | 174 | platform_add_devices(cns3420_pdevs, ARRAY_SIZE(cns3420_pdevs)); |
174 | 175 | ||
175 | cns3xxx_ahci_init(); | 176 | cns3xxx_ahci_init(); |
diff --git a/arch/arm/mach-cns3xxx/core.c b/arch/arm/mach-cns3xxx/core.c index da30078a80c1..941a308e1253 100644 --- a/arch/arm/mach-cns3xxx/core.c +++ b/arch/arm/mach-cns3xxx/core.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/mach/time.h> | 16 | #include <asm/mach/time.h> |
17 | #include <asm/mach/irq.h> | 17 | #include <asm/mach/irq.h> |
18 | #include <asm/hardware/gic.h> | 18 | #include <asm/hardware/gic.h> |
19 | #include <asm/hardware/cache-l2x0.h> | ||
19 | #include <mach/cns3xxx.h> | 20 | #include <mach/cns3xxx.h> |
20 | #include "core.h" | 21 | #include "core.h" |
21 | 22 | ||
@@ -244,3 +245,45 @@ static void __init cns3xxx_timer_init(void) | |||
244 | struct sys_timer cns3xxx_timer = { | 245 | struct sys_timer cns3xxx_timer = { |
245 | .init = cns3xxx_timer_init, | 246 | .init = cns3xxx_timer_init, |
246 | }; | 247 | }; |
248 | |||
249 | #ifdef CONFIG_CACHE_L2X0 | ||
250 | |||
251 | void __init cns3xxx_l2x0_init(void) | ||
252 | { | ||
253 | void __iomem *base = ioremap(CNS3XXX_L2C_BASE, SZ_4K); | ||
254 | u32 val; | ||
255 | |||
256 | if (WARN_ON(!base)) | ||
257 | return; | ||
258 | |||
259 | /* | ||
260 | * Tag RAM Control register | ||
261 | * | ||
262 | * bit[10:8] - 1 cycle of write accesses latency | ||
263 | * bit[6:4] - 1 cycle of read accesses latency | ||
264 | * bit[3:0] - 1 cycle of setup latency | ||
265 | * | ||
266 | * 1 cycle of latency for setup, read and write accesses | ||
267 | */ | ||
268 | val = readl(base + L2X0_TAG_LATENCY_CTRL); | ||
269 | val &= 0xfffff888; | ||
270 | writel(val, base + L2X0_TAG_LATENCY_CTRL); | ||
271 | |||
272 | /* | ||
273 | * Data RAM Control register | ||
274 | * | ||
275 | * bit[10:8] - 1 cycles of write accesses latency | ||
276 | * bit[6:4] - 1 cycles of read accesses latency | ||
277 | * bit[3:0] - 1 cycle of setup latency | ||
278 | * | ||
279 | * 1 cycle of latency for setup, read and write accesses | ||
280 | */ | ||
281 | val = readl(base + L2X0_DATA_LATENCY_CTRL); | ||
282 | val &= 0xfffff888; | ||
283 | writel(val, base + L2X0_DATA_LATENCY_CTRL); | ||
284 | |||
285 | /* 32 KiB, 8-way, parity disable */ | ||
286 | l2x0_init(base, 0x00540000, 0xfe000fff); | ||
287 | } | ||
288 | |||
289 | #endif /* CONFIG_CACHE_L2X0 */ | ||
diff --git a/arch/arm/mach-cns3xxx/core.h b/arch/arm/mach-cns3xxx/core.h index ffeb3a8b73ba..fcd225343c61 100644 --- a/arch/arm/mach-cns3xxx/core.h +++ b/arch/arm/mach-cns3xxx/core.h | |||
@@ -13,6 +13,12 @@ | |||
13 | 13 | ||
14 | extern struct sys_timer cns3xxx_timer; | 14 | extern struct sys_timer cns3xxx_timer; |
15 | 15 | ||
16 | #ifdef CONFIG_CACHE_L2X0 | ||
17 | void __init cns3xxx_l2x0_init(void); | ||
18 | #else | ||
19 | static inline void cns3xxx_l2x0_init(void) {} | ||
20 | #endif /* CONFIG_CACHE_L2X0 */ | ||
21 | |||
16 | void __init cns3xxx_map_io(void); | 22 | void __init cns3xxx_map_io(void); |
17 | void __init cns3xxx_init_irq(void); | 23 | void __init cns3xxx_init_irq(void); |
18 | void cns3xxx_power_off(void); | 24 | void cns3xxx_power_off(void); |
diff --git a/arch/arm/mach-cns3xxx/include/mach/hardware.h b/arch/arm/mach-cns3xxx/include/mach/hardware.h deleted file mode 100644 index 57e09836f9d7..000000000000 --- a/arch/arm/mach-cns3xxx/include/mach/hardware.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * This file contains the hardware definitions of the Cavium Networks boards. | ||
3 | * | ||
4 | * Copyright 2003 ARM Limited. | ||
5 | * Copyright 2008 Cavium Networks | ||
6 | * | ||
7 | * This file is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License, Version 2, as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef __MACH_HARDWARE_H | ||
13 | #define __MACH_HARDWARE_H | ||
14 | |||
15 | #include <asm/sizes.h> | ||
16 | |||
17 | /* macro to get at IO space when running virtually */ | ||
18 | #define PCIBIOS_MIN_IO 0x00000000 | ||
19 | #define PCIBIOS_MIN_MEM 0x00000000 | ||
20 | #define pcibios_assign_all_busses() 1 | ||
21 | |||
22 | #endif | ||
diff --git a/arch/arm/mach-cns3xxx/include/mach/pm.h b/arch/arm/mach-cns3xxx/include/mach/pm.h index 6eae7f764d1d..c2588cc991d1 100644 --- a/arch/arm/mach-cns3xxx/include/mach/pm.h +++ b/arch/arm/mach-cns3xxx/include/mach/pm.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #ifndef __CNS3XXX_PM_H | 11 | #ifndef __CNS3XXX_PM_H |
12 | #define __CNS3XXX_PM_H | 12 | #define __CNS3XXX_PM_H |
13 | 13 | ||
14 | #include <asm/atomic.h> | 14 | #include <linux/atomic.h> |
15 | 15 | ||
16 | void cns3xxx_pwr_clk_en(unsigned int block); | 16 | void cns3xxx_pwr_clk_en(unsigned int block); |
17 | void cns3xxx_pwr_clk_dis(unsigned int block); | 17 | void cns3xxx_pwr_clk_dis(unsigned int block); |
diff --git a/arch/arm/mach-cns3xxx/include/mach/vmalloc.h b/arch/arm/mach-cns3xxx/include/mach/vmalloc.h index 4d381ec05278..1dd231d2f772 100644 --- a/arch/arm/mach-cns3xxx/include/mach/vmalloc.h +++ b/arch/arm/mach-cns3xxx/include/mach/vmalloc.h | |||
@@ -8,4 +8,4 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define VMALLOC_END 0xd8000000 | 11 | #define VMALLOC_END 0xd8000000UL |
diff --git a/arch/arm/mach-cns3xxx/pcie.c b/arch/arm/mach-cns3xxx/pcie.c index 78defd71a829..a4ec080908b8 100644 --- a/arch/arm/mach-cns3xxx/pcie.c +++ b/arch/arm/mach-cns3xxx/pcie.c | |||
@@ -369,6 +369,9 @@ static int __init cns3xxx_pcie_init(void) | |||
369 | { | 369 | { |
370 | int i; | 370 | int i; |
371 | 371 | ||
372 | pcibios_min_io = 0; | ||
373 | pcibios_min_mem = 0; | ||
374 | |||
372 | hook_fault_code(16 + 6, cns3xxx_pcie_abort_handler, SIGBUS, 0, | 375 | hook_fault_code(16 + 6, cns3xxx_pcie_abort_handler, SIGBUS, 0, |
373 | "imprecise external abort"); | 376 | "imprecise external abort"); |
374 | 377 | ||
diff --git a/arch/arm/mach-cns3xxx/pm.c b/arch/arm/mach-cns3xxx/pm.c index 5e579552aa54..0c04678615ce 100644 --- a/arch/arm/mach-cns3xxx/pm.c +++ b/arch/arm/mach-cns3xxx/pm.c | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/io.h> | 11 | #include <linux/io.h> |
12 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
13 | #include <asm/atomic.h> | 13 | #include <linux/atomic.h> |
14 | #include <mach/system.h> | 14 | #include <mach/system.h> |
15 | #include <mach/cns3xxx.h> | 15 | #include <mach/cns3xxx.h> |
16 | #include <mach/pm.h> | 16 | #include <mach/pm.h> |