northbridge/intel/sandybridge: Enable PEG clock-gating on demand

Activate PEG clock-gating only if all PEG devices are disabled.
Fixes system hang when trying to access PEG registers.

Test system:
     * Intel Pentium CPU G2130
     * Gigabyte GA-B75M-D3H

Change-Id: I7d62fbb83c16741965639cea1a0e4978d4e3d6da
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-on: http://review.coreboot.org/11059
Tested-by: build bot (Jenkins)
This commit is contained in:
Patrick Rudolph
2015-07-28 08:01:02 +02:00
committed by Vladimir Serbinenko
parent a2bed346a1
commit 3660c0fc65
3 changed files with 48 additions and 15 deletions

View File

@@ -234,12 +234,6 @@ static void report_memory_config(void)
}
}
static void post_system_agent_init(void)
{
/* If PCIe init is skipped, set the PEG clock gating */
MCHBAR32(0x7010) = MCHBAR32(0x7010) | 0x01;
}
void read_spd(spd_raw_data * spd, u8 addr)
{
int j;
@@ -3888,7 +3882,6 @@ void init_dram_ddr3(spd_raw_data * spds, int mobile, int min_tck,
intel_early_me_init_done(ME_INIT_STATUS_SUCCESS);
intel_early_me_status();
post_system_agent_init();
report_memory_config();
cbmem_was_inited = !cbmem_recovery(s3resume);