Matt DeVillier (matt.devillier(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17718
-gerrit
commit 6632abf3283e3782f26dd14e92e499e272551fbd
Author: Matt DeVillier <matt.devillier(a)gmail.com>
Date: Wed Nov 16 23:37:43 2016 -0600
soc/broadwell: set EM4/EM5 registers based on cdclk
The EM4/EM5 registers in the mini-HD audio device must be set based
on the GPU cdclk value in order for HDMI audio to function properly.
Add variables to save the correct values when initializing the GPU,
and accessor functions to retrieve them in order to set the registers
when initializing the mini-HD audio device.
Change-Id: Icce7d5981f0b2ccb09d3861b28b843a260c8aeba
Signed-off-by: Matt DeVillier <matt.devillier(a)gmail.com>
---
src/soc/intel/broadwell/igd.c | 21 +++++++++++++++++++++
src/soc/intel/broadwell/include/soc/igd.h | 20 ++++++++++++++++++++
src/soc/intel/broadwell/minihd.c | 5 +++++
3 files changed, 46 insertions(+)
diff --git a/src/soc/intel/broadwell/igd.c b/src/soc/intel/broadwell/igd.c
index ccb1e93..c1cfdd8 100644
--- a/src/soc/intel/broadwell/igd.c
+++ b/src/soc/intel/broadwell/igd.c
@@ -31,6 +31,7 @@
#include <soc/systemagent.h>
#include <soc/intel/broadwell/chip.h>
#include <vboot/vbnv.h>
+#include <soc/igd.h>
#define GT_RETRY 1000
#define GT_CDCLK_337 0
@@ -38,6 +39,12 @@
#define GT_CDCLK_540 2
#define GT_CDCLK_675 3
+static u32 reg_em4;
+static u32 reg_em5;
+
+u32 igd_get_reg_em4(void) { return reg_em4; }
+u32 igd_get_reg_em5(void) { return reg_em5; }
+
struct reg_script haswell_early_init_script[] = {
/* Enable Force Wake */
REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa180, 0x00000020),
@@ -364,14 +371,20 @@ static void igd_cdclk_init_haswell(struct device *dev)
case GT_CDCLK_337:
dpdiv = 169;
lpcll = (1 << 26);
+ reg_em4 = 16;
+ reg_em5 = 225;
break;
case GT_CDCLK_450:
dpdiv = 225;
lpcll = 0;
+ reg_em4 = 4;
+ reg_em5 = 75;
break;
case GT_CDCLK_540:
dpdiv = 270;
lpcll = (1 << 26);
+ reg_em4 = 4;
+ reg_em5 = 90;
break;
default:
return;
@@ -432,24 +445,32 @@ static void igd_cdclk_init_broadwell(struct device *dev)
lpcll = (1 << 27);
pwctl = 2;
dpdiv = 169;
+ reg_em4 = 16;
+ reg_em5 = 225;
break;
case GT_CDCLK_450:
cdset = 449;
lpcll = 0;
pwctl = 0;
dpdiv = 225;
+ reg_em4 = 4;
+ reg_em5 = 75;
break;
case GT_CDCLK_540:
cdset = 539;
lpcll = (1 << 26);
pwctl = 1;
dpdiv = 270;
+ reg_em4 = 4;
+ reg_em5 = 90;
break;
case GT_CDCLK_675:
cdset = 674;
lpcll = (1 << 26) | (1 << 27);
pwctl = 3;
dpdiv = 338;
+ reg_em4 = 8;
+ reg_em5 = 225;
default:
return;
}
diff --git a/src/soc/intel/broadwell/include/soc/igd.h b/src/soc/intel/broadwell/include/soc/igd.h
new file mode 100644
index 0000000..e7d3777
--- /dev/null
+++ b/src/soc/intel/broadwell/include/soc/igd.h
@@ -0,0 +1,20 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef SOC_INTEL_BROADWELL_GMA_H
+#define SOC_INTEL_BROADWELL_GMA_H
+
+u32 igd_get_reg_em4(void);
+u32 igd_get_reg_em5(void);
+
+#endif /* SOC_INTEL_BROADWELL_GMA_H */
\ No newline at end of file
diff --git a/src/soc/intel/broadwell/minihd.c b/src/soc/intel/broadwell/minihd.c
index 5014b08..a9fc3d6 100644
--- a/src/soc/intel/broadwell/minihd.c
+++ b/src/soc/intel/broadwell/minihd.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include <soc/intel/common/hda_verb.h>
#include <soc/ramstage.h>
+#include <soc/igd.h>
static const u32 minihd_verb_table[] = {
/* coreboot specific header */
@@ -101,6 +102,10 @@ static void minihd_init(struct device *dev)
minihd_verb_table);
}
}
+
+ /* Set EM4/EM5 registers */
+ write32(base + 0x0100c, igd_get_reg_em4());
+ write32(base + 0x01010, igd_get_reg_em5());
}
static struct device_operations minihd_ops = {
the following patch was just integrated into master:
commit 56c848cdc9cd0d8d022c3b828c200cfa51affe56
Author: Furquan Shaikh <furquan(a)chromium.org>
Date: Wed Dec 7 07:35:01 2016 -0800
soc/mediatek/mt8173: Do not initialize static variables to 0
Change-Id: Ibf0bd772bfdb3bbf6482a0ec9ff90a5c0a8945d2
Signed-off-by: Furquan Shaikh <furquan(a)chromium.org>
Reviewed-on: https://review.coreboot.org/17765
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
See https://review.coreboot.org/17765 for details.
-gerrit
Matt DeVillier (matt.devillier(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17718
-gerrit
commit d731394d6363a7d88265778269997890b97fa955
Author: Matt DeVillier <matt.devillier(a)gmail.com>
Date: Wed Nov 16 23:37:43 2016 -0600
soc/broadwell: set EM4/EM5 registers based on cdclk
The EM4/EM5 registers in the mini-HD audio device must be set based
on the GPU cdclk value in order for HDMI audio to function properly.
Add variables to save the correct values when initializing the GPU,
and accessor functions to retrieve them in order to set the registers
when initializing the mini-HD device.
Also fix a GPU-type check which meant to cap ULX GPUs cdclk value but
incorrectly checked for ULT instead.
Change-Id: Icce7d5981f0b2ccb09d3861b28b843a260c8aeba
Signed-off-by: Matt DeVillier <matt.devillier(a)gmail.com>
---
src/soc/intel/broadwell/igd.c | 21 +++++++++++++++++++++
src/soc/intel/broadwell/include/soc/igd.h | 22 ++++++++++++++++++++++
src/soc/intel/broadwell/minihd.c | 7 +++++++
3 files changed, 50 insertions(+)
diff --git a/src/soc/intel/broadwell/igd.c b/src/soc/intel/broadwell/igd.c
index ccb1e93..c1cfdd8 100644
--- a/src/soc/intel/broadwell/igd.c
+++ b/src/soc/intel/broadwell/igd.c
@@ -31,6 +31,7 @@
#include <soc/systemagent.h>
#include <soc/intel/broadwell/chip.h>
#include <vboot/vbnv.h>
+#include <soc/igd.h>
#define GT_RETRY 1000
#define GT_CDCLK_337 0
@@ -38,6 +39,12 @@
#define GT_CDCLK_540 2
#define GT_CDCLK_675 3
+static u32 reg_em4;
+static u32 reg_em5;
+
+u32 igd_get_reg_em4(void) { return reg_em4; }
+u32 igd_get_reg_em5(void) { return reg_em5; }
+
struct reg_script haswell_early_init_script[] = {
/* Enable Force Wake */
REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa180, 0x00000020),
@@ -364,14 +371,20 @@ static void igd_cdclk_init_haswell(struct device *dev)
case GT_CDCLK_337:
dpdiv = 169;
lpcll = (1 << 26);
+ reg_em4 = 16;
+ reg_em5 = 225;
break;
case GT_CDCLK_450:
dpdiv = 225;
lpcll = 0;
+ reg_em4 = 4;
+ reg_em5 = 75;
break;
case GT_CDCLK_540:
dpdiv = 270;
lpcll = (1 << 26);
+ reg_em4 = 4;
+ reg_em5 = 90;
break;
default:
return;
@@ -432,24 +445,32 @@ static void igd_cdclk_init_broadwell(struct device *dev)
lpcll = (1 << 27);
pwctl = 2;
dpdiv = 169;
+ reg_em4 = 16;
+ reg_em5 = 225;
break;
case GT_CDCLK_450:
cdset = 449;
lpcll = 0;
pwctl = 0;
dpdiv = 225;
+ reg_em4 = 4;
+ reg_em5 = 75;
break;
case GT_CDCLK_540:
cdset = 539;
lpcll = (1 << 26);
pwctl = 1;
dpdiv = 270;
+ reg_em4 = 4;
+ reg_em5 = 90;
break;
case GT_CDCLK_675:
cdset = 674;
lpcll = (1 << 26) | (1 << 27);
pwctl = 3;
dpdiv = 338;
+ reg_em4 = 8;
+ reg_em5 = 225;
default:
return;
}
diff --git a/src/soc/intel/broadwell/include/soc/igd.h b/src/soc/intel/broadwell/include/soc/igd.h
new file mode 100644
index 0000000..a0db5ef
--- /dev/null
+++ b/src/soc/intel/broadwell/include/soc/igd.h
@@ -0,0 +1,22 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Chromium OS Authors
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef SOC_INTEL_BROADWELL_GMA_H
+#define SOC_INTEL_BROADWELL_GMA_H
+
+u32 igd_get_reg_em4(void);
+u32 igd_get_reg_em5(void);
+
+#endif /* SOC_INTEL_BROADWELL_GMA_H */
\ No newline at end of file
diff --git a/src/soc/intel/broadwell/minihd.c b/src/soc/intel/broadwell/minihd.c
index 5014b08..a7b1750 100644
--- a/src/soc/intel/broadwell/minihd.c
+++ b/src/soc/intel/broadwell/minihd.c
@@ -25,6 +25,8 @@
#include <stdlib.h>
#include <soc/intel/common/hda_verb.h>
#include <soc/ramstage.h>
+#include <soc/cpu.h>
+#include <soc/igd.h>
static const u32 minihd_verb_table[] = {
/* coreboot specific header */
@@ -101,6 +103,11 @@ static void minihd_init(struct device *dev)
minihd_verb_table);
}
}
+
+ /* Set EM4/EM5 registers */
+ write32(base + 0x0100c, igd_get_reg_em4());
+ write32(base + 0x01010, igd_get_reg_em5());
+
}
static struct device_operations minihd_ops = {
Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17747
-gerrit
commit 5cc55a161b3cd227af03e6a0d70fa6a768879456
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Wed Dec 7 14:32:18 2016 +0200
intel/fsp_rangeley: Fix use of __SIMPLE_DEVICE__
Required fix to have rules.h as default include.
Change-Id: I6ce2d4e13de5139a84c709b5836ecd41c0abc836
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/northbridge/intel/fsp_rangeley/port_access.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/northbridge/intel/fsp_rangeley/port_access.c b/src/northbridge/intel/fsp_rangeley/port_access.c
index c4730a9..418cafc 100644
--- a/src/northbridge/intel/fsp_rangeley/port_access.c
+++ b/src/northbridge/intel/fsp_rangeley/port_access.c
@@ -14,9 +14,7 @@
* GNU General Public License for more details.
*/
-#ifndef __PRE_RAM__
-#define __PRE_RAM__ // Use simple device model for this file even in ramstage
-#endif
+#define __SIMPLE_DEVICE__
#include <stdint.h>
#include <arch/io.h>
the following patch was just integrated into master:
commit 48f82a9beb72db029b4ee55f6057783d0013a349
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Fri Dec 2 16:02:30 2016 +0200
AMD fam10 binaryPI: Remove invalid PCI ops on CPU domain
Device is of type CPU_CLUSTER, while pci_dev_set_resources()
expects PCI_DOMAIN.
Change-Id: Ib1add47d71071abb6e9c28e3a85dd0b671741b71
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: https://review.coreboot.org/17697
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
See https://review.coreboot.org/17697 for details.
-gerrit