Edward O'Callaghan (eocallaghan@alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5610
-gerrit
commit 31c7cd82cdadf07c16f0d7daf18476f9603c4c8d Author: Edward O'Callaghan eocallaghan@alterapraxis.com Date: Tue Apr 29 17:49:35 2014 +1000
mainboard/supermicro/h8qme_fam10: Provide local pnp_ sio func
Provide local superio pnp_ programming entry/exit functions as to avoid making superio implementation global symbols. Although this is not the proper/final solution, it does mitigate possibly symbol collisions and allow for continued superio refactorisation.
Change-Id: I5d3421ff9a12413da1e570c09d507206f3f09641 Signed-off-by: Edward O'Callaghan eocallaghan@alterapraxis.com --- src/mainboard/supermicro/h8qme_fam10/romstage.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/src/mainboard/supermicro/h8qme_fam10/romstage.c b/src/mainboard/supermicro/h8qme_fam10/romstage.c index cca464c..b8bac59 100644 --- a/src/mainboard/supermicro/h8qme_fam10/romstage.c +++ b/src/mainboard/supermicro/h8qme_fam10/romstage.c @@ -114,6 +114,20 @@ static const u8 spd_addr[] = { #define GPIO2_DEV PNP_DEV(0x2e, W83627HF_GPIO2) #define GPIO3_DEV PNP_DEV(0x2e, W83627HF_GPIO3)
+/* TODO: superio code should really not be in mainboard */ +static void pnp_enter_ext_func_mode(device_t dev) +{ + u16 port = dev >> 8; + outb(0x87, port); + outb(0x87, port); +} + +static void pnp_exit_ext_func_mode(device_t dev) +{ + u16 port = dev >> 8; + outb(0xaa, port); +} + static void write_GPIO(void) { pnp_enter_ext_func_mode(GPIO1_DEV);