]>
Commit | Line | Data |
---|---|---|
83d290c5 | 1 | // SPDX-License-Identifier: GPL-2.0+ |
5cb9dfa0 WY |
2 | /* |
3 | * Copyright (C) 2015 Atmel Corporation | |
4 | * Wenyou Yang <[email protected]> | |
5cb9dfa0 WY |
5 | */ |
6 | ||
e61ed48f | 7 | #include <asm/hardware.h> |
5cb9dfa0 WY |
8 | #include <asm/io.h> |
9 | #include <asm/arch/sama5_matrix.h> | |
10 | ||
11 | void matrix_init(void) | |
12 | { | |
13 | struct atmel_matrix *h64mx = (struct atmel_matrix *)ATMEL_BASE_MATRIX0; | |
14 | struct atmel_matrix *h32mx = (struct atmel_matrix *)ATMEL_BASE_MATRIX1; | |
15 | int i; | |
16 | ||
b5665bf2 WY |
17 | /* DDR port 1 ~ port 7 */ |
18 | for (i = H64MX_SLAVE_DDRC_PORT1; i <= H64MX_SLAVE_DDRC_PORT7; i++) { | |
5cb9dfa0 WY |
19 | writel(0x000f0f0f, &h64mx->ssr[i]); |
20 | writel(0x0000ffff, &h64mx->sassr[i]); | |
21 | writel(0x0000000f, &h64mx->srtsr[i]); | |
22 | } | |
23 | ||
b5665bf2 WY |
24 | /* EBI CS3 (NANDFlash 128M) and NFC Command Registers(128M) */ |
25 | writel(0x00c0c0c0, &h32mx->ssr[H32MX_SLAVE_EBI]); | |
26 | writel(0xff000000, &h32mx->sassr[H32MX_SLAVE_EBI]); | |
27 | writel(0xff000000, &h32mx->srtsr[H32MX_SLAVE_EBI]); | |
5cb9dfa0 WY |
28 | |
29 | /* NFC SRAM */ | |
b5665bf2 WY |
30 | writel(0x00010101, &h32mx->ssr[H32MX_SLAVE_NFC_SRAM]); |
31 | writel(0x00000001, &h32mx->sassr[H32MX_SLAVE_NFC_SRAM]); | |
32 | writel(0x00000001, &h32mx->srtsr[H32MX_SLAVE_NFC_SRAM]); | |
5cb9dfa0 | 33 | } |