Stefan Reinauer | eca92fb | 2006-08-23 14:28:37 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * sdram_mode.h: Definitions for SDRAM Mode Register and Extended Mode Register |
| 3 | * |
| 4 | * Copyright (C) 2005 Digital Design Corporation |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | */ |
| 20 | |
| 21 | #ifndef __SDRAMMODE_H_DEFINED |
| 22 | #define __SDRAMMODE_H_DEFINED |
| 23 | |
| 24 | // SDRAM Mode Register definitions, per JESD79D |
| 25 | // These are transmitted via A0-A13 |
| 26 | |
| 27 | // Burst length |
| 28 | #define SDRAM_BURST_2 (1<<0) |
| 29 | #define SDRAM_BURST_4 (2<<0) |
| 30 | #define SDRAM_BURST_8 (3<<0) |
| 31 | |
| 32 | #define SDRAM_BURST_SEQUENTIAL (0<<3) |
| 33 | #define SDRAM_BURST_INTERLEAVED (1<<3) |
| 34 | |
| 35 | #define SDRAM_CAS_2_0 (2<<4) |
| 36 | #define SDRAM_CAS_3_0 (3<<4) /* Optional for DDR 200-333 */ |
| 37 | #define SDRAM_CAS_1_5 (5<<4) /* Optional */ |
| 38 | #define SDRAM_CAS_2_5 (6<<4) |
| 39 | #define SDRAM_CAS_MASK (7<<4) |
| 40 | |
| 41 | #define SDRAM_MODE_NORMAL (0 << 7) |
| 42 | #define SDRAM_MODE_TEST (1 << 7) |
| 43 | #define SDRAM_MODE_DLL_RESET (2 << 7) |
| 44 | |
| 45 | // Extended Mode Register |
| 46 | |
| 47 | #define SDRAM_EXTMODE_DLL_ENABLE (0 << 0) |
| 48 | #define SDRAM_EXTMODE_DLL_DISABLE (1 << 0) |
| 49 | |
| 50 | #define SDRAM_EXTMODE_DRIVE_NORMAL (0 << 1) |
| 51 | #define SDRAM_EXTMODE_DRIVE_WEAK (1 << 1) /* Optional */ |
| 52 | |
| 53 | #endif // __SDRAMMODE_H_DEFINED |