mb/amb/birman*/gpio: remove configuration for VDD_MEM_VID[0,1]
[coreboot2.git] / src / superio / nuvoton / wpcm450 / early_init.c
blobd3b7d7661c86444f3354eca72aa792b4db4d2fde
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <arch/io.h>
4 #include <device/pnp_ops.h>
5 #include <device/pnp_def.h>
6 #include "wpcm450.h"
8 static void wpcm450_pnp_set_logical_device(u8 dev, u16 port)
10 outb(0x7, port);
11 outb(dev, port+1);
14 static void wpcm450_pnp_set_enable(u8 dev, u16 port, u8 enable)
16 outb(0x30, port);
17 outb(enable, port+1);
20 static void wpcm450_pnp_set_iobase(u8 dev, u16 port, u8 index, u16 iobase)
22 outb(index, port);
23 outb((iobase>>8)&0xFF, port+1);
24 outb(index+1, port);
25 outb(iobase&0xFF, port+1);
28 void wpcm450_enable_dev(u8 dev, u16 port, u16 iobase)
30 wpcm450_pnp_set_logical_device(dev, port);
31 wpcm450_pnp_set_enable(dev, port, 0);
32 if (iobase)
33 wpcm450_pnp_set_iobase(dev, port, PNP_IDX_IO0, iobase);
34 wpcm450_pnp_set_enable(dev, port, 1);