From 9891b4a28b929b82d4121e2d31652af4bdd118ea Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 18 May 2016 13:31:05 -0500 Subject: [PATCH] sio/winbond: Expose enter/exit configuration state functions Certain mainboards, e.g. the ASUS KGPE-D16/KCMA-D8, require board-specific configuration changes to the SuperIO. Expose the functions needed to enter and exit configuration mode on Winbond devices. Change-Id: Ic86651872ecafcfe1398201be2b0768bbe460975 Signed-off-by: Timothy Pearson Reviewed-on: https://review.coreboot.org/14891 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth Tested-by: Raptor Engineering Automated Test Stand Reviewed-by: Paul Menzel --- src/superio/winbond/common/early_serial.c | 4 ++-- src/superio/winbond/common/winbond.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/superio/winbond/common/early_serial.c b/src/superio/winbond/common/early_serial.c index 7bd1707f95..6482a94838 100644 --- a/src/superio/winbond/common/early_serial.c +++ b/src/superio/winbond/common/early_serial.c @@ -42,7 +42,7 @@ #define WINBOND_EXIT_KEY 0xAA /* Enable configuration: pass entry key '0x87' into index port dev. */ -static void pnp_enter_conf_state(pnp_devfn_t dev) +void pnp_enter_conf_state(pnp_devfn_t dev) { u16 port = dev >> 8; outb(WINBOND_ENTRY_KEY, port); @@ -50,7 +50,7 @@ static void pnp_enter_conf_state(pnp_devfn_t dev) } /* Disable configuration: pass exit key '0xAA' into index port dev. */ -static void pnp_exit_conf_state(pnp_devfn_t dev) +void pnp_exit_conf_state(pnp_devfn_t dev) { u16 port = dev >> 8; outb(WINBOND_EXIT_KEY, port); diff --git a/src/superio/winbond/common/winbond.h b/src/superio/winbond/common/winbond.h index ad5e4510f9..1f7e7b1794 100644 --- a/src/superio/winbond/common/winbond.h +++ b/src/superio/winbond/common/winbond.h @@ -22,4 +22,7 @@ void winbond_enable_serial(pnp_devfn_t dev, u16 iobase); +void pnp_enter_conf_state(pnp_devfn_t dev); +void pnp_exit_conf_state(pnp_devfn_t dev); + #endif /* SUPERIO_WINBOND_COMMON_ROMSTAGE_H */