From eb75f652d392d2f4f257194e112f3f0db7479145 Mon Sep 17 00:00:00 2001 From: Zheng Bao Date: Fri, 23 Apr 2010 17:32:48 +0000 Subject: DDR3 support for AMD Fam10. Signed-off-by: Zheng Bao Acked-by: Stefan Reinauer git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5481 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/northbridge/amd/amdmct/wrappers/mcti_d.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/northbridge/amd/amdmct/wrappers') diff --git a/src/northbridge/amd/amdmct/wrappers/mcti_d.c b/src/northbridge/amd/amdmct/wrappers/mcti_d.c index 632b581289..a4a87fca01 100644 --- a/src/northbridge/amd/amdmct/wrappers/mcti_d.c +++ b/src/northbridge/amd/amdmct/wrappers/mcti_d.c @@ -27,8 +27,10 @@ static u16 mctGet_NVbits(u8 index) case NV_PACK_TYPE: #if CONFIG_CPU_SOCKET_TYPE == 0x10 /* Socket F */ val = 0; -#elif CONFIG_CPU_SOCKET_TYPE == 0x11 /* AM2r2 */ +#elif CONFIG_CPU_SOCKET_TYPE == 0x11 /* AM3 */ val = 1; +#elif CONFIG_CPU_SOCKET_TYPE == 0x13 /* ASB2 */ + val = 4; //#elif SYSTEM_TYPE == MOBILE // val = 2; #endif @@ -400,9 +402,21 @@ static void vErrata350(struct MCTStatStruc *pMCTstat, struct DCTStatStruc *pDCTs static void mctHookBeforeAnyTraining(struct MCTStatStruc *pMCTstat, struct DCTStatStruc *pDCTstatA) { - if (pDCTstatA->LogicalCPUID & (AMD_RB_C2 | AMD_DA_C2)) { +#if (CONFIG_DIMM_SUPPORT & 0x000F)==0x0005 /* AMD_FAM10_DDR3 */ + if (pDCTstatA->LogicalCPUID & (AMD_RB_C2 | AMD_DA_C2 | AMD_DA_C3)) { vErrata350(pMCTstat, pDCTstatA); } +#endif +} + +static u32 mct_AdjustSPDTimings(struct MCTStatStruc *pMCTstat, struct DCTStatStruc *pDCTstatA, u32 val) +{ + if (pDCTstatA->LogicalCPUID & AMD_DR_Bx) { + if (pDCTstatA->Status & (1 << SB_Registered)) { + val ++; + } + } + return val; } static void mctHookAfterAnyTraining(void) @@ -418,3 +432,4 @@ static u8 mctSetNodeBoundary_D(void) { return 0; } + -- cgit v1.2.3