Commit 8e7a96364bc29073e5246d331a11ce8602d5d6a3

Authored by Bo Shen
Committed by Andreas Bießmann
1 parent c83cb5f665

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>

Showing 1 changed file with 9 additions and 0 deletions Side-by-side Diff

arch/arm/mach-at91/armv7/sama5d4_devices.c
... ... @@ -75,6 +75,15 @@
75 75 writel(0x00000001, &h32mx->sassr[4]);
76 76 writel(0x00000001, &h32mx->srtsr[4]);
77 77  
  78 + /* Configure Programmable Security peripherals on matrix 64 */
  79 + writel(readl(&h64mx->spselr[0]) | 0x00080000, &h64mx->spselr[0]);
  80 + writel(readl(&h64mx->spselr[1]) | 0x00180000, &h64mx->spselr[1]);
  81 + writel(readl(&h64mx->spselr[2]) | 0x00000008, &h64mx->spselr[2]);
  82 +
  83 + /* Configure Programmable Security peripherals on matrix 32 */
  84 + writel(readl(&h32mx->spselr[0]) | 0xFFC00000, &h32mx->spselr[0]);
  85 + writel(readl(&h32mx->spselr[1]) | 0x60E3FFFF, &h32mx->spselr[1]);
  86 +
78 87 /* Enable the write protect */
79 88 writel(ATMEL_MATRIX_WPMR_WPKEY | ATMEL_MATRIX_WPMR_WPEN, &h64mx->wpmr);
80 89 writel(ATMEL_MATRIX_WPMR_WPKEY | ATMEL_MATRIX_WPMR_WPEN, &h32mx->wpmr);