Nico Huber (nico.h(a)gmx.de) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17612
-gerrit
commit e4faf41486773533cba47447d0db511748a8df04
Author: Nico Huber <nico.h(a)gmx.de>
Date: Sat Nov 26 02:03:25 2016 +0100
nb/intel/x4x/raminit: Fix DIMM_IN_CHANNEL calculation
Fix-up for 696abfc
nb/intel/x4x: Fix and deflate `dimm_config` in raminit
It didn't fix the channel-number shifting issue as intended.
The channel index is either 0 or 1. DIMMs are counted from 0
to 3 where 0..1 covers channel 0, and 2..3 covers channel 1.
Since we have two DIMMs per channel, we have to multiply the
channel index by 2 (or shift it left by 1) to get the index
of the first DIMM in the channel. Finally, to get the offset
of a DIMM in the channel we take its index modulo 2 (again,
the number of DIMMs per channel).
Change-Id: I2784b0cb655bfe823bf5fa48b722623dfca1ddc3
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
src/northbridge/intel/x4x/raminit.c | 3 ++-
src/northbridge/intel/x4x/x4x.h | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/northbridge/intel/x4x/raminit.c b/src/northbridge/intel/x4x/raminit.c
index 0867c31..122cab5 100644
--- a/src/northbridge/intel/x4x/raminit.c
+++ b/src/northbridge/intel/x4x/raminit.c
@@ -153,7 +153,8 @@ static void sdram_read_spds(struct sysinfo *s)
else
die("Dual-rank x16 not supported\n");
}
- s->dimm_config[chan] |= dimm_config << (i - chan) * 2;
+ s->dimm_config[chan] |=
+ dimm_config << (i % DIMMS_PER_CHANNEL) * 2;
}
printk(BIOS_DEBUG, " Config[CH%d] : %d\n", chan, s->dimm_config[chan]);
}
diff --git a/src/northbridge/intel/x4x/x4x.h b/src/northbridge/intel/x4x/x4x.h
index b349369..e4eb8dd 100644
--- a/src/northbridge/intel/x4x/x4x.h
+++ b/src/northbridge/intel/x4x/x4x.h
@@ -144,6 +144,7 @@
#define TOTAL_CHANNELS 2
#define TOTAL_DIMMS 4
+#define DIMMS_PER_CHANNEL (TOTAL_DIMMS / TOTAL_CHANNELS)
#define RAW_CARD_UNPOPULATED 0xff
#define DIMM_IS_POPULATED(dimms, idx) (dimms[idx].card_type != RAW_CARD_UNPOPULATED)
@@ -162,7 +163,7 @@
#define FOR_EACH_POPULATED_DIMM(dimms, idx) \
FOR_EACH_DIMM(idx) IF_DIMM_POPULATED(dimms, idx)
#define FOR_EACH_DIMM_IN_CHANNEL(ch, idx) \
- for (idx = (ch); idx < (ch) + 2; ++idx)
+ for (idx = (ch) << 1; idx < ((ch) << 1) + DIMMS_PER_CHANNEL; ++idx)
#define FOR_EACH_POPULATED_DIMM_IN_CHANNEL(dimms, ch, idx) \
FOR_EACH_DIMM_IN_CHANNEL(ch, idx) IF_DIMM_POPULATED(dimms, idx)
#define CHANNEL_IS_POPULATED(dimms, idx) ((dimms[idx<<1].card_type != RAW_CARD_UNPOPULATED) || (dimms[(idx<<1) + 1].card_type != RAW_CARD_UNPOPULATED))
Arthur Heymans (arthur(a)aheymans.xyz) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17597
-gerrit
commit 9966815b14269e03f8ab5a2a02720bc1fd0bdc07
Author: Arthur Heymans <arthur(a)aheymans.xyz>
Date: Thu Nov 24 13:23:05 2016 +0100
nb/gm45/gma.c: Compute BLC_PWM_CTL value from PWM frequency
This allows to set the backlight PWM frequency and the
duty cycle in the devicetree instead of using a plain BLC_PWM_CTL
value.
The previous default PWM frequency was 1006Hz but is now 1000Hz for
simplicity.
1000Hz is a good default since it typically works well on LED backlit
displays. A LED backlit display with a too slow PWM causes highly
annoying flicker, assuming the PWM directly drives the backlight.
CCFL displays want a lower pwm frequency in the 50-200Hz range.
Driving a CCFL panel with a too high PWM frequency causes the IC
to misbehave: unevenly lit backlight and/or high frequency tone.
Since driving a LED backlit display too slow is worse than driving a
CCFL backlit display too fast, a fast default is kept.
Change-Id: I4d9a555ac7ea5605712c1fcda994a6fcabf9acf3
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
src/northbridge/intel/gm45/chip.h | 2 ++
src/northbridge/intel/gm45/gma.c | 35 ++++++++++++++++++++++++++++++++---
2 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/src/northbridge/intel/gm45/chip.h b/src/northbridge/intel/gm45/chip.h
index 836d6bb..2307d53 100644
--- a/src/northbridge/intel/gm45/chip.h
+++ b/src/northbridge/intel/gm45/chip.h
@@ -26,6 +26,8 @@ struct northbridge_intel_gm45_config {
u16 gpu_panel_power_backlight_off_delay; /* Tx time sequence */
u8 gpu_panel_power_cycle_delay; /* T4 time sequence */
struct i915_gpu_controller_info gfx;
+ u32 pwm_freq;
+ u32 duty_cycle;
/*
* Maximum PCI mmio size in MiB.
diff --git a/src/northbridge/intel/gm45/gma.c b/src/northbridge/intel/gm45/gma.c
index 8938197..054bf05 100644
--- a/src/northbridge/intel/gm45/gma.c
+++ b/src/northbridge/intel/gm45/gma.c
@@ -611,6 +611,30 @@ static u8 vga_connected(u8 *mmio)
return 1;
}
+/*
+ * In principle the display core clock is
+ * (PP_DIVISOR[31:16] + 1) * 2 / 100 * MHz.
+ * Since PP_DIVISOR[31:16] is not touched it will be at its default value
+ * of 0x270f, hence the default display core clock is 200MHz.
+ * This is done in order to avoid potential overflows.
+ */
+
+#define DEFAULT_CORE_CLOCK 200000000
+
+static u32 freq_to_blc_pwm_ctl(u16 pwm_freq, u16 duty_perc)
+{
+ u32 blc_mod;
+
+ blc_mod = DEFAULT_CORE_CLOCK / (128 * pwm_freq);
+
+ if (duty_perc <= 100)
+ return (blc_mod << 16) | (blc_mod * duty_perc / 100);
+ else
+ return (blc_mod << 16) | blc_mod;
+}
+
+#define DEFAULT_PWM_FREQ 1000
+
static void gma_pm_init_post_vbios(struct device *const dev)
{
const struct northbridge_intel_gm45_config *const conf = dev->chip_info;
@@ -643,10 +667,15 @@ static void gma_pm_init_post_vbios(struct device *const dev)
/* Enable Backlight */
gtt_write(BLC_PWM_CTL2, (1 << 31));
- if (conf->gfx.backlight == 0)
- gtt_write(BLC_PWM_CTL, 0x06100610);
+ reg32 = 100;
+ if (conf->duty_cycle != 0)
+ reg32 = conf->duty_cycle;
+ if (conf->pwm_freq == 0)
+ gtt_write(BLC_PWM_CTL, freq_to_blc_pwm_ctl(DEFAULT_PWM_FREQ,
+ reg32));
else
- gtt_write(BLC_PWM_CTL, conf->gfx.backlight);
+ gtt_write(BLC_PWM_CTL, freq_to_blc_pwm_ctl(conf->pwm_freq,
+ reg32));
}
static void gma_func0_init(struct device *dev)
Arthur Heymans (arthur(a)aheymans.xyz) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17617
-gerrit
commit dbee353963357a6fb9914c9370ef6bac35de4141
Author: Arthur Heymans <arthur(a)aheymans.xyz>
Date: Sat Nov 26 16:46:56 2016 +0100
mb/ga-945gcm-s2l: Fix resume from suspend
High bios is still corrupted after suspend, i.e. it's
not possible to use cbmem, or nvramtool after suspend.
Change-Id: Iadf0a73b054470b652e1dc02557fb1715131f823
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
src/mainboard/gigabyte/ga-945gcm-s2l/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/mainboard/gigabyte/ga-945gcm-s2l/Kconfig b/src/mainboard/gigabyte/ga-945gcm-s2l/Kconfig
index b41becc..db16137 100644
--- a/src/mainboard/gigabyte/ga-945gcm-s2l/Kconfig
+++ b/src/mainboard/gigabyte/ga-945gcm-s2l/Kconfig
@@ -21,7 +21,6 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select CPU_INTEL_SOCKET_LGA775
select NORTHBRIDGE_INTEL_I945
select NORTHBRIDGE_INTEL_SUBTYPE_I945GC
- select CHECK_SLFRCS_ON_RESUME
select SOUTHBRIDGE_INTEL_I82801GX
select SUPERIO_ITE_IT8718F
select HAVE_OPTION_TABLE
Patrick Rudolph (siro(a)das-labor.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17615
-gerrit
commit 55b4f413da0c87d065255c074e45c5db8c81cf6d
Author: Patrick Rudolph <siro(a)das-labor.org>
Date: Sat Nov 26 10:11:14 2016 +0100
nb/intel/sandybridge/raminit: Always run quick_ram_check
quick_ram_check doesn't change contents of memory.
Run it in S3 resume, too.
Tested on Lenovo T420.
Change-Id: Icaf3650fadbb3bb87d8c780a9e79737c3cf7eb06
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
src/northbridge/intel/sandybridge/raminit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/northbridge/intel/sandybridge/raminit.c b/src/northbridge/intel/sandybridge/raminit.c
index 956234b..7560b7e 100644
--- a/src/northbridge/intel/sandybridge/raminit.c
+++ b/src/northbridge/intel/sandybridge/raminit.c
@@ -425,8 +425,8 @@ static void init_dram_ddr3(int mobile, int min_tck, int s3resume)
/* Zone config */
dram_zones(&ctrl, 0);
- if (!fast_boot)
- quick_ram_check();
+ /* Non intrusive, fast ram check */
+ quick_ram_check();
intel_early_me_status();
intel_early_me_init_done(ME_INIT_STATUS_SUCCESS);