Zheng Bao | 9db833b | 2009-12-28 09:59:44 +0000 | [diff] [blame] | 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 |
Uwe Hermann | 340fa93 | 2010-11-10 14:53:36 +0000 | [diff] [blame] | 6 | * Copyright (C) 2004 Tyan |
Zheng Bao | 9db833b | 2009-12-28 09:59:44 +0000 | [diff] [blame] | 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 Bao | 9db833b | 2009-12-28 09:59:44 +0000 | [diff] [blame] | 17 | */ |
| 18 | |
Edward O'Callaghan | beb0f26 | 2014-04-29 13:09:50 +1000 | [diff] [blame] | 19 | #ifndef SUPERIO_WINBOND_W83627HF_H |
| 20 | #define SUPERIO_WINBOND_W83627HF_H |
Stefan Reinauer | bb33fbe | 2010-05-18 16:24:07 +0000 | [diff] [blame] | 21 | |
Ronald G. Minnich | 142babf | 2004-03-12 16:54:31 +0000 | [diff] [blame] | 22 | #define W83627HF_FDC 0 /* Floppy */ |
Uwe Hermann | 340fa93 | 2010-11-10 14:53:36 +0000 | [diff] [blame] | 23 | #define W83627HF_PP 1 /* Parallel port */ |
Ronald G. Minnich | 142babf | 2004-03-12 16:54:31 +0000 | [diff] [blame] | 24 | #define W83627HF_SP1 2 /* Com1 */ |
| 25 | #define W83627HF_SP2 3 /* Com2 */ |
Uwe Hermann | 340fa93 | 2010-11-10 14:53:36 +0000 | [diff] [blame] | 26 | #define W83627HF_KBC 5 /* PS/2 keyboard & mouse */ |
Ronald G. Minnich | 142babf | 2004-03-12 16:54:31 +0000 | [diff] [blame] | 27 | #define W83627HF_CIR 6 |
| 28 | #define W83627HF_GAME_MIDI_GPIO1 7 |
| 29 | #define W83627HF_GPIO2 8 |
| 30 | #define W83627HF_GPIO3 9 |
| 31 | #define W83627HF_ACPI 10 |
Uwe Hermann | 340fa93 | 2010-11-10 14:53:36 +0000 | [diff] [blame] | 32 | #define W83627HF_HWM 11 /* Hardware monitor */ |
Yinghai Lu | 13f1c2a | 2005-07-08 02:49:49 +0000 | [diff] [blame] | 33 | |
Zheng Bao | 9db833b | 2009-12-28 09:59:44 +0000 | [diff] [blame] | 34 | /* #define W83627HF_GPIO_DEV PNP_DEV(0x2e, W83627HF_GPIO) */ |
| 35 | /* #define W83627HF_XBUS_DEV PNP_DEV(0x2e, W83627HF_XBUS) */ |
Yinghai Lu | 13f1c2a | 2005-07-08 02:49:49 +0000 | [diff] [blame] | 36 | |
| 37 | #define W83627HF_GPSEL 0xf0 |
| 38 | #define W83627HF_GPCFG1 0xf1 |
| 39 | #define W83627HF_GPEVR 0xf2 |
| 40 | #define W83627HF_GPCFG2 0xf3 |
| 41 | #define W83627HF_EXTCFG 0xf4 |
Myles Watson | cee9438 | 2008-10-02 19:21:30 +0000 | [diff] [blame] | 42 | #define W83627HF_IOEXT1A 0xf5 |
| 43 | #define W83627HF_IOEXT1B 0xf6 |
| 44 | #define W83627HF_IOEXT2A 0xf7 |
| 45 | #define W83627HF_IOEXT2B 0xf8 |
Yinghai Lu | 13f1c2a | 2005-07-08 02:49:49 +0000 | [diff] [blame] | 46 | |
| 47 | #define W83627HF_GPDO_0 0x00 |
| 48 | #define W83627HF_GPDI_0 0x01 |
| 49 | #define W83627HF_GPDO_1 0x02 |
| 50 | #define W83627HF_GPDI_1 0x03 |
| 51 | #define W83627HF_GPEVEN_1 0x04 |
| 52 | #define W83627HF_GPEVST_1 0x05 |
| 53 | #define W83627HF_GPDO_2 0x06 |
| 54 | #define W83627HF_GPDI_2 0x07 |
| 55 | #define W83627HF_GPDO_3 0x08 |
| 56 | #define W83627HF_GPDI_3 0x09 |
| 57 | #define W83627HF_GPDO_4 0x0a |
| 58 | #define W83627HF_GPDI_4 0x0b |
| 59 | #define W83627HF_GPEVEN_4 0x0c |
| 60 | #define W83627HF_GPEVST_4 0x0d |
| 61 | #define W83627HF_GPDO_5 0x0e |
| 62 | #define W83627HF_GPDI_5 0x0f |
| 63 | #define W83627HF_GPDO_6 0x10 |
Myles Watson | cee9438 | 2008-10-02 19:21:30 +0000 | [diff] [blame] | 64 | #define W83627HF_GPDO_7A 0x11 |
| 65 | #define W83627HF_GPDO_7B 0x12 |
| 66 | #define W83627HF_GPDO_7C 0x13 |
| 67 | #define W83627HF_GPDO_7D 0x14 |
| 68 | #define W83627HF_GPDI_7A 0x15 |
| 69 | #define W83627HF_GPDI_7B 0x16 |
| 70 | #define W83627HF_GPDI_7C 0x17 |
| 71 | #define W83627HF_GPDI_7D 0x18 |
Yinghai Lu | 13f1c2a | 2005-07-08 02:49:49 +0000 | [diff] [blame] | 72 | |
| 73 | #define W83627HF_XIOCNF 0xf0 |
Myles Watson | cee9438 | 2008-10-02 19:21:30 +0000 | [diff] [blame] | 74 | #define W83627HF_XIOBA1H 0xf1 |
| 75 | #define W83627HF_XIOBA1L 0xf2 |
Yinghai Lu | 13f1c2a | 2005-07-08 02:49:49 +0000 | [diff] [blame] | 76 | #define W83627HF_XIOSIZE1 0xf3 |
Myles Watson | cee9438 | 2008-10-02 19:21:30 +0000 | [diff] [blame] | 77 | #define W83627HF_XIOBA2H 0xf4 |
| 78 | #define W83627HF_XIOBA2L 0xf5 |
Yinghai Lu | 13f1c2a | 2005-07-08 02:49:49 +0000 | [diff] [blame] | 79 | #define W83627HF_XIOSIZE2 0xf6 |
| 80 | #define W83627HF_XMEMCNF1 0xf7 |
| 81 | #define W83627HF_XMEMCNF2 0xf8 |
Myles Watson | cee9438 | 2008-10-02 19:21:30 +0000 | [diff] [blame] | 82 | #define W83627HF_XMEMBAH 0xf9 |
| 83 | #define W83627HF_XMEMBAL 0xfa |
Yinghai Lu | 13f1c2a | 2005-07-08 02:49:49 +0000 | [diff] [blame] | 84 | #define W83627HF_XMEMSIZE 0xfb |
| 85 | #define W83627HF_XIRQMAP1 0xfc |
| 86 | #define W83627HF_XIRQMAP2 0xfd |
| 87 | #define W83627HF_XBIMM 0xfe |
| 88 | #define W83627HF_XBBSL 0xff |
| 89 | |
| 90 | #define W83627HF_XBCNF 0x00 |
| 91 | #define W83627HF_XZCNF0 0x01 |
| 92 | #define W83627HF_XZCNF1 0x02 |
| 93 | #define W83627HF_XIRQC0 0x04 |
| 94 | #define W83627HF_XIRQC1 0x05 |
| 95 | #define W83627HF_XIRQC2 0x06 |
| 96 | #define W83627HF_XIMA0 0x08 |
| 97 | #define W83627HF_XIMA1 0x09 |
| 98 | #define W83627HF_XIMA2 0x0a |
| 99 | #define W83627HF_XIMA3 0x0b |
| 100 | #define W83627HF_XIMD 0x0c |
| 101 | #define W83627HF_XZCNF2 0x0d |
| 102 | #define W83627HF_XZCNF3 0x0e |
| 103 | #define W83627HF_XZM0 0x0f |
| 104 | #define W83627HF_XZM1 0x10 |
| 105 | #define W83627HF_XZM2 0x11 |
| 106 | #define W83627HF_XZM3 0x12 |
| 107 | #define W83627HF_HAP0 0x13 |
| 108 | #define W83627HF_HAP1 0x14 |
| 109 | #define W83627HF_XSCNF 0x15 |
| 110 | #define W83627HF_XWBCNF 0x16 |
Stefan Reinauer | 95bf86b | 2010-04-30 20:30:47 +0000 | [diff] [blame] | 111 | |
Edward O'Callaghan | beb0f26 | 2014-04-29 13:09:50 +1000 | [diff] [blame] | 112 | #include <arch/io.h> |
Stefan Reinauer | 95bf86b | 2010-04-30 20:30:47 +0000 | [diff] [blame] | 113 | |
Edward O'Callaghan | 85836c2 | 2014-07-09 20:26:25 +1000 | [diff] [blame] | 114 | void w83627hf_set_clksel_48(pnp_devfn_t dev); |
| 115 | void w83627hf_enable_serial(pnp_devfn_t dev, u16 iobase); |
Edward O'Callaghan | beb0f26 | 2014-04-29 13:09:50 +1000 | [diff] [blame] | 116 | |
| 117 | #endif /* SUPERIO_WINBOND_W83627HF_H */ |