Revision: linuxbios@linuxbios.org--devel/freebios--devel--2.0--patch-30
[coreboot.git] / src / superio / smsc / lpc47b397 / lpc47b397_early_gpio.c
1 static void lpc47b397_gpio_offset_out(unsigned iobase, unsigned offset, unsigned value)
2 {
3         outb(value,iobase+offset);
4 }
5 static unsigned lpc47b397_gpio_offset_in(unsigned iobase, unsigned offset)
6 {
7         return inb(iobase+offset);
8 }
9
10 //for GP60-GP64, GP66-GP85
11 #define LPC47B397_GPIO_CNTL_INDEX 0x70
12 #define LPC47B397_GPIO_CNTL_DATA 0x71
13
14 static void lpc47b397_gpio_index_out(unsigned iobase, unsigned index, unsigned value)
15 {
16         outb(index,iobase+LPC47B397_GPIO_CNTL_INDEX);
17         outb(value, iobase+LPC47B397_GPIO_CNTL_DATA);
18 }
19 static unsigned lpc47b397_gpio_index_in(unsigned iobase, unsigned index)
20 {
21         outb(index,iobase+LPC47B397_GPIO_CNTL_INDEX);
22         return inb(iobase+LPC47B397_GPIO_CNTL_DATA);
23 }
24
25