C and other Super I/O cosmetic fixes.
[coreboot.git] / src / superio / smsc / lpc47b397 / lpc47b397_early_gpio.c
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2000 AG Electronics Ltd.
5  * Copyright (C) 2003-2004 Linux Networx
6  * Copyright (C) 2004 Tyan
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
21  */
22
23 static void lpc47b397_gpio_offset_out(u16 iobase, u16 offset, u8 value)
24 {
25         outb(value, iobase + offset);
26 }
27
28 static u8 lpc47b397_gpio_offset_in(u16 iobase, u16 offset)
29 {
30         return inb(iobase+offset);
31 }
32
33 #if 0
34 /* For GP60-GP64, GP66-GP85. */
35 #define LPC47B397_GPIO_CNTL_INDEX 0x70
36 #define LPC47B397_GPIO_CNTL_DATA 0x71
37
38 static void lpc47b397_gpio_index_out(u16 iobase, u8 index, u8 value)
39 {
40         outb(index, iobase + LPC47B397_GPIO_CNTL_INDEX);
41         outb(value, iobase + LPC47B397_GPIO_CNTL_DATA);
42 }
43
44 static u8 lpc47b397_gpio_index_in(u16 iobase, u8 index)
45 {
46         outb(index, iobase + LPC47B397_GPIO_CNTL_INDEX);
47         return inb(iobase + LPC47B397_GPIO_CNTL_DATA);
48 }
49 #endif