coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
raminit.c File Reference
#include <cf9_reset.h>
#include <device/mmio.h>
#include <device/pci_ops.h>
#include <device/smbus_host.h>
#include <commonlib/helpers.h>
#include <console/console.h>
#include <delay.h>
#include <lib.h>
#include <southbridge/intel/common/hpet.h>
#include "pineview.h"
#include "raminit.h"
#include <spd.h>
#include <string.h>
Include dependency graph for raminit.c:

Go to the source code of this file.

Macros

#define PRINTK_DEBUG(x...)
 
#define MAX_TCLK_667   0x30
 
#define MAX_TCLK_800   0x25
 
#define MAX_TAC_667   0x45
 
#define MAX_TAC_800   0x40
 
#define NOP_CMD   (1 << 1)
 
#define PRE_CHARGE_CMD   (1 << 2)
 
#define MRS_CMD   ((1 << 2) | (1 << 1))
 
#define EMRS_CMD   (1 << 3)
 
#define EMRS1_CMD   (EMRS_CMD | (1 << 4))
 
#define EMRS2_CMD   (EMRS_CMD | (1 << 5))
 
#define EMRS3_CMD   (EMRS_CMD | (1 << 5) | (1 << 4))
 
#define ZQCAL_CMD   ((1 << 3) | (1 << 1))
 
#define CBR_CMD   ((1 << 3) | (1 << 2))
 
#define NORMAL_OP_CMD   ((1 << 3) | (1 << 2) | (1 << 1))
 
#define UBDIMM   1
 
#define SODIMM   2
 
#define TOTAL_CHANNELS   1
 
#define TOTAL_DIMMS   2
 
#define DIMM_IS_POPULATED(dimms, idx)   (dimms[idx].card_type != 0)
 
#define IF_DIMM_POPULATED(dimms, idx)   if (dimms[idx].card_type != 0)
 
#define ONLY_DIMMA_IS_POPULATED(dimms, ch)
 
#define ONLY_DIMMB_IS_POPULATED(dimms, ch)
 
#define BOTH_DIMMS_ARE_POPULATED(dimms, ch)
 
#define FOR_EACH_DIMM(idx)    for (idx = 0; idx < TOTAL_DIMMS; ++idx)
 
#define FOR_EACH_POPULATED_DIMM(dimms, idx)    FOR_EACH_DIMM(idx) IF_DIMM_POPULATED(dimms, idx)
 
#define CHANNEL_IS_POPULATED(dimms, idx)   ((dimms[idx<<1].card_type != 0) || (dimms[(idx<<1) + 1].card_type != 0))
 
#define CHANNEL_IS_CARDF(dimms, idx)   ((dimms[idx<<1].card_type == 0xf) || (dimms[(idx<<1) + 1].card_type == 0xf))
 
#define IF_CHANNEL_POPULATED(dimms, idx)   if ((dimms[idx<<1].card_type != 0) || (dimms[(idx<<1) + 1].card_type != 0))
 
#define FOR_EACH_CHANNEL(idx)    for (idx = 0; idx < TOTAL_CHANNELS; ++idx)
 
#define FOR_EACH_POPULATED_CHANNEL(dimms, idx)    FOR_EACH_CHANNEL(idx) IF_CHANNEL_POPULATED(dimms, idx)
 
#define RANKS_PER_CHANNEL   4
 
#define FOR_EACH_RANK_IN_CHANNEL(r)    for (r = 0; r < RANKS_PER_CHANNEL; ++r)
 
#define FOR_EACH_POPULATED_RANK_IN_CHANNEL(dimms, ch, r)    FOR_EACH_RANK_IN_CHANNEL(r) if (rank_is_populated(dimms, ch, r))
 
#define FOR_EACH_RANK(ch, r)    FOR_EACH_CHANNEL(ch) FOR_EACH_RANK_IN_CHANNEL(r)
 
#define FOR_EACH_POPULATED_RANK(dimms, ch, r)    FOR_EACH_RANK(ch, r) if (rank_is_populated(dimms, ch, r))
 
