[coreboot-gerrit] Patch set updated for coreboot: 24ef03f superio/winbond/w83697hf: Depreciate romstage component

Edward O'Callaghan (eocallaghan@alterapraxis.com) gerrit at coreboot.org
Wed May 21 16:23:06 CEST 2014


Edward O'Callaghan (eocallaghan at alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5727

-gerrit

commit 24ef03fd7d0d2833dd4233e10c98e68baea9c306
Author: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Date:   Wed May 14 01:00:43 2014 +1000

    superio/winbond/w83697hf: Depreciate romstage component
    
    Depreciate the model specific early_serial.c romstage component for this
    Super I/O in favor of the recent generic winbond romstage framework.
    
    Change-Id: I529c9cd1d8d63db3035b4828b3c3fc43911f49ce
    Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
---
 src/mainboard/asus/k8v-x/romstage.c         |  5 +++--
 src/mainboard/bcom/winnetp680/romstage.c    |  6 ++++--
 src/mainboard/via/epia-m700/romstage.c      |  5 +++--
 src/superio/winbond/w83697hf/Makefile.inc   |  2 +-
 src/superio/winbond/w83697hf/early_serial.c |  4 +++-
 src/superio/winbond/w83697hf/w83697hf.h     | 12 +++++++++---
 6 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/src/mainboard/asus/k8v-x/romstage.c b/src/mainboard/asus/k8v-x/romstage.c
index 275a97e..4d6bd60 100644
--- a/src/mainboard/asus/k8v-x/romstage.c
+++ b/src/mainboard/asus/k8v-x/romstage.c
@@ -38,7 +38,8 @@ unsigned int get_sbdn(unsigned bus);
 #include "cpu/x86/lapic.h"
 #include "northbridge/amd/amdk8/reset_test.c"
 #include "northbridge/amd/amdk8/early_ht.c"
-#include "superio/winbond/w83697hf/early_serial.c"
+#include <superio/winbond/common/winbond.h>
+#include <superio/winbond/w83697hf/w83697hf.h>
 #include "southbridge/via/vt8237r/early_smbus.c"
 #include "northbridge/amd/amdk8/debug.c" /* After vt8237r/early_smbus.c! */
 #include "cpu/x86/bist.h"
@@ -108,7 +109,7 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
 	int needs_reset = 0;
 	struct sys_info *sysinfo = &sysinfo_car;
 
-	w83697hf_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
+	winbond_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
 	console_init();
 	enable_rom_decode();
 
diff --git a/src/mainboard/bcom/winnetp680/romstage.c b/src/mainboard/bcom/winnetp680/romstage.c
index a57f9f7..a252e00 100644
--- a/src/mainboard/bcom/winnetp680/romstage.c
+++ b/src/mainboard/bcom/winnetp680/romstage.c
@@ -33,7 +33,9 @@
 #include <lib.h>
 #include <spd.h>
 #include "southbridge/via/vt8237r/early_smbus.c"
-#include "superio/winbond/w83697hf/early_serial.c"
+#include <superio/winbond/common/winbond.h>
+#include <superio/winbond/w83697hf/w83697hf.h>
+
 #define SERIAL_DEV PNP_DEV(0x2e, W83697HF_SP1)
 
 static inline int spd_read_byte(unsigned device, unsigned address)
@@ -85,7 +87,7 @@ void main(unsigned long bist)
 	pci_write_config8(ctrl.d0f0, 0x4f, 0x01);
 
 	w83697hf_set_clksel_48(SERIAL_DEV);
-	w83697hf_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
+	winbond_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
 	console_init();
 
 	enable_smbus();
diff --git a/src/mainboard/via/epia-m700/romstage.c b/src/mainboard/via/epia-m700/romstage.c
index fda1bb0..ef0cef3 100644
--- a/src/mainboard/via/epia-m700/romstage.c
+++ b/src/mainboard/via/epia-m700/romstage.c
@@ -42,7 +42,8 @@
 #include "northbridge/via/vx800/raminit.h"
 #include "northbridge/via/vx800/raminit.c"
 #include "wakeup.h"
-#include "superio/winbond/w83697hf/early_serial.c"
+#include <superio/winbond/common/winbond.h>
+#include <superio/winbond/w83697hf/w83697hf.h>
 
 #define SERIAL_DEV PNP_DEV(0x2e, W83697HF_SP1)
 #define DUMMY_DEV PNP_DEV(0x2e, 0)
@@ -385,7 +386,7 @@ void main(unsigned long bist)
 	pci_write_config8(PCI_DEV(0, 0, 0), 0x4f, 0x01);
 	/* EmbedComInit(); */
 	w83697hf_set_clksel_48(DUMMY_DEV);
-	w83697hf_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
+	winbond_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
 	/* enable_vx800_serial(); */
 
 	/*
diff --git a/src/superio/winbond/w83697hf/Makefile.inc b/src/superio/winbond/w83697hf/Makefile.inc
index cf03273..73e5b46 100644
--- a/src/superio/winbond/w83697hf/Makefile.inc
+++ b/src/superio/winbond/w83697hf/Makefile.inc
@@ -18,5 +18,5 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 ##
 
+romstage-$(CONFIG_SUPERIO_WINBOND_W83697HF) += early_serial.c
 ramstage-$(CONFIG_SUPERIO_WINBOND_W83697HF) += superio.c
-
diff --git a/src/superio/winbond/w83697hf/early_serial.c b/src/superio/winbond/w83697hf/early_serial.c
index e435645..6c00b27 100644
--- a/src/superio/winbond/w83697hf/early_serial.c
+++ b/src/superio/winbond/w83697hf/early_serial.c
@@ -19,6 +19,7 @@
  */
 
 #include <arch/io.h>
+#include <device/pnp_def.h>
 #include "w83697hf.h"
 
 static void pnp_enter_ext_func_mode(device_t dev)
@@ -45,7 +46,8 @@ void w83697hf_set_clksel_48(device_t dev)
 	pnp_exit_ext_func_mode(dev);
 }
 
-static void w83697hf_enable_serial(device_t dev, u16 iobase)
+/* Depreciated, use winbond_enable_serial() */
+void w83697hf_enable_serial(device_t dev, u16 iobase)
 {
 	pnp_enter_ext_func_mode(dev);
 	pnp_set_logical_device(dev);
diff --git a/src/superio/winbond/w83697hf/w83697hf.h b/src/superio/winbond/w83697hf/w83697hf.h
index 7e353e2..f711786 100644
--- a/src/superio/winbond/w83697hf/w83697hf.h
+++ b/src/superio/winbond/w83697hf/w83697hf.h
@@ -18,8 +18,10 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifndef SUPERIO_WINBOND_W83697HF_W83697HF_H
-#define SUPERIO_WINBOND_W83697HF_W83697HF_H
+#ifndef SUPERIO_WINBOND_W83697HF_H
+#define SUPERIO_WINBOND_W83697HF_H
+
+#include <arch/io.h>
 
 #define W83697HF_FDC            0    /* Floppy */
 #define W83697HF_PP             1    /* Parallel port */
@@ -33,4 +35,8 @@
 #define W83697HF_HWM            11   /* Hardware monitor */
 
 void w83697hf_set_clksel_48(device_t);
-#endif
+
+/* Depreciated, use winbond_enable_serial() */
+void w83697hf_enable_serial(device_t dev, u16 iobase);
+
+#endif /* SUPERIO_WINBOND_W83697HF_H */



More information about the coreboot-gerrit mailing list