nb/intel/gm45: Export low-power and (SFF) options

Make the low-power and small form factor (SFF) options overridable
from romstage main. Also disable both options by default. That's ok
as there aren't yet any in-tree users of the GS45 chipset. As a nice
side-effect, this adds X200s support to the lenovo/x200 port.

Change-Id: I94373851262e6d424cf4885ceca7260c31bc9f61
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/12814
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Nico Huber
2015-12-30 00:17:27 +01:00
committed by Martin Roth
parent 0a207399ce
commit 5aaeb27de9
2 changed files with 9 additions and 8 deletions

View File

@@ -130,7 +130,6 @@ typedef struct {
int txt_enabled; int txt_enabled;
int cores; int cores;
gmch_gfx_t gfx_type; gmch_gfx_t gfx_type;
int gs45_low_power_mode; /* low power mode of GMCH_GS45 */
int max_ddr2_mhz; int max_ddr2_mhz;
int max_ddr3_mt; int max_ddr3_mt;
fsb_clock_t max_fsb; fsb_clock_t max_fsb;
@@ -140,10 +139,13 @@ typedef struct {
int enable_peg; int enable_peg;
u16 ggc; u16 ggc;
/* to be filled in romstage main: */
int spd_type; int spd_type;
timings_t selected_timings; timings_t selected_timings;
dimminfo_t dimms[2]; dimminfo_t dimms[2];
u8 spd_map[4]; u8 spd_map[4];
int gs45_low_power_mode; /* low power mode of GMCH_GS45 */
int sff; /* small form factor option (soldered down DIMM) */
} sysinfo_t; } sysinfo_t;
#define TOTAL_CHANNELS 2 #define TOTAL_CHANNELS 2
#define CHANNEL_IS_POPULATED(dimms, idx) (dimms[idx].card_type != 0) #define CHANNEL_IS_POPULATED(dimms, idx) (dimms[idx].card_type != 0)

View File

@@ -80,7 +80,6 @@ void get_gmch_info(sysinfo_t *sysinfo)
sysinfo->gfx_type = gmch_gfx_types[gfx_variant][render_freq]; sysinfo->gfx_type = gmch_gfx_types[gfx_variant][render_freq];
else else
sysinfo->gfx_type = GMCH_UNKNOWN; sysinfo->gfx_type = GMCH_UNKNOWN;
sysinfo->gs45_low_power_mode = 0;
switch (sysinfo->gfx_type) { switch (sysinfo->gfx_type) {
case GMCH_GM45: case GMCH_GM45:
printk(BIOS_SPEW, "GMCH: GM45\n"); printk(BIOS_SPEW, "GMCH: GM45\n");
@@ -104,8 +103,8 @@ void get_gmch_info(sysinfo_t *sysinfo)
printk(BIOS_SPEW, "GMCH: GS40\n"); printk(BIOS_SPEW, "GMCH: GS40\n");
break; break;
case GMCH_GS45: case GMCH_GS45:
printk(BIOS_SPEW, "GMCH: GS45, using low power mode by default\n"); printk(BIOS_SPEW, "GMCH: GS45, using %s-power mode\n",
sysinfo->gs45_low_power_mode = 1; sysinfo->gs45_low_power_mode ? "low" : "high");
break; break;
case GMCH_PM45: case GMCH_PM45:
printk(BIOS_SPEW, "GMCH: PM45\n"); printk(BIOS_SPEW, "GMCH: PM45\n");
@@ -1688,7 +1687,6 @@ void raminit(sysinfo_t *const sysinfo, const int s3resume)
{ {
const dimminfo_t *const dimms = sysinfo->dimms; const dimminfo_t *const dimms = sysinfo->dimms;
const timings_t *const timings = &sysinfo->selected_timings; const timings_t *const timings = &sysinfo->selected_timings;
const int sff = sysinfo->gfx_type == GMCH_GS45;
int ch; int ch;
u8 reg8; u8 reg8;
@@ -1730,7 +1728,7 @@ void raminit(sysinfo_t *const sysinfo, const int s3resume)
configure_dram_control_mode(timings, dimms); configure_dram_control_mode(timings, dimms);
/* Initialize RCOMP. */ /* Initialize RCOMP. */
rcomp_initialization(sysinfo->stepping, sff); rcomp_initialization(sysinfo->stepping, sysinfo->sff);
/* Power-up DRAM. */ /* Power-up DRAM. */
dram_powerup(s3resume); dram_powerup(s3resume);
@@ -1743,7 +1741,7 @@ void raminit(sysinfo_t *const sysinfo, const int s3resume)
MCHBAR32(CxDCLKDIS_MCHBAR(ch)) |= CxDCLKDIS_ENABLE; MCHBAR32(CxDCLKDIS_MCHBAR(ch)) |= CxDCLKDIS_ENABLE;
/* Enable On-Die Termination. */ /* Enable On-Die Termination. */
odt_setup(timings, sff); odt_setup(timings, sysinfo->sff);
/* Miscellaneous settings. */ /* Miscellaneous settings. */
misc_settings(timings, sysinfo->stepping); misc_settings(timings, sysinfo->stepping);
/* Program clock crossing registers. */ /* Program clock crossing registers. */
@@ -1751,7 +1749,8 @@ void raminit(sysinfo_t *const sysinfo, const int s3resume)
/* Program egress VC1 timings. */ /* Program egress VC1 timings. */
vc1_program_timings(timings->fsb_clock); vc1_program_timings(timings->fsb_clock);
/* Perform system-memory i/o initialization. */ /* Perform system-memory i/o initialization. */
memory_io_init(timings->mem_clock, dimms, sysinfo->stepping, sff); memory_io_init(timings->mem_clock, dimms,
sysinfo->stepping, sysinfo->sff);
/* Initialize memory map with dummy values of 128MB per rank with a /* Initialize memory map with dummy values of 128MB per rank with a
page size of 4KB. This makes the JEDEC initialization code easier. */ page size of 4KB. This makes the JEDEC initialization code easier. */