#define TABLE   static const
 
#define FOR_EACH_RCOMP_GROUP(idx)   for (idx = 0; idx < 7; idx++) if (idx != 1)
 
#define C0RCOMPCTRLx(x)   (rcompctl[(x)] + 0x00)
 
#define C0RCOMPMULTx(x)   (rcompctl[(x)] + 0x04)
 
#define C0RCOMPOVRx(x)   (rcompctl[(x)] + 0x06)
 
#define C0RCOMPOSVx(x)   (rcompctl[(x)] + 0x0a)
 
#define C0SCOMPVREFx(x)   (rcompctl[(x)] + 0x0e)
 
#define C0SCOMPOVRx(x)   (rcompctl[(x)] + 0x10)
 
#define C0SCOMPOFFx(x)   (rcompctl[(x)] + 0x12)
 
#define C0DCOMPx(x)   (rcompctl[(x)] + 0x14)
 
#define C0SLEWBASEx(x)   (rcompctl[(x)] + 0x16)
 
#define C0SLEWPULUTx(x)   (rcompctl[(x)] + 0x18)
 
#define C0SLEWPDLUTx(x)   (rcompctl[(x)] + 0x1c)
 
#define C0DCOMPOVRx(x)   (rcompctl[(x)] + 0x20)
 
#define C0DCOMPOFFx(x)   (rcompctl[(x)] + 0x24)
 

Functions

static bool rank_is_populated (struct dimminfo dimms[], u8 ch, u8 r)
 
static void barrier (void)
 
static int decode_spd (struct dimminfo *d, int i)
 
static void find_ramconfig (struct sysinfo *s, u32 chan)
 
static void sdram_read_spds (struct sysinfo *s)
 
static int lsbpos (u8 val)
 
static int msbpos (u8 val)
 
static void sdram_detect_smallest_params (struct sysinfo *s)
 
static void sdram_detect_ram_speed (struct sysinfo *s)
 
static void sdram_clk_crossing (struct sysinfo *s)
 
static void sdram_clkmode (struct sysinfo *s)
 
static void sdram_timings (struct sysinfo *s)
 
static void sdram_p_clkset0 (const struct pllparam *pll, u8 f, u8 i)
 
static void sdram_p_clkset1 (const struct pllparam *pll, u8 f, u8 i)
 
static void sdram_p_cmd (const struct pllparam *pll, u8 f, u8 i)
 
static void sdram_p_ctrl (const struct pllparam *pll, u8 f, u8 i)
 
static void sdram_p_dqs (struct pllparam *pll, u8 f, u8 clk)
 
static void sdram_p_dq (struct pllparam *pll, u8 f, u8 clk)
 
static void sdram_calibratepll (struct sysinfo *s, u8 pidelay)
 
static void sdram_calibratehwpll (struct sysinfo *s)
 
static void sdram_dlltiming (struct sysinfo *s)
 
static void sdram_rcomp (struct sysinfo *s)
 
static void sdram_odt (struct sysinfo *s)
 
static void sdram_mmap (struct sysinfo *s)
 
static u8 sdram_checkrcompoverride (void)
 
static void sdram_rcompupdate (struct sysinfo *s)
 
static void sdram_jedec (struct sysinfo *s, u8 rank, u8 jmode, u16 jval)
 
static void sdram_zqcl (struct sysinfo *s)
 
static void sdram_jedecinit (struct sysinfo *s)
 
static void sdram_misc (struct sysinfo *s)
 
static void sdram_checkreset (void)
 
static void sdram_dradrb (struct sysinfo *s)
 
static u8 sampledqs (u32 dqshighaddr, u32 strobeaddr, u8 highlow, u8 count)
 
static void rcvenclock (u8 *coarse, u8 *medium, u8 lane)
 
static void sdram_rcven (struct sysinfo *s)
 
static void sdram_mmap_regs (struct sysinfo *s)
 
static void sdram_enhancedmode (struct sysinfo *s)
 
