From dc2e1a589aa53a62f60136a4eb727fa770d2e02e Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Fri, 16 Mar 2001 12:44:20 +0000 Subject: Update ITE 8712 code. --- include/asm-mips/it8172/it8172.h | 62 +------------------------------- include/asm-mips/it8172/it8172_cir.h | 2 +- include/asm-mips/it8172/it8172_dbg.h | 2 +- include/asm-mips/it8172/it8172_int.h | 2 +- include/asm-mips/it8172/it8172_lpc.h | 2 +- include/asm-mips/it8172/it8172_pci.h | 2 +- include/linux/i2c-algo-ite.h | 69 ++++++++++++++++++++++++++++++++++++ include/linux/i2c-id.h | 4 +++ include/linux/ite_gpio.h | 66 ++++++++++++++++++++++++++++++++++ include/linux/miscdevice.h | 1 + include/linux/pci_ids.h | 13 +++++++ 11 files changed, 159 insertions(+), 66 deletions(-) create mode 100644 include/linux/i2c-algo-ite.h create mode 100644 include/linux/ite_gpio.h (limited to 'include') diff --git a/include/asm-mips/it8172/it8172.h b/include/asm-mips/it8172/it8172.h index 980d1d59d..43f98ec56 100644 --- a/include/asm-mips/it8172/it8172.h +++ b/include/asm-mips/it8172/it8172.h @@ -5,7 +5,7 @@ * * Copyright 2000 MontaVista Software Inc. * Author: MontaVista Software, Inc. - * ppopov@mvista.com or support@mvista.com + * ppopov@mvista.com or source@mvista.com * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -321,66 +321,6 @@ #define IT_AC_OPL3DW 0x6B #define IT_AC_BPDC 0x70 -// Audio : IT_AC_PCC bit definition & mask -#define PCC_SM 0x8000 -#define PCC_SM_BIT 15 -#define PCC_SM_STEREO 1 -#define PCC_SM_MONO 0 - -#define PCC_DF 0x4000 -#define PCC_DF_BIT 14 -#define PCC_DF_8 0 -#define PCC_DF_16 1 - -#define PCC_CF 0x3000 -#define PCC_CF_BIT 12 -#define PCC_CF_2 0 -#define PCC_CF_4 1 -#define PCC_CF_6 2 - -#define PCC_SR 0x0F00 -#define PCC_SR_BIT 8 -#define PCC_SR_5500 0 -#define PCC_SR_8000 1 -#define PCC_SR_9600 2 -#define PCC_SR_11025 3 -#define PCC_SR_16000 4 -#define PCC_SR_19200 5 -#define PCC_SR_22050 6 -#define PCC_SR_32000 7 -#define PCC_SR_38400 8 -#define PCC_SR_44100 9 -#define PCC_SR_48000 10 - -#define PCC_CSP 0x0080 -#define PCC_CSP_BIT 7 -#define PCC_CSP_STOP 0 -#define PCC_CSP_STOP_NOW 1 - -#define PCC_CP 0x0040 -#define PCC_CP_BIT 6 -#define PCC_CP_NORMAL 0 -#define PCC_CP_PAUSE 1 - -#define PCC_CA 0x0020 -#define PCC_CA_BIT 5 -#define PCC_CA_NO_START 0 -#define PCC_CA_START 1 - -#define PCC_CB2L 0x0004 -#define PCC_CB2L_BIT 2 -#define PCC_CB2L_NO 0 -#define PCC_CB2L_YES 1 - -#define PCC_CB1L 0x0002 -#define PCC_CB1L_BIT 1 -#define PCC_CB1L_NO 0 -#define PCC_CB1L_YES 1 - -#define PCC_DE 0x0001 -#define PCC_DE_BIT 0 -#define PCC_DE_NOT_EMPTY 0 -#define PCC_DE_EMPTY 1 // IT8172 Timer #define IT_TIMER_BASE 0x10800 diff --git a/include/asm-mips/it8172/it8172_cir.h b/include/asm-mips/it8172/it8172_cir.h index 3422d5265..2e66c6681 100644 --- a/include/asm-mips/it8172/it8172_cir.h +++ b/include/asm-mips/it8172/it8172_cir.h @@ -5,7 +5,7 @@ * * Copyright 2001 MontaVista Software Inc. * Author: MontaVista Software, Inc. - * ppopov@mvista.com or support@mvista.com + * ppopov@mvista.com or source@mvista.com * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/asm-mips/it8172/it8172_dbg.h b/include/asm-mips/it8172/it8172_dbg.h index 9af7ade9d..db4410e13 100644 --- a/include/asm-mips/it8172/it8172_dbg.h +++ b/include/asm-mips/it8172/it8172_dbg.h @@ -6,7 +6,7 @@ * * Copyright 2000 MontaVista Software Inc. * Author: MontaVista Software, Inc. - * ppopov@mvista.com or support@mvista.com + * ppopov@mvista.com or source@mvista.com * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/asm-mips/it8172/it8172_int.h b/include/asm-mips/it8172/it8172_int.h index f785c3885..e1ec107c3 100644 --- a/include/asm-mips/it8172/it8172_int.h +++ b/include/asm-mips/it8172/it8172_int.h @@ -5,7 +5,7 @@ * * Copyright 2000 MontaVista Software Inc. * Author: MontaVista Software, Inc. - * ppopov@mvista.com or support@mvista.com + * ppopov@mvista.com or source@mvista.com * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/asm-mips/it8172/it8172_lpc.h b/include/asm-mips/it8172/it8172_lpc.h index f3d407984..13b922aeb 100644 --- a/include/asm-mips/it8172/it8172_lpc.h +++ b/include/asm-mips/it8172/it8172_lpc.h @@ -5,7 +5,7 @@ * * Copyright 2000 MontaVista Software Inc. * Author: MontaVista Software, Inc. - * ppopov@mvista.com or support@mvista.com + * ppopov@mvista.com or source@mvista.com * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/asm-mips/it8172/it8172_pci.h b/include/asm-mips/it8172/it8172_pci.h index 042db2995..42c61f56e 100644 --- a/include/asm-mips/it8172/it8172_pci.h +++ b/include/asm-mips/it8172/it8172_pci.h @@ -5,7 +5,7 @@ * * Copyright 2000 MontaVista Software Inc. * Author: MontaVista Software, Inc. - * ppopov@mvista.com or support@mvista.com + * ppopov@mvista.com or source@mvista.com * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/linux/i2c-algo-ite.h b/include/linux/i2c-algo-ite.h new file mode 100644 index 000000000..26a8b8985 --- /dev/null +++ b/include/linux/i2c-algo-ite.h @@ -0,0 +1,69 @@ +/* ------------------------------------------------------------------------- */ +/* i2c-algo-ite.h i2c driver algorithms for ITE IIC adapters */ +/* ------------------------------------------------------------------------- */ +/* Copyright (C) 1995-97 Simon G. Vogl + 1998-99 Hans Berglund + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* ------------------------------------------------------------------------- */ + +/* With some changes from Kyösti Mälkki and even + Frodo Looijaard */ + +/* Modifications by MontaVista Software, 2001 + Changes made to support the ITE IIC peripheral */ + + +#ifndef I2C_ALGO_ITE_H +#define I2C_ALGO_ITE_H 1 + +#include + +/* Example of a sequential read request: + struct i2c_iic_msg s_msg; + + s_msg.addr=device_address; + s_msg.len=length; + s_msg.buf=buffer; + s_msg.waddr=word_address; + ioctl(file,I2C_SREAD, &s_msg); + */ +#define I2C_SREAD 0x780 /* SREAD ioctl command */ + +struct i2c_iic_msg { + __u16 addr; /* device address */ + __u16 waddr; /* word address */ + short len; /* msg length */ + char *buf; /* pointer to msg data */ +}; + +struct i2c_algo_iic_data { + void *data; /* private data for lolevel routines */ + void (*setiic) (void *data, int ctl, int val); + int (*getiic) (void *data, int ctl); + int (*getown) (void *data); + int (*getclock) (void *data); + void (*waitforpin) (void); + + /* local settings */ + int udelay; + int mdelay; + int timeout; +}; + +int i2c_iic_add_bus(struct i2c_adapter *); +int i2c_iic_del_bus(struct i2c_adapter *); + +#endif /* I2C_ALGO_ITE_H */ diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index b5793e818..b0f62dd14 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h @@ -109,6 +109,7 @@ #define I2C_ALGO_ISA 0x050000 /* lm_sensors ISA pseudo-adapter */ #define I2C_ALGO_SAA7146 0x060000 /* SAA 7146 video decoder bus */ #define I2C_ALGO_ACB 0x070000 /* ACCESS.bus algorithm */ +#define I2C_ALGO_IIC 0x080000 /* ITE IIC bus */ #define I2C_ALGO_EC 0x100000 /* ACPI embedded controller */ @@ -153,6 +154,9 @@ /* --- MPC8xx PowerPC adapters */ #define I2C_HW_MPC8XX_EPON 0x00 /* Eponymous MPC8xx I2C adapter */ +/* --- ITE based algorithms */ +#define I2C_HW_I_IIC 0x00 /* controller on the ITE */ + /* --- SMBus only adapters */ #define I2C_HW_SMBUS_PIIX4 0x00 #define I2C_HW_SMBUS_ALI15X3 0x01 diff --git a/include/linux/ite_gpio.h b/include/linux/ite_gpio.h new file mode 100644 index 000000000..b123a1429 --- /dev/null +++ b/include/linux/ite_gpio.h @@ -0,0 +1,66 @@ +/* + * FILE NAME ite_gpio.h + * + * BRIEF MODULE DESCRIPTION + * Generic gpio. + * + * Author: MontaVista Software, Inc. + * Hai-Pao Fan + * + * Copyright 2001 MontaVista Software Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __ITE_GPIO_H +#define __ITE_GPIO_H + +#include + +struct ite_gpio_ioctl_data { + __u32 device; + __u32 mask; + __u32 data; +}; + +#define ITE_GPIO_IOCTL_BASE 'Z' + +#define ITE_GPIO_IN _IOWR(ITE_GPIO_IOCTL_BASE, 0, struct ite_gpio_ioctl_data) +#define ITE_GPIO_OUT _IOW (ITE_GPIO_IOCTL_BASE, 1, struct ite_gpio_ioctl_data) +#define ITE_GPIO_INT_CTRL _IOW (ITE_GPIO_IOCTL_BASE, 2, struct ite_gpio_ioctl_data) +#define ITE_GPIO_IN_STATUS _IOW (ITE_GPIO_IOCTL_BASE, 3, struct ite_gpio_ioctl_data) +#define ITE_GPIO_OUT_STATUS _IOW (ITE_GPIO_IOCTL_BASE, 4, struct ite_gpio_ioctl_data) +#define ITE_GPIO_GEN_CTRL _IOW (ITE_GPIO_IOCTL_BASE, 5, struct ite_gpio_ioctl_data) +#define ITE_GPIO_INT_WAIT _IOW (ITE_GPIO_IOCTL_BASE, 6, struct ite_gpio_ioctl_data) + +#define ITE_GPIO_PORTA 0x01 +#define ITE_GPIO_PORTB 0x02 +#define ITE_GPIO_PORTC 0x04 + +extern int ite_gpio_in(__u32 device, __u32 mask, volatile __u32 *data); +extern int ite_gpio_out(__u32 device, __u32 mask, __u32 data); +extern int ite_gpio_int_ctrl(__u32 device, __u32 mask, __u32 data); +extern int ite_gpio_in_status(__u32 device, __u32 mask, volatile __u32 *data); +extern int ite_gpio_out_status(__u32 device, __u32 mask, __u32 data); +extern int ite_gpio_gen_ctrl(__u32 device, __u32 mask, __u32 data); +extern int ite_gpio_int_wait(__u32 device, __u32 mask, __u32 data); + +#endif diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index 3532658c6..34c8dcb04 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h @@ -21,6 +21,7 @@ #define NVRAM_MINOR 144 #define I2O_MINOR 166 #define MICROCODE_MINOR 184 +#define GPIO_MINOR 185 #define MISC_DYNAMIC_MINOR 255 #define SGI_GRAPHICS_MINOR 146 diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 664ec0d6b..9bac118e3 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -261,6 +261,9 @@ #define PCI_DEVICE_ID_IBM_TR_WAKE 0x003e #define PCI_DEVICE_ID_IBM_MPIC 0x0046 #define PCI_DEVICE_ID_IBM_3780IDSP 0x007d +#define PCI_DEVICE_ID_IBM_CPC700 0x00f9 +#define PCI_DEVICE_ID_IBM_CPC710_PCI64 0x00fc +#define PCI_DEVICE_ID_IBM_CPC710_PCI32 0x0105 #define PCI_DEVICE_ID_IBM_405GP 0x0156 #define PCI_DEVICE_ID_IBM_MPIC_2 0xffff @@ -462,6 +465,7 @@ #define PCI_DEVICE_ID_MOTOROLA_MPC106 0x0002 #define PCI_DEVICE_ID_MOTOROLA_RAVEN 0x4801 #define PCI_DEVICE_ID_MOTOROLA_FALCON 0x4802 +#define PCI_DEVICE_ID_MOTOROLA_HAWK 0x4803 #define PCI_DEVICE_ID_MOTOROLA_CPX8216 0x4806 #define PCI_VENDOR_ID_PROMISE 0x105a @@ -959,6 +963,9 @@ #define PCI_VENDOR_ID_GALILEO 0x11ab #define PCI_DEVICE_ID_GALILEO_GT64011 0x4146 +#define PCI_DEVICE_ID_GALILEO_GT64111 0x4146 +#define PCI_DEVICE_ID_GALILEO_GT96100 0x9652 +#define PCI_DEVICE_ID_GALILEO_GT96100A 0x9653 #define PCI_VENDOR_ID_LITEON 0x11ad #define PCI_DEVICE_ID_LITEON_LNE100TX 0x0002 @@ -1086,6 +1093,7 @@ #define PCI_VENDOR_ID_ITE 0x1283 #define PCI_DEVICE_ID_ITE_IT8172G 0x8172 +#define PCI_DEVICE_ID_ITE_IT8172G_AUDIO 0x0801 /* formerly Platform Tech */ #define PCI_VENDOR_ID_ESS_OLD 0x1285 @@ -1497,3 +1505,8 @@ #define PCI_DEVICE_ID_MICROGATE_USC 0x0010 #define PCI_DEVICE_ID_MICROGATE_SCC 0x0020 #define PCI_DEVICE_ID_MICROGATE_SCA 0x0030 + +#define PCI_VENDOR_ID_SIS 0x1039 +#define PCI_DEVICE_ID_SIS_300 0x0300 +#define PCI_DEVICE_ID_SIS_540 0x5300 +#define PCI_DEVICE_ID_SIS_630 0x6300 -- cgit v1.2.3