2 * This file is part of the coreboot project.
4 * Copyright (C) 2007 Advanced Micro Devices, Inc.
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; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 u8 mct_checkNumberOfDqsRcvEn_1Pass(u8 pass)
24 if (pass == SecondPass)
31 u32 SetupDqsPattern_1PassA(u8 pass)
33 return (u32) TestPattern1_D;
37 u32 SetupDqsPattern_1PassB(u8 pass)
39 return (u32) TestPattern0_D;
42 u8 mct_Get_Start_RcvrEnDly_1Pass(u8 pass)
47 static u8 mct_Average_RcvrEnDly_1Pass(struct DCTStatStruc *pDCTstat, u8 Channel, u8 Receiver,
55 p = pDCTstat->CH_D_B_RCVRDLY[Channel][Receiver >> 1];
57 for(i=0; i < 8; i++) {
58 /* get left value from DCTStatStruc.CHA_D0_B0_RCVRDLY*/
60 /* get right value from DCTStatStruc.CHA_D0_B0_RCVRDLY_1*/
61 val += Pass1MemClkDly;
62 /* write back the value to stack */
68 // pDCTstat->DimmTrainFail &= ~(1<<Receiver+Channel);
74 static u8 mct_AdjustFinalDQSRcvValue_1Pass(u8 val_1p, u8 val_2p)
76 return (val_1p & 0xff) + ((val_2p & 0xff)<<8);
80 u8 mct_SaveRcvEnDly_D_1Pass(struct DCTStatStruc *pDCTstat, u8 pass)
84 if((pDCTstat->DqsRcvEn_Pass == 0xff) && (pass== FirstPass))
89 u8 mct_Average_RcvrEnDly_Pass(struct DCTStatStruc *pDCTstat,
90 u8 RcvrEnDly, u8 RcvrEnDlyLimit,
91 u8 Channel, u8 Receiver, u8 Pass)
94 return mct_Average_RcvrEnDly_1Pass(pDCTstat, Channel, Receiver, Pass);