static void sdram_periodic_rcomp (void)
 
static void sdram_new_trd (struct sysinfo *s)
 
static void sdram_powersettings (struct sysinfo *s)
 
static void sdram_programddr (void)
 
static void sdram_programdqdqs (struct sysinfo *s)
 
void sdram_initialize (int boot_path, const u8 *spd_addresses)
 

Macro Definition Documentation

◆ BOTH_DIMMS_ARE_POPULATED

#define BOTH_DIMMS_ARE_POPULATED (   dimms,
  ch 
)
Value:
(\
(DIMM_IS_POPULATED(dimms, (ch == 0) ? 0 : 2) && \
(DIMM_IS_POPULATED(dimms, (ch == 0) ? 1 : 3))))
static struct dramc_channel const ch[2]
#define DIMM_IS_POPULATED(dimms, idx)
Definition: raminit.c:46

Definition at line 54 of file raminit.c.

◆ C0DCOMPOFFx

#define C0DCOMPOFFx (   x)    (rcompctl[(x)] + 0x24)

Definition at line 1215 of file raminit.c.

◆ C0DCOMPOVRx

#define C0DCOMPOVRx (   x)    (rcompctl[(x)] + 0x20)

Definition at line 1214 of file raminit.c.

◆ C0DCOMPx

#define C0DCOMPx (   x)    (rcompctl[(x)] + 0x14)

Definition at line 1210 of file raminit.c.

◆ C0RCOMPCTRLx

#define C0RCOMPCTRLx (   x)    (rcompctl[(x)] + 0x00)

Definition at line 1203 of file raminit.c.

◆ C0RCOMPMULTx

#define C0RCOMPMULTx (   x)    (rcompctl[(x)] + 0x04)

Definition at line 1204 of file raminit.c.

◆ C0RCOMPOSVx

#define C0RCOMPOSVx (   x)    (rcompctl[(x)] + 0x0a)

Definition at line 1206 of file raminit.c.

◆ C0RCOMPOVRx

#define C0RCOMPOVRx (   x)    (rcompctl[(x)] + 0x06)

Definition at line 1205 of file raminit.c.

◆ C0SCOMPOFFx

#define C0SCOMPOFFx (   x)    (rcompctl[(x)] + 0x12)

Definition at line 1209 of file raminit.c.

◆ C0SCOMPOVRx

#define C0SCOMPOVRx (   x)    (rcompctl[(x)] + 0x10)

Definition at line 1208 of file raminit.c.

◆ C0SCOMPVREFx

#define C0SCOMPVREFx (   x)    (rcompctl[(x)] + 0x0e)

Definition at line 1207 of file raminit.c.

◆ C0SLEWBASEx

#define C0SLEWBASEx (   x)    (rcompctl[(x)] + 0x16)

Definition at line 1211 of file raminit.c.

◆ C0SLEWPDLUTx

#define C0SLEWPDLUTx (   x)    (rcompctl[(x)] + 0x1c)

Definition at line 1213 of file raminit.c.

◆ C0SLEWPULUTx

#define C0SLEWPULUTx (   x)    (rcompctl[(x)] + 0x18)

Definition at line 1212 of file raminit.c.

◆ CBR_CMD

#define CBR_CMD   ((1 << 3) | (1 << 2))

Definition at line 37 of file raminit.c.

◆ CHANNEL_IS_CARDF

#define CHANNEL_IS_CARDF (   dimms,
  idx 
)    ((dimms[idx<<1].card_type == 0xf) || (dimms[(idx<<1) + 1].card_type == 0xf))

Definition at line 62 of file raminit.c.

◆ CHANNEL_IS_POPULATED

#define CHANNEL_IS_POPULATED (   dimms,
  idx 
)    ((dimms[idx<<1].card_type != 0) || (dimms[(idx<<1) + 1].card_type != 0))

Definition at line 61 of file raminit.c.

◆ DIMM_IS_POPULATED

#define DIMM_IS_POPULATED (   dimms,
  idx 
)    (dimms[idx].card_type != 0)

