Keith Hui has uploaded this change for review.
superio/*: Standardise config state entry/exit prototype in pnp_ops.h
pnp_{entry,exit}_conf_state() is declared and implemented under each
super I/O with not that much variation. Place them to a central
location along with other pre-RAM pnp functions.
This provides a standard pre-RAM PNP API, with the eventual goal of
consolidating all implementations, with only one implementation
per actual known config state entry/exit sequence.
Remove the prototype from winbond/common. All code that use pre-RAM
pnp include pnp_ops.h and all basic functions will be brought in. The
correct implementation is selected at compile time via Makefile.inc.
Change-Id: If4e742edb17ca73c01ff7b552e00e18acc6779dd
Signed-off-by: Keith Hui <buurin@gmail.com>
---
M src/include/device/pnp_ops.h
M src/superio/fintek/common/fintek.h
M src/superio/winbond/common/winbond.h
3 files changed, 3 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/62/40962/1
diff --git a/src/include/device/pnp_ops.h b/src/include/device/pnp_ops.h
index 93a5dc8..f43cb33 100644
--- a/src/include/device/pnp_ops.h
+++ b/src/include/device/pnp_ops.h
@@ -10,6 +10,9 @@
#if ENV_PNP_SIMPLE_DEVICE
+void pnp_enter_conf_state(pnp_devfn_t dev);
+void pnp_exit_conf_state(pnp_devfn_t dev);
+
static __always_inline void pnp_write_config(
pnp_devfn_t dev, uint8_t reg, uint8_t value)
{
diff --git a/src/superio/fintek/common/fintek.h b/src/superio/fintek/common/fintek.h
index 81e8e67..915c148 100644
--- a/src/superio/fintek/common/fintek.h
+++ b/src/superio/fintek/common/fintek.h
@@ -9,7 +9,4 @@
void fintek_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_FINTEK_COMMON_PRE_RAM_H */
diff --git a/src/superio/winbond/common/winbond.h b/src/superio/winbond/common/winbond.h
index 58297e5..9816db0 100644
--- a/src/superio/winbond/common/winbond.h
+++ b/src/superio/winbond/common/winbond.h
@@ -11,7 +11,4 @@
void winbond_set_pinmux(pnp_devfn_t dev, uint8_t offset, uint8_t mask, uint8_t state);
void winbond_set_clksel_48(pnp_devfn_t dev);
-void pnp_enter_conf_state(pnp_devfn_t dev);
-void pnp_exit_conf_state(pnp_devfn_t dev);
-
#endif /* SUPERIO_WINBOND_COMMON_PRE_RAM_H */
To view, visit change 40962. To unsubscribe, or for help writing mail filters, visit settings.