11a59d1b8SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 2384740dcSRalf Baechle /* ********************************************************************* 3384740dcSRalf Baechle * SB1250 Board Support Package 4384740dcSRalf Baechle * 5384740dcSRalf Baechle * Memory Controller constants File: sb1250_mc.h 6384740dcSRalf Baechle * 7384740dcSRalf Baechle * This module contains constants and macros useful for 8384740dcSRalf Baechle * programming the memory controller. 9384740dcSRalf Baechle * 10384740dcSRalf Baechle * SB1250 specification level: User's manual 1/02/02 11384740dcSRalf Baechle * 12384740dcSRalf Baechle ********************************************************************* 13384740dcSRalf Baechle * 14384740dcSRalf Baechle * Copyright 2000, 2001, 2002, 2003 15384740dcSRalf Baechle * Broadcom Corporation. All rights reserved. 16384740dcSRalf Baechle * 17384740dcSRalf Baechle ********************************************************************* */ 18384740dcSRalf Baechle 19384740dcSRalf Baechle 20384740dcSRalf Baechle #ifndef _SB1250_MC_H 21384740dcSRalf Baechle #define _SB1250_MC_H 22384740dcSRalf Baechle 23a1ce3928SDavid Howells #include <asm/sibyte/sb1250_defs.h> 24384740dcSRalf Baechle 25384740dcSRalf Baechle /* 26384740dcSRalf Baechle * Memory Channel Config Register (table 6-14) 27384740dcSRalf Baechle */ 28384740dcSRalf Baechle 29384740dcSRalf Baechle #define S_MC_RESERVED0 0 30384740dcSRalf Baechle #define M_MC_RESERVED0 _SB_MAKEMASK(8, S_MC_RESERVED0) 31384740dcSRalf Baechle 32384740dcSRalf Baechle #define S_MC_CHANNEL_SEL 8 33384740dcSRalf Baechle #define M_MC_CHANNEL_SEL _SB_MAKEMASK(8, S_MC_CHANNEL_SEL) 34384740dcSRalf Baechle #define V_MC_CHANNEL_SEL(x) _SB_MAKEVALUE(x, S_MC_CHANNEL_SEL) 35384740dcSRalf Baechle #define G_MC_CHANNEL_SEL(x) _SB_GETVALUE(x, S_MC_CHANNEL_SEL, M_MC_CHANNEL_SEL) 36384740dcSRalf Baechle 37384740dcSRalf Baechle #define S_MC_BANK0_MAP 16 38384740dcSRalf Baechle #define M_MC_BANK0_MAP _SB_MAKEMASK(4, S_MC_BANK0_MAP) 39384740dcSRalf Baechle #define V_MC_BANK0_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK0_MAP) 40384740dcSRalf Baechle #define G_MC_BANK0_MAP(x) _SB_GETVALUE(x, S_MC_BANK0_MAP, M_MC_BANK0_MAP) 41384740dcSRalf Baechle 42384740dcSRalf Baechle #define K_MC_BANK0_MAP_DEFAULT 0x00 43384740dcSRalf Baechle #define V_MC_BANK0_MAP_DEFAULT V_MC_BANK0_MAP(K_MC_BANK0_MAP_DEFAULT) 44384740dcSRalf Baechle 45384740dcSRalf Baechle #define S_MC_BANK1_MAP 20 46384740dcSRalf Baechle #define M_MC_BANK1_MAP _SB_MAKEMASK(4, S_MC_BANK1_MAP) 47384740dcSRalf Baechle #define V_MC_BANK1_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK1_MAP) 48384740dcSRalf Baechle #define G_MC_BANK1_MAP(x) _SB_GETVALUE(x, S_MC_BANK1_MAP, M_MC_BANK1_MAP) 49384740dcSRalf Baechle 50384740dcSRalf Baechle #define K_MC_BANK1_MAP_DEFAULT 0x08 51384740dcSRalf Baechle #define V_MC_BANK1_MAP_DEFAULT V_MC_BANK1_MAP(K_MC_BANK1_MAP_DEFAULT) 52384740dcSRalf Baechle 53384740dcSRalf Baechle #define S_MC_BANK2_MAP 24 54384740dcSRalf Baechle #define M_MC_BANK2_MAP _SB_MAKEMASK(4, S_MC_BANK2_MAP) 55384740dcSRalf Baechle #define V_MC_BANK2_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK2_MAP) 56384740dcSRalf Baechle #define G_MC_BANK2_MAP(x) _SB_GETVALUE(x, S_MC_BANK2_MAP, M_MC_BANK2_MAP) 57384740dcSRalf Baechle 58384740dcSRalf Baechle #define K_MC_BANK2_MAP_DEFAULT 0x09 59384740dcSRalf Baechle #define V_MC_BANK2_MAP_DEFAULT V_MC_BANK2_MAP(K_MC_BANK2_MAP_DEFAULT) 60384740dcSRalf Baechle 61384740dcSRalf Baechle #define S_MC_BANK3_MAP 28 62384740dcSRalf Baechle #define M_MC_BANK3_MAP _SB_MAKEMASK(4, S_MC_BANK3_MAP) 63384740dcSRalf Baechle #define V_MC_BANK3_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK3_MAP) 64384740dcSRalf Baechle #define G_MC_BANK3_MAP(x) _SB_GETVALUE(x, S_MC_BANK3_MAP, M_MC_BANK3_MAP) 65384740dcSRalf Baechle 66384740dcSRalf Baechle #define K_MC_BANK3_MAP_DEFAULT 0x0C 67384740dcSRalf Baechle #define V_MC_BANK3_MAP_DEFAULT V_MC_BANK3_MAP(K_MC_BANK3_MAP_DEFAULT) 68384740dcSRalf Baechle 69384740dcSRalf Baechle #define M_MC_RESERVED1 _SB_MAKEMASK(8, 32) 70384740dcSRalf Baechle 71384740dcSRalf Baechle #define S_MC_QUEUE_SIZE 40 72384740dcSRalf Baechle #define M_MC_QUEUE_SIZE _SB_MAKEMASK(4, S_MC_QUEUE_SIZE) 73384740dcSRalf Baechle #define V_MC_QUEUE_SIZE(x) _SB_MAKEVALUE(x, S_MC_QUEUE_SIZE) 74384740dcSRalf Baechle #define G_MC_QUEUE_SIZE(x) _SB_GETVALUE(x, S_MC_QUEUE_SIZE, M_MC_QUEUE_SIZE) 75384740dcSRalf Baechle #define V_MC_QUEUE_SIZE_DEFAULT V_MC_QUEUE_SIZE(0x0A) 76384740dcSRalf Baechle 77384740dcSRalf Baechle #define S_MC_AGE_LIMIT 44 78384740dcSRalf Baechle #define M_MC_AGE_LIMIT _SB_MAKEMASK(4, S_MC_AGE_LIMIT) 79384740dcSRalf Baechle #define V_MC_AGE_LIMIT(x) _SB_MAKEVALUE(x, S_MC_AGE_LIMIT) 80384740dcSRalf Baechle #define G_MC_AGE_LIMIT(x) _SB_GETVALUE(x, S_MC_AGE_LIMIT, M_MC_AGE_LIMIT) 81384740dcSRalf Baechle #define V_MC_AGE_LIMIT_DEFAULT V_MC_AGE_LIMIT(8) 82384740dcSRalf Baechle 83384740dcSRalf Baechle #define S_MC_WR_LIMIT 48 84384740dcSRalf Baechle #define M_MC_WR_LIMIT _SB_MAKEMASK(4, S_MC_WR_LIMIT) 85384740dcSRalf Baechle #define V_MC_WR_LIMIT(x) _SB_MAKEVALUE(x, S_MC_WR_LIMIT) 86384740dcSRalf Baechle #define G_MC_WR_LIMIT(x) _SB_GETVALUE(x, S_MC_WR_LIMIT, M_MC_WR_LIMIT) 87384740dcSRalf Baechle #define V_MC_WR_LIMIT_DEFAULT V_MC_WR_LIMIT(5) 88384740dcSRalf Baechle 89384740dcSRalf Baechle #define M_MC_IOB1HIGHPRIORITY _SB_MAKEMASK1(52) 90384740dcSRalf Baechle 91384740dcSRalf Baechle #define M_MC_RESERVED2 _SB_MAKEMASK(3, 53) 92384740dcSRalf Baechle 93384740dcSRalf Baechle #define S_MC_CS_MODE 56 94384740dcSRalf Baechle #define M_MC_CS_MODE _SB_MAKEMASK(4, S_MC_CS_MODE) 95384740dcSRalf Baechle #define V_MC_CS_MODE(x) _SB_MAKEVALUE(x, S_MC_CS_MODE) 96384740dcSRalf Baechle #define G_MC_CS_MODE(x) _SB_GETVALUE(x, S_MC_CS_MODE, M_MC_CS_MODE) 97384740dcSRalf Baechle 98384740dcSRalf Baechle #define K_MC_CS_MODE_MSB_CS 0 99384740dcSRalf Baechle #define K_MC_CS_MODE_INTLV_CS 15 100384740dcSRalf Baechle #define K_MC_CS_MODE_MIXED_CS_10 12 101384740dcSRalf Baechle #define K_MC_CS_MODE_MIXED_CS_30 6 102384740dcSRalf Baechle #define K_MC_CS_MODE_MIXED_CS_32 3 103384740dcSRalf Baechle 104384740dcSRalf Baechle #define V_MC_CS_MODE_MSB_CS V_MC_CS_MODE(K_MC_CS_MODE_MSB_CS) 105384740dcSRalf Baechle #define V_MC_CS_MODE_INTLV_CS V_MC_CS_MODE(K_MC_CS_MODE_INTLV_CS) 106384740dcSRalf Baechle #define V_MC_CS_MODE_MIXED_CS_10 V_MC_CS_MODE(K_MC_CS_MODE_MIXED_CS_10) 107384740dcSRalf Baechle #define V_MC_CS_MODE_MIXED_CS_30 V_MC_CS_MODE(K_MC_CS_MODE_MIXED_CS_30) 108384740dcSRalf Baechle #define V_MC_CS_MODE_MIXED_CS_32 V_MC_CS_MODE(K_MC_CS_MODE_MIXED_CS_32) 109384740dcSRalf Baechle 110384740dcSRalf Baechle #define M_MC_ECC_DISABLE _SB_MAKEMASK1(60) 111384740dcSRalf Baechle #define M_MC_BERR_DISABLE _SB_MAKEMASK1(61) 112384740dcSRalf Baechle #define M_MC_FORCE_SEQ _SB_MAKEMASK1(62) 113384740dcSRalf Baechle #define M_MC_DEBUG _SB_MAKEMASK1(63) 114384740dcSRalf Baechle 115384740dcSRalf Baechle #define V_MC_CONFIG_DEFAULT V_MC_WR_LIMIT_DEFAULT | V_MC_AGE_LIMIT_DEFAULT | \ 116384740dcSRalf Baechle V_MC_BANK0_MAP_DEFAULT | V_MC_BANK1_MAP_DEFAULT | \ 117384740dcSRalf Baechle V_MC_BANK2_MAP_DEFAULT | V_MC_BANK3_MAP_DEFAULT | V_MC_CHANNEL_SEL(0) | \ 118384740dcSRalf Baechle M_MC_IOB1HIGHPRIORITY | V_MC_QUEUE_SIZE_DEFAULT 119384740dcSRalf Baechle 120384740dcSRalf Baechle 121384740dcSRalf Baechle /* 122384740dcSRalf Baechle * Memory clock config register (Table 6-15) 123384740dcSRalf Baechle * 124384740dcSRalf Baechle * Note: this field has been updated to be consistent with the errata to 0.2 125384740dcSRalf Baechle */ 126384740dcSRalf Baechle 127384740dcSRalf Baechle #define S_MC_CLK_RATIO 0 128384740dcSRalf Baechle #define M_MC_CLK_RATIO _SB_MAKEMASK(4, S_MC_CLK_RATIO) 129384740dcSRalf Baechle #define V_MC_CLK_RATIO(x) _SB_MAKEVALUE(x, S_MC_CLK_RATIO) 130384740dcSRalf Baechle #define G_MC_CLK_RATIO(x) _SB_GETVALUE(x, S_MC_CLK_RATIO, M_MC_CLK_RATIO) 131384740dcSRalf Baechle 132384740dcSRalf Baechle #define K_MC_CLK_RATIO_2X 4 133384740dcSRalf Baechle #define K_MC_CLK_RATIO_25X 5 134384740dcSRalf Baechle #define K_MC_CLK_RATIO_3X 6 135384740dcSRalf Baechle #define K_MC_CLK_RATIO_35X 7 136384740dcSRalf Baechle #define K_MC_CLK_RATIO_4X 8 137384740dcSRalf Baechle #define K_MC_CLK_RATIO_45X 9 138384740dcSRalf Baechle 139384740dcSRalf Baechle #define V_MC_CLK_RATIO_2X V_MC_CLK_RATIO(K_MC_CLK_RATIO_2X) 140384740dcSRalf Baechle #define V_MC_CLK_RATIO_25X V_MC_CLK_RATIO(K_MC_CLK_RATIO_25X) 141384740dcSRalf Baechle #define V_MC_CLK_RATIO_3X V_MC_CLK_RATIO(K_MC_CLK_RATIO_3X) 142384740dcSRalf Baechle #define V_MC_CLK_RATIO_35X V_MC_CLK_RATIO(K_MC_CLK_RATIO_35X) 143384740dcSRalf Baechle #define V_MC_CLK_RATIO_4X V_MC_CLK_RATIO(K_MC_CLK_RATIO_4X) 144384740dcSRalf Baechle #define V_MC_CLK_RATIO_45X V_MC_CLK_RATIO(K_MC_CLK_RATIO_45X) 145384740dcSRalf Baechle #define V_MC_CLK_RATIO_DEFAULT V_MC_CLK_RATIO_25X 146384740dcSRalf Baechle 147384740dcSRalf Baechle #define S_MC_REF_RATE 8 148384740dcSRalf Baechle #define M_MC_REF_RATE _SB_MAKEMASK(8, S_MC_REF_RATE) 149384740dcSRalf Baechle #define V_MC_REF_RATE(x) _SB_MAKEVALUE(x, S_MC_REF_RATE) 150384740dcSRalf Baechle #define G_MC_REF_RATE(x) _SB_GETVALUE(x, S_MC_REF_RATE, M_MC_REF_RATE) 151384740dcSRalf Baechle 152384740dcSRalf Baechle #define K_MC_REF_RATE_100MHz 0x62 153384740dcSRalf Baechle #define K_MC_REF_RATE_133MHz 0x81 154384740dcSRalf Baechle #define K_MC_REF_RATE_200MHz 0xC4 155384740dcSRalf Baechle 156384740dcSRalf Baechle #define V_MC_REF_RATE_100MHz V_MC_REF_RATE(K_MC_REF_RATE_100MHz) 157384740dcSRalf Baechle #define V_MC_REF_RATE_133MHz V_MC_REF_RATE(K_MC_REF_RATE_133MHz) 158384740dcSRalf Baechle #define V_MC_REF_RATE_200MHz V_MC_REF_RATE(K_MC_REF_RATE_200MHz) 159384740dcSRalf Baechle #define V_MC_REF_RATE_DEFAULT V_MC_REF_RATE_100MHz 160384740dcSRalf Baechle 161384740dcSRalf Baechle #define S_MC_CLOCK_DRIVE 16 162384740dcSRalf Baechle #define M_MC_CLOCK_DRIVE _SB_MAKEMASK(4, S_MC_CLOCK_DRIVE) 163384740dcSRalf Baechle #define V_MC_CLOCK_DRIVE(x) _SB_MAKEVALUE(x, S_MC_CLOCK_DRIVE) 164384740dcSRalf Baechle #define G_MC_CLOCK_DRIVE(x) _SB_GETVALUE(x, S_MC_CLOCK_DRIVE, M_MC_CLOCK_DRIVE) 165384740dcSRalf Baechle #define V_MC_CLOCK_DRIVE_DEFAULT V_MC_CLOCK_DRIVE(0xF) 166384740dcSRalf Baechle 167384740dcSRalf Baechle #define S_MC_DATA_DRIVE 20 168384740dcSRalf Baechle #define M_MC_DATA_DRIVE _SB_MAKEMASK(4, S_MC_DATA_DRIVE) 169384740dcSRalf Baechle #define V_MC_DATA_DRIVE(x) _SB_MAKEVALUE(x, S_MC_DATA_DRIVE) 170384740dcSRalf Baechle #define G_MC_DATA_DRIVE(x) _SB_GETVALUE(x, S_MC_DATA_DRIVE, M_MC_DATA_DRIVE) 171384740dcSRalf Baechle #define V_MC_DATA_DRIVE_DEFAULT V_MC_DATA_DRIVE(0x0) 172384740dcSRalf Baechle 173384740dcSRalf Baechle #define S_MC_ADDR_DRIVE 24 174384740dcSRalf Baechle #define M_MC_ADDR_DRIVE _SB_MAKEMASK(4, S_MC_ADDR_DRIVE) 175384740dcSRalf Baechle #define V_MC_ADDR_DRIVE(x) _SB_MAKEVALUE(x, S_MC_ADDR_DRIVE) 176384740dcSRalf Baechle #define G_MC_ADDR_DRIVE(x) _SB_GETVALUE(x, S_MC_ADDR_DRIVE, M_MC_ADDR_DRIVE) 177384740dcSRalf Baechle #define V_MC_ADDR_DRIVE_DEFAULT V_MC_ADDR_DRIVE(0x0) 178384740dcSRalf Baechle 179384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) 180384740dcSRalf Baechle #define M_MC_REF_DISABLE _SB_MAKEMASK1(30) 181384740dcSRalf Baechle #endif /* 1250 PASS3 || 112x PASS1 */ 182384740dcSRalf Baechle 183384740dcSRalf Baechle #define M_MC_DLL_BYPASS _SB_MAKEMASK1(31) 184384740dcSRalf Baechle 185384740dcSRalf Baechle #define S_MC_DQI_SKEW 32 186384740dcSRalf Baechle #define M_MC_DQI_SKEW _SB_MAKEMASK(8, S_MC_DQI_SKEW) 187384740dcSRalf Baechle #define V_MC_DQI_SKEW(x) _SB_MAKEVALUE(x, S_MC_DQI_SKEW) 188384740dcSRalf Baechle #define G_MC_DQI_SKEW(x) _SB_GETVALUE(x, S_MC_DQI_SKEW, M_MC_DQI_SKEW) 189384740dcSRalf Baechle #define V_MC_DQI_SKEW_DEFAULT V_MC_DQI_SKEW(0) 190384740dcSRalf Baechle 191384740dcSRalf Baechle #define S_MC_DQO_SKEW 40 192384740dcSRalf Baechle #define M_MC_DQO_SKEW _SB_MAKEMASK(8, S_MC_DQO_SKEW) 193384740dcSRalf Baechle #define V_MC_DQO_SKEW(x) _SB_MAKEVALUE(x, S_MC_DQO_SKEW) 194384740dcSRalf Baechle #define G_MC_DQO_SKEW(x) _SB_GETVALUE(x, S_MC_DQO_SKEW, M_MC_DQO_SKEW) 195384740dcSRalf Baechle #define V_MC_DQO_SKEW_DEFAULT V_MC_DQO_SKEW(0) 196384740dcSRalf Baechle 197384740dcSRalf Baechle #define S_MC_ADDR_SKEW 48 198384740dcSRalf Baechle #define M_MC_ADDR_SKEW _SB_MAKEMASK(8, S_MC_ADDR_SKEW) 199384740dcSRalf Baechle #define V_MC_ADDR_SKEW(x) _SB_MAKEVALUE(x, S_MC_ADDR_SKEW) 200384740dcSRalf Baechle #define G_MC_ADDR_SKEW(x) _SB_GETVALUE(x, S_MC_ADDR_SKEW, M_MC_ADDR_SKEW) 201384740dcSRalf Baechle #define V_MC_ADDR_SKEW_DEFAULT V_MC_ADDR_SKEW(0x0F) 202384740dcSRalf Baechle 203384740dcSRalf Baechle #define S_MC_DLL_DEFAULT 56 204384740dcSRalf Baechle #define M_MC_DLL_DEFAULT _SB_MAKEMASK(8, S_MC_DLL_DEFAULT) 205384740dcSRalf Baechle #define V_MC_DLL_DEFAULT(x) _SB_MAKEVALUE(x, S_MC_DLL_DEFAULT) 206384740dcSRalf Baechle #define G_MC_DLL_DEFAULT(x) _SB_GETVALUE(x, S_MC_DLL_DEFAULT, M_MC_DLL_DEFAULT) 207384740dcSRalf Baechle #define V_MC_DLL_DEFAULT_DEFAULT V_MC_DLL_DEFAULT(0x10) 208384740dcSRalf Baechle 209384740dcSRalf Baechle #define V_MC_CLKCONFIG_DEFAULT V_MC_DLL_DEFAULT_DEFAULT | \ 210384740dcSRalf Baechle V_MC_ADDR_SKEW_DEFAULT | \ 211384740dcSRalf Baechle V_MC_DQO_SKEW_DEFAULT | \ 212384740dcSRalf Baechle V_MC_DQI_SKEW_DEFAULT | \ 213384740dcSRalf Baechle V_MC_ADDR_DRIVE_DEFAULT | \ 214384740dcSRalf Baechle V_MC_DATA_DRIVE_DEFAULT | \ 215384740dcSRalf Baechle V_MC_CLOCK_DRIVE_DEFAULT | \ 216384740dcSRalf Baechle V_MC_REF_RATE_DEFAULT 217384740dcSRalf Baechle 218384740dcSRalf Baechle 219384740dcSRalf Baechle 220384740dcSRalf Baechle /* 221384740dcSRalf Baechle * DRAM Command Register (Table 6-13) 222384740dcSRalf Baechle */ 223384740dcSRalf Baechle 224384740dcSRalf Baechle #define S_MC_COMMAND 0 225384740dcSRalf Baechle #define M_MC_COMMAND _SB_MAKEMASK(4, S_MC_COMMAND) 226384740dcSRalf Baechle #define V_MC_COMMAND(x) _SB_MAKEVALUE(x, S_MC_COMMAND) 227384740dcSRalf Baechle #define G_MC_COMMAND(x) _SB_GETVALUE(x, S_MC_COMMAND, M_MC_COMMAND) 228384740dcSRalf Baechle 229384740dcSRalf Baechle #define K_MC_COMMAND_EMRS 0 230384740dcSRalf Baechle #define K_MC_COMMAND_MRS 1 231384740dcSRalf Baechle #define K_MC_COMMAND_PRE 2 232384740dcSRalf Baechle #define K_MC_COMMAND_AR 3 233384740dcSRalf Baechle #define K_MC_COMMAND_SETRFSH 4 234384740dcSRalf Baechle #define K_MC_COMMAND_CLRRFSH 5 235384740dcSRalf Baechle #define K_MC_COMMAND_SETPWRDN 6 236384740dcSRalf Baechle #define K_MC_COMMAND_CLRPWRDN 7 237384740dcSRalf Baechle 238384740dcSRalf Baechle #define V_MC_COMMAND_EMRS V_MC_COMMAND(K_MC_COMMAND_EMRS) 239384740dcSRalf Baechle #define V_MC_COMMAND_MRS V_MC_COMMAND(K_MC_COMMAND_MRS) 240384740dcSRalf Baechle #define V_MC_COMMAND_PRE V_MC_COMMAND(K_MC_COMMAND_PRE) 241384740dcSRalf Baechle #define V_MC_COMMAND_AR V_MC_COMMAND(K_MC_COMMAND_AR) 242384740dcSRalf Baechle #define V_MC_COMMAND_SETRFSH V_MC_COMMAND(K_MC_COMMAND_SETRFSH) 243384740dcSRalf Baechle #define V_MC_COMMAND_CLRRFSH V_MC_COMMAND(K_MC_COMMAND_CLRRFSH) 244384740dcSRalf Baechle #define V_MC_COMMAND_SETPWRDN V_MC_COMMAND(K_MC_COMMAND_SETPWRDN) 245384740dcSRalf Baechle #define V_MC_COMMAND_CLRPWRDN V_MC_COMMAND(K_MC_COMMAND_CLRPWRDN) 246384740dcSRalf Baechle 247384740dcSRalf Baechle #define M_MC_CS0 _SB_MAKEMASK1(4) 248384740dcSRalf Baechle #define M_MC_CS1 _SB_MAKEMASK1(5) 249384740dcSRalf Baechle #define M_MC_CS2 _SB_MAKEMASK1(6) 250384740dcSRalf Baechle #define M_MC_CS3 _SB_MAKEMASK1(7) 251384740dcSRalf Baechle 252384740dcSRalf Baechle /* 253384740dcSRalf Baechle * DRAM Mode Register (Table 6-14) 254384740dcSRalf Baechle */ 255384740dcSRalf Baechle 256384740dcSRalf Baechle #define S_MC_EMODE 0 257384740dcSRalf Baechle #define M_MC_EMODE _SB_MAKEMASK(15, S_MC_EMODE) 258384740dcSRalf Baechle #define V_MC_EMODE(x) _SB_MAKEVALUE(x, S_MC_EMODE) 259384740dcSRalf Baechle #define G_MC_EMODE(x) _SB_GETVALUE(x, S_MC_EMODE, M_MC_EMODE) 260384740dcSRalf Baechle #define V_MC_EMODE_DEFAULT V_MC_EMODE(0) 261384740dcSRalf Baechle 262384740dcSRalf Baechle #define S_MC_MODE 16 263384740dcSRalf Baechle #define M_MC_MODE _SB_MAKEMASK(15, S_MC_MODE) 264384740dcSRalf Baechle #define V_MC_MODE(x) _SB_MAKEVALUE(x, S_MC_MODE) 265384740dcSRalf Baechle #define G_MC_MODE(x) _SB_GETVALUE(x, S_MC_MODE, M_MC_MODE) 266384740dcSRalf Baechle #define V_MC_MODE_DEFAULT V_MC_MODE(0x22) 267384740dcSRalf Baechle 268384740dcSRalf Baechle #define S_MC_DRAM_TYPE 32 269384740dcSRalf Baechle #define M_MC_DRAM_TYPE _SB_MAKEMASK(3, S_MC_DRAM_TYPE) 270384740dcSRalf Baechle #define V_MC_DRAM_TYPE(x) _SB_MAKEVALUE(x, S_MC_DRAM_TYPE) 271384740dcSRalf Baechle #define G_MC_DRAM_TYPE(x) _SB_GETVALUE(x, S_MC_DRAM_TYPE, M_MC_DRAM_TYPE) 272384740dcSRalf Baechle 273384740dcSRalf Baechle #define K_MC_DRAM_TYPE_JEDEC 0 274384740dcSRalf Baechle #define K_MC_DRAM_TYPE_FCRAM 1 275384740dcSRalf Baechle #define K_MC_DRAM_TYPE_SGRAM 2 276384740dcSRalf Baechle 277384740dcSRalf Baechle #define V_MC_DRAM_TYPE_JEDEC V_MC_DRAM_TYPE(K_MC_DRAM_TYPE_JEDEC) 278384740dcSRalf Baechle #define V_MC_DRAM_TYPE_FCRAM V_MC_DRAM_TYPE(K_MC_DRAM_TYPE_FCRAM) 279384740dcSRalf Baechle #define V_MC_DRAM_TYPE_SGRAM V_MC_DRAM_TYPE(K_MC_DRAM_TYPE_SGRAM) 280384740dcSRalf Baechle 281384740dcSRalf Baechle #define M_MC_EXTERNALDECODE _SB_MAKEMASK1(35) 282384740dcSRalf Baechle 283384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) 284384740dcSRalf Baechle #define M_MC_PRE_ON_A8 _SB_MAKEMASK1(36) 285384740dcSRalf Baechle #define M_MC_RAM_WITH_A13 _SB_MAKEMASK1(37) 286384740dcSRalf Baechle #endif /* 1250 PASS3 || 112x PASS1 */ 287384740dcSRalf Baechle 288384740dcSRalf Baechle 289384740dcSRalf Baechle 290384740dcSRalf Baechle /* 291384740dcSRalf Baechle * SDRAM Timing Register (Table 6-15) 292384740dcSRalf Baechle */ 293384740dcSRalf Baechle 294384740dcSRalf Baechle #define M_MC_w2rIDLE_TWOCYCLES _SB_MAKEMASK1(60) 295384740dcSRalf Baechle #define M_MC_r2wIDLE_TWOCYCLES _SB_MAKEMASK1(61) 296384740dcSRalf Baechle #define M_MC_r2rIDLE_TWOCYCLES _SB_MAKEMASK1(62) 297384740dcSRalf Baechle 298384740dcSRalf Baechle #define S_MC_tFIFO 56 299384740dcSRalf Baechle #define M_MC_tFIFO _SB_MAKEMASK(4, S_MC_tFIFO) 300384740dcSRalf Baechle #define V_MC_tFIFO(x) _SB_MAKEVALUE(x, S_MC_tFIFO) 301384740dcSRalf Baechle #define G_MC_tFIFO(x) _SB_GETVALUE(x, S_MC_tFIFO, M_MC_tFIFO) 302384740dcSRalf Baechle #define K_MC_tFIFO_DEFAULT 1 303384740dcSRalf Baechle #define V_MC_tFIFO_DEFAULT V_MC_tFIFO(K_MC_tFIFO_DEFAULT) 304384740dcSRalf Baechle 305384740dcSRalf Baechle #define S_MC_tRFC 52 306384740dcSRalf Baechle #define M_MC_tRFC _SB_MAKEMASK(4, S_MC_tRFC) 307384740dcSRalf Baechle #define V_MC_tRFC(x) _SB_MAKEVALUE(x, S_MC_tRFC) 308384740dcSRalf Baechle #define G_MC_tRFC(x) _SB_GETVALUE(x, S_MC_tRFC, M_MC_tRFC) 309384740dcSRalf Baechle #define K_MC_tRFC_DEFAULT 12 310384740dcSRalf Baechle #define V_MC_tRFC_DEFAULT V_MC_tRFC(K_MC_tRFC_DEFAULT) 311384740dcSRalf Baechle 312384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE(1250, PASS3) 313384740dcSRalf Baechle #define M_MC_tRFC_PLUS16 _SB_MAKEMASK1(51) /* 1250C3 and later. */ 314384740dcSRalf Baechle #endif 315384740dcSRalf Baechle 316384740dcSRalf Baechle #define S_MC_tCwCr 40 317384740dcSRalf Baechle #define M_MC_tCwCr _SB_MAKEMASK(4, S_MC_tCwCr) 318384740dcSRalf Baechle #define V_MC_tCwCr(x) _SB_MAKEVALUE(x, S_MC_tCwCr) 319384740dcSRalf Baechle #define G_MC_tCwCr(x) _SB_GETVALUE(x, S_MC_tCwCr, M_MC_tCwCr) 320384740dcSRalf Baechle #define K_MC_tCwCr_DEFAULT 4 321384740dcSRalf Baechle #define V_MC_tCwCr_DEFAULT V_MC_tCwCr(K_MC_tCwCr_DEFAULT) 322384740dcSRalf Baechle 323384740dcSRalf Baechle #define S_MC_tRCr 28 324384740dcSRalf Baechle #define M_MC_tRCr _SB_MAKEMASK(4, S_MC_tRCr) 325384740dcSRalf Baechle #define V_MC_tRCr(x) _SB_MAKEVALUE(x, S_MC_tRCr) 326384740dcSRalf Baechle #define G_MC_tRCr(x) _SB_GETVALUE(x, S_MC_tRCr, M_MC_tRCr) 327384740dcSRalf Baechle #define K_MC_tRCr_DEFAULT 9 328384740dcSRalf Baechle #define V_MC_tRCr_DEFAULT V_MC_tRCr(K_MC_tRCr_DEFAULT) 329384740dcSRalf Baechle 330384740dcSRalf Baechle #define S_MC_tRCw 24 331384740dcSRalf Baechle #define M_MC_tRCw _SB_MAKEMASK(4, S_MC_tRCw) 332384740dcSRalf Baechle #define V_MC_tRCw(x) _SB_MAKEVALUE(x, S_MC_tRCw) 333384740dcSRalf Baechle #define G_MC_tRCw(x) _SB_GETVALUE(x, S_MC_tRCw, M_MC_tRCw) 334384740dcSRalf Baechle #define K_MC_tRCw_DEFAULT 10 335384740dcSRalf Baechle #define V_MC_tRCw_DEFAULT V_MC_tRCw(K_MC_tRCw_DEFAULT) 336384740dcSRalf Baechle 337384740dcSRalf Baechle #define S_MC_tRRD 20 338384740dcSRalf Baechle #define M_MC_tRRD _SB_MAKEMASK(4, S_MC_tRRD) 339384740dcSRalf Baechle #define V_MC_tRRD(x) _SB_MAKEVALUE(x, S_MC_tRRD) 340384740dcSRalf Baechle #define G_MC_tRRD(x) _SB_GETVALUE(x, S_MC_tRRD, M_MC_tRRD) 341384740dcSRalf Baechle #define K_MC_tRRD_DEFAULT 2 342384740dcSRalf Baechle #define V_MC_tRRD_DEFAULT V_MC_tRRD(K_MC_tRRD_DEFAULT) 343384740dcSRalf Baechle 344384740dcSRalf Baechle #define S_MC_tRP 16 345384740dcSRalf Baechle #define M_MC_tRP _SB_MAKEMASK(4, S_MC_tRP) 346384740dcSRalf Baechle #define V_MC_tRP(x) _SB_MAKEVALUE(x, S_MC_tRP) 347384740dcSRalf Baechle #define G_MC_tRP(x) _SB_GETVALUE(x, S_MC_tRP, M_MC_tRP) 348384740dcSRalf Baechle #define K_MC_tRP_DEFAULT 4 349384740dcSRalf Baechle #define V_MC_tRP_DEFAULT V_MC_tRP(K_MC_tRP_DEFAULT) 350384740dcSRalf Baechle 351384740dcSRalf Baechle #define S_MC_tCwD 8 352384740dcSRalf Baechle #define M_MC_tCwD _SB_MAKEMASK(4, S_MC_tCwD) 353384740dcSRalf Baechle #define V_MC_tCwD(x) _SB_MAKEVALUE(x, S_MC_tCwD) 354384740dcSRalf Baechle #define G_MC_tCwD(x) _SB_GETVALUE(x, S_MC_tCwD, M_MC_tCwD) 355384740dcSRalf Baechle #define K_MC_tCwD_DEFAULT 1 356384740dcSRalf Baechle #define V_MC_tCwD_DEFAULT V_MC_tCwD(K_MC_tCwD_DEFAULT) 357384740dcSRalf Baechle 358384740dcSRalf Baechle #define M_tCrDh _SB_MAKEMASK1(7) 359384740dcSRalf Baechle #define M_MC_tCrDh M_tCrDh 360384740dcSRalf Baechle 361384740dcSRalf Baechle #define S_MC_tCrD 4 362384740dcSRalf Baechle #define M_MC_tCrD _SB_MAKEMASK(3, S_MC_tCrD) 363384740dcSRalf Baechle #define V_MC_tCrD(x) _SB_MAKEVALUE(x, S_MC_tCrD) 364384740dcSRalf Baechle #define G_MC_tCrD(x) _SB_GETVALUE(x, S_MC_tCrD, M_MC_tCrD) 365384740dcSRalf Baechle #define K_MC_tCrD_DEFAULT 2 366384740dcSRalf Baechle #define V_MC_tCrD_DEFAULT V_MC_tCrD(K_MC_tCrD_DEFAULT) 367384740dcSRalf Baechle 368384740dcSRalf Baechle #define S_MC_tRCD 0 369384740dcSRalf Baechle #define M_MC_tRCD _SB_MAKEMASK(4, S_MC_tRCD) 370384740dcSRalf Baechle #define V_MC_tRCD(x) _SB_MAKEVALUE(x, S_MC_tRCD) 371384740dcSRalf Baechle #define G_MC_tRCD(x) _SB_GETVALUE(x, S_MC_tRCD, M_MC_tRCD) 372384740dcSRalf Baechle #define K_MC_tRCD_DEFAULT 3 373384740dcSRalf Baechle #define V_MC_tRCD_DEFAULT V_MC_tRCD(K_MC_tRCD_DEFAULT) 374384740dcSRalf Baechle 375384740dcSRalf Baechle #define V_MC_TIMING_DEFAULT V_MC_tFIFO(K_MC_tFIFO_DEFAULT) | \ 376384740dcSRalf Baechle V_MC_tRFC(K_MC_tRFC_DEFAULT) | \ 377384740dcSRalf Baechle V_MC_tCwCr(K_MC_tCwCr_DEFAULT) | \ 378384740dcSRalf Baechle V_MC_tRCr(K_MC_tRCr_DEFAULT) | \ 379384740dcSRalf Baechle V_MC_tRCw(K_MC_tRCw_DEFAULT) | \ 380384740dcSRalf Baechle V_MC_tRRD(K_MC_tRRD_DEFAULT) | \ 381384740dcSRalf Baechle V_MC_tRP(K_MC_tRP_DEFAULT) | \ 382384740dcSRalf Baechle V_MC_tCwD(K_MC_tCwD_DEFAULT) | \ 383384740dcSRalf Baechle V_MC_tCrD(K_MC_tCrD_DEFAULT) | \ 384384740dcSRalf Baechle V_MC_tRCD(K_MC_tRCD_DEFAULT) | \ 385384740dcSRalf Baechle M_MC_r2rIDLE_TWOCYCLES 386384740dcSRalf Baechle 387384740dcSRalf Baechle /* 388384740dcSRalf Baechle * Errata says these are not the default 389384740dcSRalf Baechle * M_MC_w2rIDLE_TWOCYCLES | \ 390384740dcSRalf Baechle * M_MC_r2wIDLE_TWOCYCLES | \ 391384740dcSRalf Baechle */ 392384740dcSRalf Baechle 393384740dcSRalf Baechle 394384740dcSRalf Baechle /* 395384740dcSRalf Baechle * Chip Select Start Address Register (Table 6-17) 396384740dcSRalf Baechle */ 397384740dcSRalf Baechle 398384740dcSRalf Baechle #define S_MC_CS0_START 0 399384740dcSRalf Baechle #define M_MC_CS0_START _SB_MAKEMASK(16, S_MC_CS0_START) 400384740dcSRalf Baechle #define V_MC_CS0_START(x) _SB_MAKEVALUE(x, S_MC_CS0_START) 401384740dcSRalf Baechle #define G_MC_CS0_START(x) _SB_GETVALUE(x, S_MC_CS0_START, M_MC_CS0_START) 402384740dcSRalf Baechle 403384740dcSRalf Baechle #define S_MC_CS1_START 16 404384740dcSRalf Baechle #define M_MC_CS1_START _SB_MAKEMASK(16, S_MC_CS1_START) 405384740dcSRalf Baechle #define V_MC_CS1_START(x) _SB_MAKEVALUE(x, S_MC_CS1_START) 406384740dcSRalf Baechle #define G_MC_CS1_START(x) _SB_GETVALUE(x, S_MC_CS1_START, M_MC_CS1_START) 407384740dcSRalf Baechle 408384740dcSRalf Baechle #define S_MC_CS2_START 32 409384740dcSRalf Baechle #define M_MC_CS2_START _SB_MAKEMASK(16, S_MC_CS2_START) 410384740dcSRalf Baechle #define V_MC_CS2_START(x) _SB_MAKEVALUE(x, S_MC_CS2_START) 411384740dcSRalf Baechle #define G_MC_CS2_START(x) _SB_GETVALUE(x, S_MC_CS2_START, M_MC_CS2_START) 412384740dcSRalf Baechle 413384740dcSRalf Baechle #define S_MC_CS3_START 48 414384740dcSRalf Baechle #define M_MC_CS3_START _SB_MAKEMASK(16, S_MC_CS3_START) 415384740dcSRalf Baechle #define V_MC_CS3_START(x) _SB_MAKEVALUE(x, S_MC_CS3_START) 416384740dcSRalf Baechle #define G_MC_CS3_START(x) _SB_GETVALUE(x, S_MC_CS3_START, M_MC_CS3_START) 417384740dcSRalf Baechle 418384740dcSRalf Baechle /* 419384740dcSRalf Baechle * Chip Select End Address Register (Table 6-18) 420384740dcSRalf Baechle */ 421384740dcSRalf Baechle 422384740dcSRalf Baechle #define S_MC_CS0_END 0 423384740dcSRalf Baechle #define M_MC_CS0_END _SB_MAKEMASK(16, S_MC_CS0_END) 424384740dcSRalf Baechle #define V_MC_CS0_END(x) _SB_MAKEVALUE(x, S_MC_CS0_END) 425384740dcSRalf Baechle #define G_MC_CS0_END(x) _SB_GETVALUE(x, S_MC_CS0_END, M_MC_CS0_END) 426384740dcSRalf Baechle 427384740dcSRalf Baechle #define S_MC_CS1_END 16 428384740dcSRalf Baechle #define M_MC_CS1_END _SB_MAKEMASK(16, S_MC_CS1_END) 429384740dcSRalf Baechle #define V_MC_CS1_END(x) _SB_MAKEVALUE(x, S_MC_CS1_END) 430384740dcSRalf Baechle #define G_MC_CS1_END(x) _SB_GETVALUE(x, S_MC_CS1_END, M_MC_CS1_END) 431384740dcSRalf Baechle 432384740dcSRalf Baechle #define S_MC_CS2_END 32 433384740dcSRalf Baechle #define M_MC_CS2_END _SB_MAKEMASK(16, S_MC_CS2_END) 434384740dcSRalf Baechle #define V_MC_CS2_END(x) _SB_MAKEVALUE(x, S_MC_CS2_END) 435384740dcSRalf Baechle #define G_MC_CS2_END(x) _SB_GETVALUE(x, S_MC_CS2_END, M_MC_CS2_END) 436384740dcSRalf Baechle 437384740dcSRalf Baechle #define S_MC_CS3_END 48 438384740dcSRalf Baechle #define M_MC_CS3_END _SB_MAKEMASK(16, S_MC_CS3_END) 439384740dcSRalf Baechle #define V_MC_CS3_END(x) _SB_MAKEVALUE(x, S_MC_CS3_END) 440384740dcSRalf Baechle #define G_MC_CS3_END(x) _SB_GETVALUE(x, S_MC_CS3_END, M_MC_CS3_END) 441384740dcSRalf Baechle 442384740dcSRalf Baechle /* 443384740dcSRalf Baechle * Chip Select Interleave Register (Table 6-19) 444384740dcSRalf Baechle */ 445384740dcSRalf Baechle 446384740dcSRalf Baechle #define S_MC_INTLV_RESERVED 0 447384740dcSRalf Baechle #define M_MC_INTLV_RESERVED _SB_MAKEMASK(5, S_MC_INTLV_RESERVED) 448384740dcSRalf Baechle 449384740dcSRalf Baechle #define S_MC_INTERLEAVE 7 450384740dcSRalf Baechle #define M_MC_INTERLEAVE _SB_MAKEMASK(18, S_MC_INTERLEAVE) 451384740dcSRalf Baechle #define V_MC_INTERLEAVE(x) _SB_MAKEVALUE(x, S_MC_INTERLEAVE) 452384740dcSRalf Baechle 453384740dcSRalf Baechle #define S_MC_INTLV_MBZ 25 454384740dcSRalf Baechle #define M_MC_INTLV_MBZ _SB_MAKEMASK(39, S_MC_INTLV_MBZ) 455384740dcSRalf Baechle 456384740dcSRalf Baechle /* 457384740dcSRalf Baechle * Row Address Bits Register (Table 6-20) 458384740dcSRalf Baechle */ 459384740dcSRalf Baechle 460384740dcSRalf Baechle #define S_MC_RAS_RESERVED 0 461384740dcSRalf Baechle #define M_MC_RAS_RESERVED _SB_MAKEMASK(5, S_MC_RAS_RESERVED) 462384740dcSRalf Baechle 463384740dcSRalf Baechle #define S_MC_RAS_SELECT 12 464384740dcSRalf Baechle #define M_MC_RAS_SELECT _SB_MAKEMASK(25, S_MC_RAS_SELECT) 465384740dcSRalf Baechle #define V_MC_RAS_SELECT(x) _SB_MAKEVALUE(x, S_MC_RAS_SELECT) 466384740dcSRalf Baechle 467384740dcSRalf Baechle #define S_MC_RAS_MBZ 37 468384740dcSRalf Baechle #define M_MC_RAS_MBZ _SB_MAKEMASK(27, S_MC_RAS_MBZ) 469384740dcSRalf Baechle 470384740dcSRalf Baechle 471384740dcSRalf Baechle /* 472384740dcSRalf Baechle * Column Address Bits Register (Table 6-21) 473384740dcSRalf Baechle */ 474384740dcSRalf Baechle 475384740dcSRalf Baechle #define S_MC_CAS_RESERVED 0 476384740dcSRalf Baechle #define M_MC_CAS_RESERVED _SB_MAKEMASK(5, S_MC_CAS_RESERVED) 477384740dcSRalf Baechle 478384740dcSRalf Baechle #define S_MC_CAS_SELECT 5 479384740dcSRalf Baechle #define M_MC_CAS_SELECT _SB_MAKEMASK(18, S_MC_CAS_SELECT) 480384740dcSRalf Baechle #define V_MC_CAS_SELECT(x) _SB_MAKEVALUE(x, S_MC_CAS_SELECT) 481384740dcSRalf Baechle 482384740dcSRalf Baechle #define S_MC_CAS_MBZ 23 483384740dcSRalf Baechle #define M_MC_CAS_MBZ _SB_MAKEMASK(41, S_MC_CAS_MBZ) 484384740dcSRalf Baechle 485384740dcSRalf Baechle 486384740dcSRalf Baechle /* 487*4317892dSJason Wang * Bank Address Bits Register (Table 6-22) 488384740dcSRalf Baechle */ 489384740dcSRalf Baechle 490384740dcSRalf Baechle #define S_MC_BA_RESERVED 0 491384740dcSRalf Baechle #define M_MC_BA_RESERVED _SB_MAKEMASK(5, S_MC_BA_RESERVED) 492384740dcSRalf Baechle 493384740dcSRalf Baechle #define S_MC_BA_SELECT 5 494384740dcSRalf Baechle #define M_MC_BA_SELECT _SB_MAKEMASK(20, S_MC_BA_SELECT) 495384740dcSRalf Baechle #define V_MC_BA_SELECT(x) _SB_MAKEVALUE(x, S_MC_BA_SELECT) 496384740dcSRalf Baechle 497384740dcSRalf Baechle #define S_MC_BA_MBZ 25 498384740dcSRalf Baechle #define M_MC_BA_MBZ _SB_MAKEMASK(39, S_MC_BA_MBZ) 499384740dcSRalf Baechle 500384740dcSRalf Baechle /* 501384740dcSRalf Baechle * Chip Select Attribute Register (Table 6-23) 502384740dcSRalf Baechle */ 503384740dcSRalf Baechle 504384740dcSRalf Baechle #define K_MC_CS_ATTR_CLOSED 0 505384740dcSRalf Baechle #define K_MC_CS_ATTR_CASCHECK 1 506384740dcSRalf Baechle #define K_MC_CS_ATTR_HINT 2 507384740dcSRalf Baechle #define K_MC_CS_ATTR_OPEN 3 508384740dcSRalf Baechle 509384740dcSRalf Baechle #define S_MC_CS0_PAGE 0 510384740dcSRalf Baechle #define M_MC_CS0_PAGE _SB_MAKEMASK(2, S_MC_CS0_PAGE) 511384740dcSRalf Baechle #define V_MC_CS0_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS0_PAGE) 512384740dcSRalf Baechle #define G_MC_CS0_PAGE(x) _SB_GETVALUE(x, S_MC_CS0_PAGE, M_MC_CS0_PAGE) 513384740dcSRalf Baechle 514384740dcSRalf Baechle #define S_MC_CS1_PAGE 16 515384740dcSRalf Baechle #define M_MC_CS1_PAGE _SB_MAKEMASK(2, S_MC_CS1_PAGE) 516384740dcSRalf Baechle #define V_MC_CS1_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS1_PAGE) 517384740dcSRalf Baechle #define G_MC_CS1_PAGE(x) _SB_GETVALUE(x, S_MC_CS1_PAGE, M_MC_CS1_PAGE) 518384740dcSRalf Baechle 519384740dcSRalf Baechle #define S_MC_CS2_PAGE 32 520384740dcSRalf Baechle #define M_MC_CS2_PAGE _SB_MAKEMASK(2, S_MC_CS2_PAGE) 521384740dcSRalf Baechle #define V_MC_CS2_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS2_PAGE) 522384740dcSRalf Baechle #define G_MC_CS2_PAGE(x) _SB_GETVALUE(x, S_MC_CS2_PAGE, M_MC_CS2_PAGE) 523384740dcSRalf Baechle 524384740dcSRalf Baechle #define S_MC_CS3_PAGE 48 525384740dcSRalf Baechle #define M_MC_CS3_PAGE _SB_MAKEMASK(2, S_MC_CS3_PAGE) 526384740dcSRalf Baechle #define V_MC_CS3_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS3_PAGE) 527384740dcSRalf Baechle #define G_MC_CS3_PAGE(x) _SB_GETVALUE(x, S_MC_CS3_PAGE, M_MC_CS3_PAGE) 528384740dcSRalf Baechle 529384740dcSRalf Baechle /* 530384740dcSRalf Baechle * ECC Test ECC Register (Table 6-25) 531384740dcSRalf Baechle */ 532384740dcSRalf Baechle 533384740dcSRalf Baechle #define S_MC_ECC_INVERT 0 534384740dcSRalf Baechle #define M_MC_ECC_INVERT _SB_MAKEMASK(8, S_MC_ECC_INVERT) 535384740dcSRalf Baechle 536384740dcSRalf Baechle 537384740dcSRalf Baechle #endif 538