Definition at line 46 of file raminit.c.

◆ EMRS1_CMD

#define EMRS1_CMD   (EMRS_CMD | (1 << 4))

Definition at line 33 of file raminit.c.

◆ EMRS2_CMD

#define EMRS2_CMD   (EMRS_CMD | (1 << 5))

Definition at line 34 of file raminit.c.

◆ EMRS3_CMD

#define EMRS3_CMD   (EMRS_CMD | (1 << 5) | (1 << 4))

Definition at line 35 of file raminit.c.

◆ EMRS_CMD

#define EMRS_CMD   (1 << 3)

Definition at line 32 of file raminit.c.

◆ FOR_EACH_CHANNEL

#define FOR_EACH_CHANNEL (   idx)     for (idx = 0; idx < TOTAL_CHANNELS; ++idx)

Definition at line 64 of file raminit.c.

◆ FOR_EACH_DIMM

#define FOR_EACH_DIMM (   idx)     for (idx = 0; idx < TOTAL_DIMMS; ++idx)

Definition at line 57 of file raminit.c.

◆ FOR_EACH_POPULATED_CHANNEL

#define FOR_EACH_POPULATED_CHANNEL (   dimms,
  idx 
)     FOR_EACH_CHANNEL(idx) IF_CHANNEL_POPULATED(dimms, idx)

Definition at line 66 of file raminit.c.

◆ FOR_EACH_POPULATED_DIMM

#define FOR_EACH_POPULATED_DIMM (   dimms,
  idx 
)     FOR_EACH_DIMM(idx) IF_DIMM_POPULATED(dimms, idx)

Definition at line 59 of file raminit.c.

◆ FOR_EACH_POPULATED_RANK

#define FOR_EACH_POPULATED_RANK (   dimms,
  ch,
 
)     FOR_EACH_RANK(ch, r) if (rank_is_populated(dimms, ch, r))

Definition at line 77 of file raminit.c.

◆ FOR_EACH_POPULATED_RANK_IN_CHANNEL

#define FOR_EACH_POPULATED_RANK_IN_CHANNEL (   dimms,
  ch,
 
)     FOR_EACH_RANK_IN_CHANNEL(r) if (rank_is_populated(dimms, ch, r))

Definition at line 73 of file raminit.c.

◆ FOR_EACH_RANK

#define FOR_EACH_RANK (   ch,
 
)     FOR_EACH_CHANNEL(ch) FOR_EACH_RANK_IN_CHANNEL(r)

Definition at line 75 of file raminit.c.

◆ FOR_EACH_RANK_IN_CHANNEL

#define FOR_EACH_RANK_IN_CHANNEL (   r)     for (r = 0; r < RANKS_PER_CHANNEL; ++r)

Definition at line 71 of file raminit.c.

◆ FOR_EACH_RCOMP_GROUP

#define FOR_EACH_RCOMP_GROUP (   idx)    for (idx = 0; idx < 7; idx++) if (idx != 1)

Definition at line 1200 of file raminit.c.

◆ IF_CHANNEL_POPULATED

#define IF_CHANNEL_POPULATED (   dimms,
  idx 
)    if ((dimms[idx<<1].card_type != 0) || (dimms[(idx<<1) + 1].card_type != 0))

Definition at line 63 of file raminit.c.

◆ IF_DIMM_POPULATED

#define IF_DIMM_POPULATED (   dimms,
  idx 
)    if (dimms[idx].card_type != 0)

Definition at line 47 of file raminit.c.

◆ MAX_TAC_667

#define MAX_TAC_667   0x45

Definition at line 26 of file raminit.c.

◆ MAX_TAC_800

#define MAX_TAC_800   0x40

Definition at line 27 of file raminit.c.

◆ MAX_TCLK_667

#define MAX_TCLK_667   0x30

Definition at line 24 of file raminit.c.

◆ MAX_TCLK_800

#define MAX_TCLK_800   0x25

Definition at line 25 of file raminit.c.

◆ MRS_CMD

