blob: 3b2facaa5d33053737d9dd7f61b264733df7c897 [file] [log] [blame]
Stefan Reinauereca92fb2006-08-23 14:28:37 +00001/*
Uwe Hermannc70e9fc2010-02-15 23:10:19 +00002 * This file is part of the coreboot project.
Stefan Reinauereca92fb2006-08-23 14:28:37 +00003 *
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.
Stefan Reinauereca92fb2006-08-23 14:28:37 +000015 */
16
Uwe Hermannc70e9fc2010-02-15 23:10:19 +000017/*
18 * sdram_mode.h: Definitions for SDRAM Mode Register and Extended Mode Register
19 */
20
Stefan Reinauereca92fb2006-08-23 14:28:37 +000021#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