diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-02-26 16:54:53 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2016-02-26 16:54:53 -0500 |
commit | e7ada8dfd564d9fa518432a513994cc53e358fad (patch) | |
tree | d287940ed960d538f76f51432f53da7e4b9dc36f | |
parent | 8bba98a8c1527f1cc121776cf5fac97ac2d3089c (diff) | |
parent | 8fff2f752f2c9d31414f83170157701b59aec4c1 (diff) |
Merge tag 'zynq-soc-for-4.6' of https://github.com/Xilinx/linux-xlnx into next/soc
Merge "ARM: Xilinx Zynq patches for v4.6" from Michal Simek:
- SLCR early init
- Fix L2 cache data corruption
- Fix early printk uart setting
* tag 'zynq-soc-for-4.6' of https://github.com/Xilinx/linux-xlnx:
ARM: zynq: Move early printk virtual address to vmalloc area
ARM: zynq: address L2 cache data corruption
ARM: zynq: initialize slcr mapping earlier
-rw-r--r-- | arch/arm/include/debug/zynq.S | 4 | ||||
-rw-r--r-- | arch/arm/mach-zynq/common.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-zynq/slcr.c | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm/include/debug/zynq.S b/arch/arm/include/debug/zynq.S index de86b9247564..060cb5b49bfd 100644 --- a/arch/arm/include/debug/zynq.S +++ b/arch/arm/include/debug/zynq.S | |||
@@ -20,9 +20,9 @@ | |||
20 | #define UART_SR_TXEMPTY 0x00000008 /* TX FIFO empty */ | 20 | #define UART_SR_TXEMPTY 0x00000008 /* TX FIFO empty */ |
21 | 21 | ||
22 | #define UART0_PHYS 0xE0000000 | 22 | #define UART0_PHYS 0xE0000000 |
23 | #define UART0_VIRT 0xF0000000 | 23 | #define UART0_VIRT 0xF0800000 |
24 | #define UART1_PHYS 0xE0001000 | 24 | #define UART1_PHYS 0xE0001000 |
25 | #define UART1_VIRT 0xF0001000 | 25 | #define UART1_VIRT 0xF0801000 |
26 | 26 | ||
27 | #if IS_ENABLED(CONFIG_DEBUG_ZYNQ_UART1) | 27 | #if IS_ENABLED(CONFIG_DEBUG_ZYNQ_UART1) |
28 | # define LL_UART_PADDR UART1_PHYS | 28 | # define LL_UART_PADDR UART1_PHYS |
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c index 6f39d03cc27e..860ffb663f02 100644 --- a/arch/arm/mach-zynq/common.c +++ b/arch/arm/mach-zynq/common.c | |||
@@ -150,8 +150,6 @@ out: | |||
150 | 150 | ||
151 | static void __init zynq_timer_init(void) | 151 | static void __init zynq_timer_init(void) |
152 | { | 152 | { |
153 | zynq_early_slcr_init(); | ||
154 | |||
155 | zynq_clock_init(); | 153 | zynq_clock_init(); |
156 | of_clk_init(NULL); | 154 | of_clk_init(NULL); |
157 | clocksource_probe(); | 155 | clocksource_probe(); |
@@ -186,6 +184,7 @@ static void __init zynq_map_io(void) | |||
186 | 184 | ||
187 | static void __init zynq_irq_init(void) | 185 | static void __init zynq_irq_init(void) |
188 | { | 186 | { |
187 | zynq_early_slcr_init(); | ||
189 | irqchip_init(); | 188 | irqchip_init(); |
190 | } | 189 | } |
191 | 190 | ||
diff --git a/arch/arm/mach-zynq/slcr.c b/arch/arm/mach-zynq/slcr.c index 26320ebf3493..f0292a30e6f6 100644 --- a/arch/arm/mach-zynq/slcr.c +++ b/arch/arm/mach-zynq/slcr.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #define SLCR_A9_CPU_RST_CTRL_OFFSET 0x244 /* CPU Software Reset Control */ | 28 | #define SLCR_A9_CPU_RST_CTRL_OFFSET 0x244 /* CPU Software Reset Control */ |
29 | #define SLCR_REBOOT_STATUS_OFFSET 0x258 /* PS Reboot Status */ | 29 | #define SLCR_REBOOT_STATUS_OFFSET 0x258 /* PS Reboot Status */ |
30 | #define SLCR_PSS_IDCODE 0x530 /* PS IDCODE */ | 30 | #define SLCR_PSS_IDCODE 0x530 /* PS IDCODE */ |
31 | #define SLCR_L2C_RAM 0xA1C /* L2C_RAM in AR#54190 */ | ||
31 | 32 | ||
32 | #define SLCR_UNLOCK_MAGIC 0xDF0D | 33 | #define SLCR_UNLOCK_MAGIC 0xDF0D |
33 | #define SLCR_A9_CPU_CLKSTOP 0x10 | 34 | #define SLCR_A9_CPU_CLKSTOP 0x10 |
@@ -227,6 +228,9 @@ int __init zynq_early_slcr_init(void) | |||
227 | /* unlock the SLCR so that registers can be changed */ | 228 | /* unlock the SLCR so that registers can be changed */ |
228 | zynq_slcr_unlock(); | 229 | zynq_slcr_unlock(); |
229 | 230 | ||
231 | /* See AR#54190 design advisory */ | ||
232 | regmap_update_bits(zynq_slcr_regmap, SLCR_L2C_RAM, 0x70707, 0x20202); | ||
233 | |||
230 | register_restart_handler(&zynq_slcr_restart_nb); | 234 | register_restart_handler(&zynq_slcr_restart_nb); |
231 | 235 | ||
232 | pr_info("%s mapped to %p\n", np->name, zynq_slcr_base); | 236 | pr_info("%s mapped to %p\n", np->name, zynq_slcr_base); |