#define MRS_CMD   ((1 << 2) | (1 << 1))

Definition at line 31 of file raminit.c.

◆ NOP_CMD

#define NOP_CMD   (1 << 1)

Definition at line 29 of file raminit.c.

◆ NORMAL_OP_CMD

#define NORMAL_OP_CMD   ((1 << 3) | (1 << 2) | (1 << 1))

Definition at line 38 of file raminit.c.

◆ ONLY_DIMMA_IS_POPULATED

#define ONLY_DIMMA_IS_POPULATED (   dimms,
  ch 
)
Value:
(\
(DIMM_IS_POPULATED(dimms, (ch == 0) ? 0 : 2) && \
!DIMM_IS_POPULATED(dimms, (ch == 0) ? 1 : 3)))

Definition at line 48 of file raminit.c.

◆ ONLY_DIMMB_IS_POPULATED

#define ONLY_DIMMB_IS_POPULATED (   dimms,
  ch 
)
Value:
(\
(DIMM_IS_POPULATED(dimms, (ch == 0) ? 1 : 3) && \
!DIMM_IS_POPULATED(dimms, (ch == 0) ? 0 : 2)))

Definition at line 51 of file raminit.c.

◆ PRE_CHARGE_CMD

#define PRE_CHARGE_CMD   (1 << 2)

Definition at line 30 of file raminit.c.

◆ PRINTK_DEBUG

#define PRINTK_DEBUG (   x...)

Definition at line 21 of file raminit.c.

◆ RANKS_PER_CHANNEL

#define RANKS_PER_CHANNEL   4

Definition at line 69 of file raminit.c.

◆ SODIMM

#define SODIMM   2

Definition at line 41 of file raminit.c.

◆ TABLE

#define TABLE   static const

Definition at line 1197 of file raminit.c.

◆ TOTAL_CHANNELS

#define TOTAL_CHANNELS   1

Definition at line 43 of file raminit.c.

◆ TOTAL_DIMMS

#define TOTAL_DIMMS   2

Definition at line 44 of file raminit.c.

◆ UBDIMM

#define UBDIMM   1

Definition at line 40 of file raminit.c.

◆ ZQCAL_CMD

#define ZQCAL_CMD   ((1 << 3) | (1 << 1))

Definition at line 36 of file raminit.c.

Function Documentation

◆ barrier()

static void barrier ( void  )
inlinestatic

Definition at line 88 of file raminit.c.

Referenced by sampledqs(), and sdram_jedec().

Here is the caller graph for this function:

◆ decode_spd()

◆ find_ramconfig()

static void find_ramconfig ( struct sysinfo s,
u32  chan 
)
static

Definition at line 144 of file raminit.c.

References die(), and s.

Referenced by sdram_read_spds().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lsbpos()

static int lsbpos ( u8  val)
static

Definition at line 310 of file raminit.c.

References val.

Referenced by sdram_detect_ram_speed().

Here is the caller graph for this function:

◆ msbpos()

static int msbpos ( u8  val)
static

Definition at line 320 of file raminit.c.

References val.

Referenced by sdram_detect_ram_speed().

Here is the caller graph for this function:

◆ rank_is_populated()

static bool rank_is_populated ( struct dimminfo  dimms[],
u8  ch,
u8  r 
)
static

Definition at line 80 of file raminit.c.

References ch.

Referenced by sdram_dlltiming(), sdram_dradrb(), sdram_jedecinit(), and sdram_mmap().

Here is the caller graph for this function:

◆ rcvenclock()

static void rcvenclock ( u8 coarse,
u8 medium,
u8  lane 
)
static

Definition at line 1864 of file raminit.c.

References C0RCVMISCCTL2, C0STATRDCTRL, mchbar_clrsetbits16(), and mchbar_clrsetbits32().

Referenced by sdram_rcven().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sampledqs()

static u8 sampledqs ( u32  dqshighaddr,
u32  strobeaddr,
u8  highlow,
u8  count 
)
static

Definition at line 1843 of file raminit.c.

