diff options
| -rw-r--r-- | arch/arm/mach-highbank/Makefile | 6 | ||||
| -rw-r--r-- | arch/arm/mach-highbank/core.h | 1 | ||||
| -rw-r--r-- | arch/arm/mach-highbank/highbank.c | 14 | ||||
| -rw-r--r-- | arch/arm/mach-highbank/smc.S | 27 |
4 files changed, 47 insertions, 1 deletions
diff --git a/arch/arm/mach-highbank/Makefile b/arch/arm/mach-highbank/Makefile index f8437dd238c2..ded4652ada80 100644 --- a/arch/arm/mach-highbank/Makefile +++ b/arch/arm/mach-highbank/Makefile | |||
| @@ -1,4 +1,8 @@ | |||
| 1 | obj-y := clock.o highbank.o system.o | 1 | obj-y := clock.o highbank.o system.o smc.o |
| 2 | |||
| 3 | plus_sec := $(call as-instr,.arch_extension sec,+sec) | ||
| 4 | AFLAGS_smc.o :=-Wa,-march=armv7-a$(plus_sec) | ||
| 5 | |||
| 2 | obj-$(CONFIG_DEBUG_HIGHBANK_UART) += lluart.o | 6 | obj-$(CONFIG_DEBUG_HIGHBANK_UART) += lluart.o |
| 3 | obj-$(CONFIG_SMP) += platsmp.o | 7 | obj-$(CONFIG_SMP) += platsmp.o |
| 4 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 8 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h index d8e2d0be64ac..141ed5171826 100644 --- a/arch/arm/mach-highbank/core.h +++ b/arch/arm/mach-highbank/core.h | |||
| @@ -8,3 +8,4 @@ extern void highbank_lluart_map_io(void); | |||
| 8 | static inline void highbank_lluart_map_io(void) {} | 8 | static inline void highbank_lluart_map_io(void) {} |
| 9 | #endif | 9 | #endif |
| 10 | 10 | ||
| 11 | extern void highbank_smc1(int fn, int arg); | ||
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index 410a112bb52e..8777612b1a42 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c | |||
| @@ -85,10 +85,24 @@ const static struct of_device_id irq_match[] = { | |||
| 85 | {} | 85 | {} |
| 86 | }; | 86 | }; |
| 87 | 87 | ||
| 88 | #ifdef CONFIG_CACHE_L2X0 | ||
| 89 | static void highbank_l2x0_disable(void) | ||
| 90 | { | ||
| 91 | /* Disable PL310 L2 Cache controller */ | ||
| 92 | highbank_smc1(0x102, 0x0); | ||
| 93 | } | ||
| 94 | #endif | ||
| 95 | |||
| 88 | static void __init highbank_init_irq(void) | 96 | static void __init highbank_init_irq(void) |
| 89 | { | 97 | { |
| 90 | of_irq_init(irq_match); | 98 | of_irq_init(irq_match); |
| 99 | |||
| 100 | #ifdef CONFIG_CACHE_L2X0 | ||
| 101 | /* Enable PL310 L2 Cache controller */ | ||
| 102 | highbank_smc1(0x102, 0x1); | ||
| 91 | l2x0_of_init(0, ~0UL); | 103 | l2x0_of_init(0, ~0UL); |
| 104 | outer_cache.disable = highbank_l2x0_disable; | ||
| 105 | #endif | ||
| 92 | } | 106 | } |
| 93 | 107 | ||
| 94 | static void __init highbank_timer_init(void) | 108 | static void __init highbank_timer_init(void) |
diff --git a/arch/arm/mach-highbank/smc.S b/arch/arm/mach-highbank/smc.S new file mode 100644 index 000000000000..407d17baaaa9 --- /dev/null +++ b/arch/arm/mach-highbank/smc.S | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* | ||
| 2 | * Copied from omap44xx-smc.S Copyright (C) 2010 Texas Instruments, Inc. | ||
| 3 | * Copyright 2012 Calxeda, Inc. | ||
| 4 | * | ||
| 5 | * This program is free software,you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #include <linux/linkage.h> | ||
| 11 | |||
| 12 | /* | ||
| 13 | * This is common routine to manage secure monitor API | ||
| 14 | * used to modify the PL310 secure registers. | ||
| 15 | * 'r0' contains the value to be modified and 'r12' contains | ||
| 16 | * the monitor API number. | ||
| 17 | * Function signature : void highbank_smc1(u32 fn, u32 arg) | ||
| 18 | */ | ||
| 19 | |||
| 20 | ENTRY(highbank_smc1) | ||
| 21 | stmfd sp!, {r4-r11, lr} | ||
| 22 | mov r12, r0 | ||
| 23 | mov r0, r1 | ||
| 24 | dsb | ||
| 25 | smc #0 | ||
| 26 | ldmfd sp!, {r4-r11, pc} | ||
| 27 | ENDPROC(highbank_smc1) | ||
