[coreboot-gerrit] Change in coreboot[master]: amd/pi/hudson: Add SERIRQ setup

Marc Jones (Code Review) gerrit at coreboot.org
Mon Apr 10 23:03:43 CEST 2017


Marc Jones has uploaded a new change for review. ( https://review.coreboot.org/19234 )

Change subject: amd/pi/hudson: Add SERIRQ setup
......................................................................

amd/pi/hudson: Add SERIRQ setup

Enable SERIRQ in quiet or continuous mode based on KCONFIG.
Defaults to quite mode.

Change-Id: Ib40a84719fcc3a5d6b3000c3c0412f1bcf629609
Signed-off-by: Marc Jones <marcj303 at gmail.com>
---
M src/southbridge/amd/pi/hudson/Kconfig
M src/southbridge/amd/pi/hudson/lpc.c
2 files changed, 13 insertions(+), 0 deletions(-)


  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/19234/1

diff --git a/src/southbridge/amd/pi/hudson/Kconfig b/src/southbridge/amd/pi/hudson/Kconfig
index bb58722..83062b0 100644
--- a/src/southbridge/amd/pi/hudson/Kconfig
+++ b/src/southbridge/amd/pi/hudson/Kconfig
@@ -213,6 +213,12 @@
 	  option to manually attach the generated amdfw.rom at an
 	  offset of 0x20000 from the bottom of the coreboot ROM image.
 
+config SERIRQ_CONTINUOUS_MODE
+	bool
+	default n
+	help
+	  If you set this option to y, the serial IRQ machine will be
+	  operated in continuous mode. Otherwise it is in quiet mode.
 endif
 
 config HUDSON_UART
diff --git a/src/southbridge/amd/pi/hudson/lpc.c b/src/southbridge/amd/pi/hudson/lpc.c
index 1dacfd0..837263e 100644
--- a/src/southbridge/amd/pi/hudson/lpc.c
+++ b/src/southbridge/amd/pi/hudson/lpc.c
@@ -83,6 +83,13 @@
 
 	/* Initialize i8254 timers */
 	setup_i8254 ();
+
+	/* Setup SERIRQ, enable continuous mode */
+	byte = (BIT(4) | BIT(7));
+#if !IS_ENABLED(CONFIG_SERIRQ_CONTINUOUS_MODE)
+	byte |= BIT(6);
+#endif
+	pm_write8(PM_SERIRQ_CONF, byte);
 }
 
 static void hudson_lpc_read_resources(device_t dev)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib40a84719fcc3a5d6b3000c3c0412f1bcf629609
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Marc Jones <marc at marcjonesconsulting.com>



More information about the coreboot-gerrit mailing list