References barrier(), C0RSTCTL, count, hpet_udelay(), mchbar_clrbits8, mchbar_read8(), mchbar_setbits8, and read32().

Referenced by sdram_rcven().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_calibratehwpll()

static void sdram_calibratehwpll ( struct sysinfo s)
static

Definition at line 1056 of file raminit.c.

References CSHRPDCTL, mchbar_clrbits8, mchbar_read8(), mchbar_setbits16, mchbar_setbits8, and s.

Referenced by sdram_dlltiming().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_calibratepll()

static void sdram_calibratepll ( struct sysinfo s,
u8  pidelay 
)
static

Definition at line 952 of file raminit.c.

References CSHRDQSCMN, CSHRPDCTL4, mchbar_clrbits8, mchbar_clrsetbits16(), MEM_CLOCK_667MHz, s, sdram_p_clkset0(), sdram_p_clkset1(), sdram_p_cmd(), sdram_p_ctrl(), sdram_p_dq(), and sdram_p_dqs().

Referenced by sdram_dlltiming().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_checkrcompoverride()

static u8 sdram_checkrcompoverride ( void  )
static

Definition at line 1579 of file raminit.c.

References c, mchbar_read32(), mchbar_write32(), RCMEASBUFXOVR, and XCOMP.

Referenced by sdram_rcompupdate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_checkreset()

static void sdram_checkreset ( void  )
static

Definition at line 1732 of file raminit.c.

References full_reset(), PCI_DEV, pci_read_config8(), pci_write_config8(), and reset().

Referenced by sdram_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_clk_crossing()

static void sdram_clk_crossing ( struct sysinfo s)
static

Definition at line 533 of file raminit.c.

References CLKXSSH2MCBYP, CLKXSSH2MCBYPPHAS, CLKXSSH2MCRDCST, CLKXSSH2MCRDQ, CLKXSSH2MD, CLKXSSH2X2MD, CLKXSSMC2H, CLKXSSMC2HALT, HMBYPCP, HMCCMC, HMCCMP, HMCCPEXT, HMDCMP, HMDCPEXT, mchbar_setbits32, mchbar_write32(), mchbar_write8(), and s.

Referenced by sdram_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_clkmode()

static void sdram_clkmode ( struct sysinfo s)
static

Definition at line 601 of file raminit.c.

References BOOT_PATH_RESET, C0GNT2LNCH1, C0GNT2LNCH2, C0STATRDCTRL, CSHRMISCCTL1, mchbar_clrbits16, mchbar_clrbits8, mchbar_clrsetbits16(), mchbar_setbits32, mchbar_write32(), MEM_CLOCK_667MHz, MPLLCTL, and s.

Referenced by sdram_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_detect_ram_speed()

static void sdram_detect_ram_speed ( struct sysinfo s)
static

Definition at line 394 of file raminit.c.

References BOOT_PATH_RESET, CLKCFG, die(), FOR_EACH_POPULATED_DIMM, FSB_CLOCK_800MHz, HOST_BRIDGE, lsbpos(), MAX, mchbar_read32(), mchbar_setbits32, mchbar_write32(), MEM_CLOCK_667MHz, MEM_CLOCK_800MHz, msbpos(), pci_read_config8(), PMSTS, PRINTK_DEBUG, and s.

Referenced by sdram_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_detect_smallest_params()

static void sdram_detect_smallest_params ( struct sysinfo s)
static

Definition at line 328 of file raminit.c.

References DIV_ROUND_UP, FOR_EACH_POPULATED_DIMM, MAX, MIN, PRINTK_DEBUG, and s.

Referenced by sdram_initialize().

Here is the caller graph for this function:

◆ sdram_dlltiming()

◆ sdram_dradrb()

static void sdram_dradrb ( struct sysinfo s)
static

Definition at line 1757 of file raminit.c.

