summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBo Shen <voice.shen@atmel.com>2015-03-04 13:48:47 +0800
committerAndreas Bießmann <andreas.devel@googlemail.com>2015-03-18 23:36:10 +0100
commit8e7a96364bc29073e5246d331a11ce8602d5d6a3 (patch)
treeaadfaba8ee3d1fad0d7613a331e1343549d07f84
parentc83cb5f665c11eb0231bb32c3f1094bb55139024 (diff)
downloadtalos-obmc-uboot-8e7a96364bc29073e5246d331a11ce8602d5d6a3.tar.gz
talos-obmc-uboot-8e7a96364bc29073e5246d331a11ce8602d5d6a3.zip
ARM: atmel: sama5d4: set non-secured for peripherals
When access the programmable secure peripherals address space, it needs set them to non-secured. Signed-off-by: Bo Shen <voice.shen@atmel.com>
-rw-r--r--arch/arm/mach-at91/armv7/sama5d4_devices.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/armv7/sama5d4_devices.c b/arch/arm/mach-at91/armv7/sama5d4_devices.c
index ef39cb7e08..76301d6302 100644
--- a/arch/arm/mach-at91/armv7/sama5d4_devices.c
+++ b/arch/arm/mach-at91/armv7/sama5d4_devices.c
@@ -75,6 +75,15 @@ void matrix_init(void)
writel(0x00000001, &h32mx->sassr[4]);
writel(0x00000001, &h32mx->srtsr[4]);
+ /* Configure Programmable Security peripherals on matrix 64 */
+ writel(readl(&h64mx->spselr[0]) | 0x00080000, &h64mx->spselr[0]);
+ writel(readl(&h64mx->spselr[1]) | 0x00180000, &h64mx->spselr[1]);
+ writel(readl(&h64mx->spselr[2]) | 0x00000008, &h64mx->spselr[2]);
+
+ /* Configure Programmable Security peripherals on matrix 32 */
+ writel(readl(&h32mx->spselr[0]) | 0xFFC00000, &h32mx->spselr[0]);
+ writel(readl(&h32mx->spselr[1]) | 0x60E3FFFF, &h32mx->spselr[1]);
+
/* Enable the write protect */
writel(ATMEL_MATRIX_WPMR_WPKEY | ATMEL_MATRIX_WPMR_WPEN, &h64mx->wpmr);
writel(ATMEL_MATRIX_WPMR_WPKEY | ATMEL_MATRIX_WPMR_WPEN, &h32mx->wpmr);
OpenPOWER on IntegriCloud