[coreboot-gerrit] Change in coreboot[master]: ec/lenovo/h8: Build h8 in romstage

Patrick Rudolph (Code Review) gerrit at coreboot.org
Wed May 17 19:11:36 CEST 2017


Patrick Rudolph has uploaded a new change for review. ( https://review.coreboot.org/19740 )

Change subject: ec/lenovo/h8: Build h8 in romstage
......................................................................

ec/lenovo/h8: Build h8 in romstage

Guard ramstage methods.
Build in romstage, too.

Change-Id: I76dcf1fd54386562b63695003cee2956b42557c5
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
M src/ec/lenovo/h8/Makefile.inc
M src/ec/lenovo/h8/h8.c
2 files changed, 21 insertions(+), 16 deletions(-)


  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/40/19740/1

diff --git a/src/ec/lenovo/h8/Makefile.inc b/src/ec/lenovo/h8/Makefile.inc
index da9cee1..d5965ca 100644
--- a/src/ec/lenovo/h8/Makefile.inc
+++ b/src/ec/lenovo/h8/Makefile.inc
@@ -1,5 +1,6 @@
 ifeq ($(CONFIG_EC_LENOVO_H8),y)
 
+romstage-y += h8.c
 ramstage-y += h8.c
 smm-y += smm.c
 
diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c
index 99cb035..ad32be6 100644
--- a/src/ec/lenovo/h8/h8.c
+++ b/src/ec/lenovo/h8/h8.c
@@ -28,28 +28,13 @@
 #include "h8.h"
 #include "chip.h"
 
+#ifndef __PRE_RAM__
 static void h8_bluetooth_enable(int on)
 {
 	if (on)
 		ec_set_bit(0x3a, 4);
 	else
 		ec_clr_bit(0x3a, 4);
-}
-
-void h8_trackpoint_enable(int on)
-{
-	ec_write(H8_TRACKPOINT_CTRL,
-		 on ? H8_TRACKPOINT_ON : H8_TRACKPOINT_OFF);
-
-}
-
-/* Controls radio-off pin in WLAN MiniPCIe slot.  */
-void h8_wlan_enable(int on)
-{
-	if (on)
-		ec_set_bit(0x3a, 5);
-	else
-		ec_clr_bit(0x3a, 5);
 }
 
 /* Controls radio-off pin in WWAN MiniPCIe slot.  */
@@ -119,6 +104,23 @@
 	printk(BIOS_INFO, "EC Firmware ID %s, Version %d.%d%d%c\n", ecfw,
 	       fwvh >> 4, fwvh & 0x0f, fwvl >> 4, 0x41 + (fwvl & 0xf));
 }
+#endif
+
+void h8_trackpoint_enable(int on)
+{
+	ec_write(H8_TRACKPOINT_CTRL,
+		 on ? H8_TRACKPOINT_ON : H8_TRACKPOINT_OFF);
+
+}
+
+/* Controls radio-off pin in WLAN MiniPCIe slot.  */
+void h8_wlan_enable(int on)
+{
+	if (on)
+		ec_set_bit(0x3a, 5);
+	else
+		ec_clr_bit(0x3a, 5);
+}
 
 void h8_set_audio_mute(int mute)
 {
@@ -181,6 +183,7 @@
 	ec_write(H8_SOUND_REG, 10);
 }
 
+#ifndef __PRE_RAM__
 u8 h8_build_id_and_function_spec_version(char *buf, u8 buf_len)
 {
 	u8 i, c;
@@ -346,3 +349,4 @@
 	CHIP_NAME("Lenovo H8 EC")
 	.enable_dev = h8_enable,
 };
+#endif

-- 
To view, visit https://review.coreboot.org/19740
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I76dcf1fd54386562b63695003cee2956b42557c5
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Patrick Rudolph <siro at das-labor.org>



More information about the coreboot-gerrit mailing list