References addr, BIOS_DEBUG, C0CKECTRL, C0DRA01, C0DRB0, ch, FOR_EACH_POPULATED_RANK, FOR_EACH_RANK, mchbar_clrsetbits8(), mchbar_setbits8, mchbar_write16(), mchbar_write32(), ONLY_DIMMA_IS_POPULATED, ONLY_DIMMB_IS_POPULATED, printk, PRINTK_DEBUG, rank_is_populated(), and s.

Referenced by sdram_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_enhancedmode()

◆ sdram_initialize()

◆ sdram_jedec()

static void sdram_jedec ( struct sysinfo s,
u8  rank,
u8  jmode,
u16  jval 
)
static

Definition at line 1637 of file raminit.c.

References barrier(), C0JEDEC, hpet_udelay(), mchbar_clrsetbits8(), and read32().

Referenced by sdram_jedecinit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_jedecinit()

static void sdram_jedecinit ( struct sysinfo s)
static

Definition at line 1659 of file raminit.c.

References CBR_CMD, ch, EMRS1_CMD, EMRS2_CMD, EMRS3_CMD, FOR_EACH_POPULATED_RANK, hpet_udelay(), MRS_CMD, NOP_CMD, PRE_CHARGE_CMD, PRINTK_DEBUG, rank_is_populated(), s, sdram_jedec(), and val.

Referenced by sdram_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_misc()

static void sdram_misc ( struct sysinfo s)
static

Definition at line 1714 of file raminit.c.

References BOOT_PATH_RESUME, C0DYNRDCTRL, C0JEDEC, C0REFRCTRL, mchbar_clrbits8, mchbar_clrsetbits32(), mchbar_clrsetbits8(), mchbar_setbits8, NORMAL_OP_CMD, s, and sdram_zqcl().

Referenced by sdram_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_mmap()

static void sdram_mmap ( struct sysinfo s)
static

Definition at line 1532 of file raminit.c.

References C0CKECTRL, C0DRA01, C0DRB0, C0DRB2, HOST_BRIDGE, mchbar_clrsetbits32(), mchbar_write32(), pci_write_config16(), pci_write_config32(), rank_is_populated(), s, and TABLE.

Referenced by sdram_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_mmap_regs()

static void sdram_mmap_regs ( struct sysinfo s)
static

Definition at line 2025 of file raminit.c.

References BGSM, BIOS_DEBUG, ESMRAMC, GBSM, GGC, HOST_BRIDGE, MAX, MIN, pci_read_config16(), pci_read_config32(), pci_read_config8(), pci_write_config16(), pci_write_config32(), pci_write_config8(), printk, s, TOLUD, TOM, TOUUD, and TSEG.

Referenced by sdram_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_new_trd()

static void sdram_new_trd ( struct sysinfo s)
static

Definition at line 2214 of file raminit.c.

References C0STATRDCTRL, CSHRFIFOCTL, FSB_CLOCK_667MHz, HMBYPCP, HMCCMC, MAX, mchbar_clrsetbits16(), mchbar_read8(), MEM_CLOCK_667MHz, MEM_CLOCK_800MHz, and s.

Referenced by sdram_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_odt()

static void sdram_odt ( struct sysinfo s)
static

Definition at line 1478 of file raminit.c.

References C0ODT, C0ODTRKCTRL, mchbar_write16(), and s.

Referenced by sdram_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_p_clkset0()

static void sdram_p_clkset0 ( const struct pllparam pll,
u8  f,
u8  i 
)
static

Definition at line 833 of file raminit.c.

References C0CKTX, C0TXCK0DLL, mchbar_clrsetbits16(), and mchbar_clrsetbits8().

Referenced by sdram_calibratepll().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_p_clkset1()

static void sdram_p_clkset1 ( const struct pllparam pll,
u8  f,
u8  i 
)
static

Definition at line 844 of file raminit.c.

References C0CKTX, C0TXCK1DLL, mchbar_clrsetbits32(), and mchbar_clrsetbits8().

Referenced by sdram_calibratepll().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_p_cmd()

static void sdram_p_cmd ( const struct pllparam pll,
u8  f,
u8  i 
)
static

Definition at line 855 of file raminit.c.

