Stelian Pop | 69c925f | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 1 | /* |
| 2 | * [origin: Linux kernel include/asm-arm/arch-at91/at91sam9263_matrix.h] |
| 3 | * |
| 4 | * Copyright (C) 2006 Atmel Corporation. |
| 5 | * |
| 6 | * Memory Controllers (MATRIX, EBI) - System peripherals registers. |
| 7 | * Based on AT91SAM9263 datasheet revision B (Preliminary). |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License as published by |
| 11 | * the Free Software Foundation; either version 2 of the License, or |
| 12 | * (at your option) any later version. |
| 13 | */ |
| 14 | |
| 15 | #ifndef AT91SAM9263_MATRIX_H |
| 16 | #define AT91SAM9263_MATRIX_H |
| 17 | |
Xu, Hong | 4fae89c | 2011-06-10 21:31:25 +0000 | [diff] [blame] | 18 | #ifndef __ASSEMBLY__ |
Stelian Pop | 69c925f | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 19 | |
Xu, Hong | 4fae89c | 2011-06-10 21:31:25 +0000 | [diff] [blame] | 20 | /* |
| 21 | * This struct defines access to the matrix' maximum of |
| 22 | * 16 masters and 16 slaves. |
| 23 | * Note: not all masters/slaves are available |
| 24 | */ |
| 25 | struct at91_matrix { |
| 26 | u32 mcfg[16]; /* Master Configuration Registers */ |
| 27 | u32 scfg[16]; /* Slave Configuration Registers */ |
| 28 | u32 pras[16][2]; /* Priority Assignment Slave Registers */ |
| 29 | u32 mrcr; /* Master Remap Control Register */ |
| 30 | u32 filler[0x06]; |
| 31 | u32 ebicsa; /* EBI Chip Select Assignment Register */ |
| 32 | }; |
Stelian Pop | 69c925f | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 33 | |
Xu, Hong | 4fae89c | 2011-06-10 21:31:25 +0000 | [diff] [blame] | 34 | #endif /* __ASSEMBLY__ */ |
Stelian Pop | 69c925f | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 35 | |
Xu, Hong | 4fae89c | 2011-06-10 21:31:25 +0000 | [diff] [blame] | 36 | #define AT91_MATRIX_ULBT_INFINITE (0 << 0) |
| 37 | #define AT91_MATRIX_ULBT_SINGLE (1 << 0) |
| 38 | #define AT91_MATRIX_ULBT_FOUR (2 << 0) |
| 39 | #define AT91_MATRIX_ULBT_EIGHT (3 << 0) |
| 40 | #define AT91_MATRIX_ULBT_SIXTEEN (4 << 0) |
Stelian Pop | 69c925f | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 41 | |
Xu, Hong | 4fae89c | 2011-06-10 21:31:25 +0000 | [diff] [blame] | 42 | #define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16) |
| 43 | #define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16) |
| 44 | #define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16) |
| 45 | #define AT91_MATRIX_FIXED_DEFMSTR_SHIFT 18 |
| 46 | #define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24) |
| 47 | #define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24) |
Stelian Pop | 69c925f | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 48 | |
Xu, Hong | 4fae89c | 2011-06-10 21:31:25 +0000 | [diff] [blame] | 49 | #define AT91_MATRIX_M0PR_SHIFT 0 |
| 50 | #define AT91_MATRIX_M1PR_SHIFT 4 |
| 51 | #define AT91_MATRIX_M2PR_SHIFT 8 |
| 52 | #define AT91_MATRIX_M3PR_SHIFT 12 |
| 53 | #define AT91_MATRIX_M4PR_SHIFT 16 |
| 54 | #define AT91_MATRIX_M5PR_SHIFT 20 |
| 55 | |
| 56 | #define AT91_MATRIX_RCB0 (1 << 0) |
| 57 | #define AT91_MATRIX_RCB1 (1 << 1) |
Stelian Pop | 69c925f | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 58 | |
Xu, Hong | 4fae89c | 2011-06-10 21:31:25 +0000 | [diff] [blame] | 59 | #define AT91_MATRIX_CS1A_SDRAMC (1 << 1) |
| 60 | #define AT91_MATRIX_CS3A_SMC_SMARTMEDIA (1 << 3) |
| 61 | #define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4) |
| 62 | #define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5) |
| 63 | #define AT91_MATRIX_DBPUC (1 << 8) |
| 64 | #define AT91_MATRIX_VDDIOMSEL_1_8V (0 << 16) |
| 65 | #define AT91_MATRIX_VDDIOMSEL_3_3V (1 << 16) |
Stelian Pop | 69c925f | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 66 | |
| 67 | #endif |