arm: at91/spl: matrix: remove matrix write protection code
authorWenyou Yang <wenyou.yang@atmel.com>
Thu, 5 Nov 2015 08:37:50 +0000 (16:37 +0800)
committerAndreas Bießmann <andreas.devel@googlemail.com>
Mon, 30 Nov 2015 21:27:54 +0000 (22:27 +0100)
On processor reset, the matrix write protection is disabled,
so no need to disable/enable write protection when writing
the matrix registers.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
arch/arm/mach-at91/matrix.c

index cf363861c68d222e52befb74b0072afc6c5b340f..452a6b995c099fd7cd52f8310b0d0cc1d5c04aa3 100644 (file)
@@ -15,10 +15,6 @@ void matrix_init(void)
        struct atmel_matrix *h32mx = (struct atmel_matrix *)ATMEL_BASE_MATRIX1;
        int i;
 
-       /* Disable 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);
-
        /* DDR port 1 ~ poart 7, slave number is: 4 ~ 10 */
        for (i = 4; i <= 10; i++) {
                writel(0x000f0f0f, &h64mx->ssr[i]);
@@ -44,8 +40,4 @@ void matrix_init(void)
        /* 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);
 }