References C0CMDTX1, C0CMDTX2, C0TXCMD0DLL, C0TXCMD1DLL, and mchbar_clrsetbits8().

Referenced by sdram_calibratepll().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_p_ctrl()

static void sdram_p_ctrl ( const struct pllparam pll,
u8  f,
u8  i 
)
static

Definition at line 872 of file raminit.c.

References C0CMDTX2, C0CTLTX2, C0TXCTL0DLL, C0TXCTL1DLL, C0TXCTL2DLL, C0TXCTL3DLL, mchbar_clrsetbits32(), and mchbar_clrsetbits8().

Referenced by sdram_calibratepll().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_p_dq()

static void sdram_p_dq ( struct pllparam pll,
u8  f,
u8  clk 
)
static

Definition at line 928 of file raminit.c.

References C0DQRyTX1, C0DQSDQRyTX3, C0TXDQ0R0DLL, mchbar_clrsetbits32(), and mchbar_clrsetbits8().

Referenced by sdram_calibratepll().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_p_dqs()

static void sdram_p_dqs ( struct pllparam pll,
u8  f,
u8  clk 
)
static

Definition at line 904 of file raminit.c.

References C0DQSDQRyTX3, C0DQSRyTX1, C0TXDQS0R0DLL, mchbar_clrsetbits32(), and mchbar_clrsetbits8().

Referenced by sdram_calibratepll().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_periodic_rcomp()

static void sdram_periodic_rcomp ( void  )
static

Definition at line 2201 of file raminit.c.

References CMNDQFIFORST, COMPCTRL1, CSHRMISCCTL, mchbar_clrbits16, mchbar_clrbits8, mchbar_clrsetbits16(), mchbar_read32(), mchbar_setbits8, and XCOMPDFCTRL.

Referenced by sdram_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_powersettings()

◆ sdram_programddr()

◆ sdram_programdqdqs()

static void sdram_programdqdqs ( struct sysinfo s)
static

◆ sdram_rcomp()

◆ sdram_rcompupdate()

static void sdram_rcompupdate ( struct sysinfo s)
static

Definition at line 1608 of file raminit.c.

References COMPCTRL1, hpet_udelay(), mchbar_clrbits8, mchbar_read32(), mchbar_read8(), mchbar_setbits8, mchbar_write32(), RCMEASBUFXOVR, sdram_checkrcompoverride(), XCOMP, and XCOMPDFCTRL.

Referenced by sdram_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_rcven()

static void sdram_rcven ( struct sysinfo s)
static

Definition at line 1877 of file raminit.c.

References C0COARSEDLY0, C0MISCCTLy, C0RCVMISCCTL1, C0RCVMISCCTL2, C0RSTCTL, C0RXRCVyDLL, C0STATRDCTRL, CMNDQFIFORST, mchbar_clrbits8, mchbar_clrsetbits16(), mchbar_clrsetbits32(), mchbar_clrsetbits8(), mchbar_read16(), mchbar_setbits8, offset, PRINTK_DEBUG, rcvenclock(), s, and sampledqs().

Referenced by sdram_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_read_spds()

static void sdram_read_spds ( struct sysinfo s)
static

Definition at line 256 of file raminit.c.

References DDR2, decode_spd(), die(), find_ramconfig(), FOR_EACH_DIMM, FOR_EACH_POPULATED_CHANNEL, FOR_EACH_POPULATED_DIMM, hexdump(), PRINTK_DEBUG, and s.

Referenced by sdram_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_timings()

◆ sdram_zqcl()

static void sdram_zqcl ( struct sysinfo s)
static

Definition at line 1649 of file raminit.c.

References BOOT_PATH_RESUME, C0CKECTRL, C0JEDEC, C0REFRCTRL2, mchbar_clrbits8, mchbar_clrsetbits32(), mchbar_clrsetbits8(), mchbar_setbits32, NORMAL_OP_CMD, and s.

Referenced by sdram_initialize(), and sdram_misc().

Here is the call graph for this function:
Here is the caller graph for this function: