Winbond W83627HF: Use existing functions instead of open-coding.
[coreboot.git] / src / mainboard / supermicro / h8dmr_fam10 / romstage.c
index 43d4ff7e72ba37609b13bffaf58b8a23fcde9ce6..966ae3b6948120889b9b9e30f00ee64c0ddbc107 100644 (file)
@@ -50,6 +50,7 @@
 #include "southbridge/nvidia/mcp55/mcp55_early_ctrl.c"
 
 #define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1)
+#define DUMMY_DEV PNP_DEV(0x2e, 0)
 
 static void activate_spd_rom(const struct mem_controller *ctrl) { }
 
@@ -125,10 +126,8 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
 
        post_code(0x32);
 
-       pnp_enter_ext_func_mode(SERIAL_DEV);
-       pnp_write_config(SERIAL_DEV, 0x24, 0x84 | (1 << 6));
-       w83627hf_enable_dev(SERIAL_DEV, CONFIG_TTYS0_BASE);
-       pnp_exit_ext_func_mode(SERIAL_DEV);
+       w83627hf_set_clksel_48(DUMMY_DEV);
+       w83627hf_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
 
        uart_init();
        console_init();