]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ARM: atmel: sama5d4: set non-secured for peripherals
authorBo Shen <voice.shen@atmel.com>
Wed, 4 Mar 2015 05:48:47 +0000 (13:48 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 12:34:15 +0000 (14:34 +0200)
When access the programmable secure peripherals address space,
it needs set them to non-secured.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
arch/arm/mach-at91/armv7/sama5d4_devices.c

index ef39cb7e089233dc900440a192a79648e0b7b56e..76301d63021b9256e034b3177198d6f2f0910564 100644 (file)
@@ -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);