summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-03-16 12:44:20 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-03-16 12:44:20 +0000
commitdc2e1a589aa53a62f60136a4eb727fa770d2e02e (patch)
tree53d0723062766eb7a33421dc50a80e154901c133 /include/linux
parent83b63cbde17a215fad5303e85a4546e2d31c7613 (diff)
Update ITE 8712 code.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/i2c-algo-ite.h69
-rw-r--r--include/linux/i2c-id.h4
-rw-r--r--include/linux/ite_gpio.h66
-rw-r--r--include/linux/miscdevice.h1
-rw-r--r--include/linux/pci_ids.h13
5 files changed, 153 insertions, 0 deletions
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 <kmalkki@cc.hut.fi> and even
+ Frodo Looijaard <frodol@dds.nl> */
+
+/* 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 <linux/i2c.h>
+
+/* 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. <source@mvista.com>
+ * Hai-Pao Fan <haipao@mvista.com>
+ *
+ * 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 <linux/ioctl.h>
+
+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