Changeset 3433

Show
Ignore:
Timestamp:
07/23/08 23:04:03 (2 months ago)
Author:
mjones
Message:

Memory initialization support for AMD Fam10 B3 (B0-B2 already supported).

Signed-off-by: Marc Jones <marc.jones@…>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@…>

Location:
trunk/coreboot-v2/src/northbridge/amd/amdmct
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/coreboot-v2/src/northbridge/amd/amdmct/amddefs.h

    r3248 r3433  
    5454#define AMD_DR_Ax       (AMD_DR_A0A + AMD_DR_A1B + AMD_DR_A2) 
    5555#define AMD_DR_Bx       (AMD_DR_B0 | AMD_DR_B1 | AMD_DR_B2 | AMD_DR_B3 | AMD_DR_BA) 
     56#define AMD_DR_LT_B2    (AMD_DR_B0 | AMD_DR_B1 | AMD_DR_BA) 
    5657#define AMD_DR_LT_B3    (AMD_DR_B0 | AMD_DR_B1 | AMD_DR_B2 | AMD_DR_BA) 
    5758#define AMD_DR_GT_B0    (AMD_DR_ALL & ~(AMD_DR_B0)) 
  • trunk/coreboot-v2/src/northbridge/amd/amdmct/mct/mct_d.c

    r3232 r3433  
    24022402        // FIXME: for rev A: mct_BeforeDramInit_D(pDCTstat, dct); 
    24032403 
    2404         /* Disable auto refresh before Dram init when in ganged mode */ 
    2405         if (pDCTstat->GangedMode) { 
    2406                 val = Get_NB32(pDCTstat->dev_dct, 0x8C + (0x100 * dct)); 
    2407                 val |= 1 << DisAutoRefresh; 
    2408                 Set_NB32(pDCTstat->dev_dct, 0x8C + (0x100 * dct), val); 
     2404        /* Disable auto refresh before Dram init when in ganged mode (Erratum 278) */ 
     2405        if (pDCTstat->LogicalCPUID & AMD_DR_LT_B2) { 
     2406                if (pDCTstat->GangedMode) { 
     2407                        val = Get_NB32(pDCTstat->dev_dct, 0x8C + (0x100 * dct)); 
     2408                        val |= 1 << DisAutoRefresh; 
     2409                        Set_NB32(pDCTstat->dev_dct, 0x8C + (0x100 * dct), val); 
     2410                } 
    24092411        } 
    24102412 
     
    24122414 
    24132415        /* Re-enable auto refresh after Dram init when in ganged mode 
    2414          * to ensure both DCTs are in sync 
     2416         * to ensure both DCTs are in sync (Erratum 278) 
    24152417         */ 
    24162418 
    2417         if (pDCTstat->GangedMode) { 
    2418                 do { 
    2419                         val = Get_NB32(pDCTstat->dev_dct, 0x90 + (0x100 * dct)); 
    2420                 } while (!(val & (1 << InitDram))); 
    2421  
    2422                 WaitRoutine_D(50); 
    2423  
    2424                 val = Get_NB32(pDCTstat->dev_dct, 0x8C + (0x100 * dct)); 
    2425                 val &= ~(1 << DisAutoRefresh); 
    2426                 val |= 1 << DisAutoRefresh; 
    2427                 val &= ~(1 << DisAutoRefresh); 
     2419        if (pDCTstat->LogicalCPUID & AMD_DR_LT_B2) { 
     2420                if (pDCTstat->GangedMode) { 
     2421                        do { 
     2422                                val = Get_NB32(pDCTstat->dev_dct, 0x90 + (0x100 * dct)); 
     2423                        } while (!(val & (1 << InitDram))); 
     2424 
     2425                        WaitRoutine_D(50); 
     2426 
     2427                        val = Get_NB32(pDCTstat->dev_dct, 0x8C + (0x100 * dct)); 
     2428                        val &= ~(1 << DisAutoRefresh); 
     2429                        val |= 1 << DisAutoRefresh; 
     2430                        val &= ~(1 << DisAutoRefresh); 
     2431                } 
    24282432        } 
    24292433} 
     
    37933797        u8 valid = 0; 
    37943798 
    3795         /* FIXME: Skip reset DLL for B3 */ 
     3799        /* Skip reset DLL for B3 */ 
     3800        if (pDCTstat->LogicalCPUID & AMD_DR_B3) { 
     3801                return; 
     3802        } 
    37963803 
    37973804        addr = HWCR; 
     
    38863893        u32 dev = pDCTstat->dev_dct; 
    38873894 
    3888         /* FIXME: Add B3 */ 
    3889         if (pDCTstat->LogicalCPUID & AMD_DR_B2) { 
     3895        if (pDCTstat->LogicalCPUID & (AMD_DR_B2 | AMD_DR_B3)) { 
    38903896                mct_Wait(10000);        /* Wait 50 us*/ 
    38913897                val = Get_NB32(dev, 0x110);