blob: 66a040cfff59fe082aa61a878fdf8e20451dd4b6 [file] [log] [blame]
Zheng Bao9db833b2009-12-28 09:59:44 +00001/*
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.
Zheng Bao9db833b2009-12-28 09:59:44 +000017 */
18
Uwe Hermanna69d9782010-11-15 19:35:14 +000019static void lpc47b397_gpio_offset_out(u16 iobase, u16 offset, u8 value)
arch import user (historical)98d0d302005-07-06 17:13:46 +000020{
Uwe Hermanna69d9782010-11-15 19:35:14 +000021 outb(value, iobase + offset);
arch import user (historical)98d0d302005-07-06 17:13:46 +000022}
Myles Watsoncee94382008-10-02 19:21:30 +000023
Uwe Hermanna69d9782010-11-15 19:35:14 +000024static u8 lpc47b397_gpio_offset_in(u16 iobase, u16 offset)
arch import user (historical)98d0d302005-07-06 17:13:46 +000025{
Myles Watsoncee94382008-10-02 19:21:30 +000026 return inb(iobase+offset);
arch import user (historical)98d0d302005-07-06 17:13:46 +000027}
28
Stefan Reinauerd4f53732010-04-09 14:46:51 +000029#if 0
Uwe Hermanna69d9782010-11-15 19:35:14 +000030/* For GP60-GP64, GP66-GP85. */
arch import user (historical)98d0d302005-07-06 17:13:46 +000031#define LPC47B397_GPIO_CNTL_INDEX 0x70
32#define LPC47B397_GPIO_CNTL_DATA 0x71
33
Uwe Hermanna69d9782010-11-15 19:35:14 +000034static void lpc47b397_gpio_index_out(u16 iobase, u8 index, u8 value)
arch import user (historical)98d0d302005-07-06 17:13:46 +000035{
Uwe Hermanna69d9782010-11-15 19:35:14 +000036 outb(index, iobase + LPC47B397_GPIO_CNTL_INDEX);
37 outb(value, iobase + LPC47B397_GPIO_CNTL_DATA);
arch import user (historical)98d0d302005-07-06 17:13:46 +000038}
Myles Watsoncee94382008-10-02 19:21:30 +000039
Uwe Hermanna69d9782010-11-15 19:35:14 +000040static u8 lpc47b397_gpio_index_in(u16 iobase, u8 index)
arch import user (historical)98d0d302005-07-06 17:13:46 +000041{
Uwe Hermanna69d9782010-11-15 19:35:14 +000042 outb(index, iobase + LPC47B397_GPIO_CNTL_INDEX);
43 return inb(iobase + LPC47B397_GPIO_CNTL_DATA);
arch import user (historical)98d0d302005-07-06 17:13:46 +000044}
Stefan Reinauerd4f53732010-04-09 14:46:51 +000045#endif