Commit 2511765d authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents d0b8a5c0 7cd612a0
......@@ -42,6 +42,26 @@ config I2C_ALGOBIT
<file:Documentation/modules.txt>.
The module will be called i2c-algo-bit.
config I2C_PROSAVAGE
tristate "S3/VIA (Pro)Savage"
depends on I2C_ALGOBIT && PCI && EXPERIMENTAL
help
If you say yes to this option, support will be included for the
I2C bus and DDC bus of the S3VIA embedded Savage4 and ProSavage8
graphics processors.
chipsets supported:
S3/VIA KM266/VT8375 aka ProSavage8
S3/VIA KM133/VT8365 aka Savage4
This can also be built as a module which can be inserted and removed
while the kernel is running. If you want to compile it as a module,
say M here and read <file:Documentation/modules.txt>.
The module will be called i2c-prosavage.
You will also need the latest user-space utilties: you can find them
in the lm_sensors package, which you can download at
http://www.lm-sensors.nu
config I2C_PHILIPSPAR
tristate "Philips style parallel port adapter"
depends on I2C_ALGOBIT && PARPORT
......
......@@ -5,6 +5,7 @@
obj-$(CONFIG_I2C) += i2c-core.o
obj-$(CONFIG_I2C_CHARDEV) += i2c-dev.o
obj-$(CONFIG_I2C_ALGOBIT) += i2c-algo-bit.o
obj-$(CONFIG_I2C_PROSAVAGE) += i2c-prosavage.o
obj-$(CONFIG_I2C_PHILIPSPAR) += i2c-philips-par.o
obj-$(CONFIG_I2C_ELV) += i2c-elv.o
obj-$(CONFIG_I2C_VELLEMAN) += i2c-velleman.o
......
......@@ -4,6 +4,22 @@
menu "I2C Hardware Sensors Mainboard support"
config I2C_ALI1535
tristate " ALI 1535"
depends on I2C && PCI && EXPERIMENTAL
help
If you say yes to this option, support will be included for the SMB
Host controller on Acer Labs Inc. (ALI) M1535 South Bridges. The SMB
controller is part of the 7101 device, which is an ACPI-compliant
Power Management Unit (PMU).
This can also be built as a module. If so, the module will be
called i2c-ali1535.
You will also need the latest user-space utilties: you can find them
in the lm_sensors package, which you can download at
http://www.lm-sensors.nu
config I2C_ALI15X3
tristate " ALI 15x3"
depends on I2C && PCI && EXPERIMENTAL
......
......@@ -2,6 +2,7 @@
# Makefile for the kernel hardware sensors bus drivers.
#
obj-$(CONFIG_I2C_ALI1535) += i2c-ali1535.o
obj-$(CONFIG_I2C_ALI15X3) += i2c-ali15x3.o
obj-$(CONFIG_I2C_AMD756) += i2c-amd756.o
obj-$(CONFIG_I2C_AMD8111) += i2c-amd8111.o
......
This diff is collapsed.
/*
* kernel/busses/i2c-prosavage.c
*
* i2c bus driver for S3/VIA 8365/8375 graphics processor.
* Copyright (c) 2003 Henk Vergonet <henk@god.dyndns.org>
* Based on code written by:
* Frodo Looijaard <frodol@dds.nl>,
* Philip Edelbrock <phil@netroedge.com>,
* Ralph Metzler <rjkm@thp.uni-koeln.de>, and
* Mark D. Studebaker <mdsxyz123@yahoo.com>
* Simon Vogl
* and others
*
* Please read the lm_sensors documentation for details on use.
*
* 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.
*
*/
/* 18-05-2003 HVE - created
* 14-06-2003 HVE - adapted for lm_sensors2
* 17-06-2003 HVE - linux 2.5.xx compatible
* 18-06-2003 HVE - codingstyle
* 21-06-2003 HVE - compatibility lm_sensors2 and linux 2.5.xx
* codingstyle, mmio enabled
*
* This driver interfaces to the I2C bus of the VIA north bridge embedded
* ProSavage4/8 devices. Usefull for gaining access to the TV Encoder chips.
*
* Graphics cores:
* S3/VIA KM266/VT8375 aka ProSavage8
* S3/VIA KM133/VT8365 aka Savage4
*
* Two serial busses are implemented:
* SERIAL1 - I2C serial communications interface
* SERIAL2 - DDC2 monitor communications interface
*
* Tested on a FX41 mainboard, see http://www.shuttle.com
*
*
* TODO:
* - integration with prosavage framebuffer device
* (Additional documentation needed :(
*/
#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include <asm/io.h>
/*
* driver configuration
*/
#define DRIVER_ID "i2c-prosavage"
#define DRIVER_VERSION "20030621"
/* lm_sensors2 / kernel 2.5.xx compatibility */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#define ADAPTER_NAME(x) (x).name
#else
#define ADAPTER_NAME(x) (x).dev.name
#endif /* LINUX_VERSION_CODE */
#define MAX_BUSSES 2
struct s_i2c_bus {
u8 *mmvga;
int i2c_reg;
int adap_ok;
struct i2c_adapter adap;
struct i2c_algo_bit_data algo;
};
struct s_i2c_chip {
u8 *mmio;
struct s_i2c_bus i2c_bus[MAX_BUSSES];
};
/*
* i2c configuration
*/
#ifndef I2C_HW_B_S3VIA
#define I2C_HW_B_S3VIA 0x18 /* S3VIA ProSavage adapter */
#endif
/* delays */
#define CYCLE_DELAY 10
#define TIMEOUT (HZ / 2)
/*
* S3/VIA 8365/8375 registers
*/
#ifndef PCI_VENDOR_ID_S3
#define PCI_VENDOR_ID_S3 0x5333
#endif
#ifndef PCI_DEVICE_ID_S3_SAVAGE4
#define PCI_DEVICE_ID_S3_SAVAGE4 0x8a25
#endif
#ifndef PCI_DEVICE_ID_S3_PROSAVAGE8
#define PCI_DEVICE_ID_S3_PROSAVAGE8 0x8d04
#endif
#define VGA_CR_IX 0x3d4
#define VGA_CR_DATA 0x3d5
#define CR_SERIAL1 0xa0 /* I2C serial communications interface */
#define MM_SERIAL1 0xff20
#define CR_SERIAL2 0xb1 /* DDC2 monitor communications interface */
/* based on vt8365 documentation */
#define I2C_ENAB 0x10
#define I2C_SCL_OUT 0x01
#define I2C_SDA_OUT 0x02
#define I2C_SCL_IN 0x04
#define I2C_SDA_IN 0x08
#define SET_CR_IX(p, val) *((p)->mmvga + VGA_CR_IX) = (u8)(val)
#define SET_CR_DATA(p, val) *((p)->mmvga + VGA_CR_DATA) = (u8)(val)
#define GET_CR_DATA(p) *((p)->mmvga + VGA_CR_DATA)
/*
* Serial bus line handling
*
* serial communications register as parameter in private data
*
* TODO: locks with other code sections accessing video registers?
*/
static void bit_s3via_setscl(void *bus, int val)
{
struct s_i2c_bus *p = (struct s_i2c_bus *)bus;
unsigned int r;
SET_CR_IX(p, p->i2c_reg);
r = GET_CR_DATA(p);
r |= I2C_ENAB;
if (val) {
r |= I2C_SCL_OUT;
} else {
r &= ~I2C_SCL_OUT;
}
SET_CR_DATA(p, r);
}
static void bit_s3via_setsda(void *bus, int val)
{
struct s_i2c_bus *p = (struct s_i2c_bus *)bus;
unsigned int r;
SET_CR_IX(p, p->i2c_reg);
r = GET_CR_DATA(p);
r |= I2C_ENAB;
if (val) {
r |= I2C_SDA_OUT;
} else {
r &= ~I2C_SDA_OUT;
}
SET_CR_DATA(p, r);
}
static int bit_s3via_getscl(void *bus)
{
struct s_i2c_bus *p = (struct s_i2c_bus *)bus;
SET_CR_IX(p, p->i2c_reg);
return (0 != (GET_CR_DATA(p) & I2C_SCL_IN));
}
static int bit_s3via_getsda(void *bus)
{
struct s_i2c_bus *p = (struct s_i2c_bus *)bus;
SET_CR_IX(p, p->i2c_reg);
return (0 != (GET_CR_DATA(p) & I2C_SDA_IN));
}
/*
* adapter initialisation
*/
static int i2c_register_bus(struct s_i2c_bus *p, u8 *mmvga, u32 i2c_reg)
{
int ret;
p->adap.owner = THIS_MODULE;
p->adap.id = I2C_HW_B_S3VIA;
p->adap.algo_data = &p->algo;
p->algo.setsda = bit_s3via_setsda;
p->algo.setscl = bit_s3via_setscl;
p->algo.getsda = bit_s3via_getsda;
p->algo.getscl = bit_s3via_getscl;
p->algo.udelay = CYCLE_DELAY;
p->algo.mdelay = CYCLE_DELAY;
p->algo.timeout = TIMEOUT;
p->algo.data = p;
p->mmvga = mmvga;
p->i2c_reg = i2c_reg;
ret = i2c_bit_add_bus(&p->adap);
if (ret) {
return ret;
}
p->adap_ok = 1;
return 0;
}
/*
* Cleanup stuff
*/
static void __devexit prosavage_remove(struct pci_dev *dev)
{
struct s_i2c_chip *chip;
int i, ret;
chip = (struct s_i2c_chip *)pci_get_drvdata(dev);
if (!chip) {
return;
}
for (i = MAX_BUSSES - 1; i >= 0; i--) {
if (chip->i2c_bus[i].adap_ok == 0)
continue;
ret = i2c_bit_del_bus(&chip->i2c_bus[i].adap);
if (ret) {
printk(DRIVER_ID ": %s not removed\n",
ADAPTER_NAME(chip->i2c_bus[i].adap));
}
}
if (chip->mmio) {
iounmap(chip->mmio);
}
kfree(chip);
}
/*
* Detect chip and initialize it
*/
static int __devinit prosavage_probe(struct pci_dev *dev, const struct pci_device_id *id)
{
int ret;
unsigned long base, len;
struct s_i2c_chip *chip;
struct s_i2c_bus *bus;
pci_set_drvdata(dev, kmalloc(sizeof(struct s_i2c_chip), GFP_KERNEL));
chip = (struct s_i2c_chip *)pci_get_drvdata(dev);
if (chip == NULL) {
return -ENOMEM;
}
memset(chip, 0, sizeof(struct s_i2c_chip));
base = dev->resource[0].start & PCI_BASE_ADDRESS_MEM_MASK;
len = dev->resource[0].end - base + 1;
chip->mmio = ioremap_nocache(base, len);
if (chip->mmio == NULL) {
printk (DRIVER_ID ": ioremap failed\n");
prosavage_remove(dev);
return -ENODEV;
}
/*
* Chip initialisation
*/
/* Unlock Extended IO Space ??? */
/*
* i2c bus registration
*/
bus = &chip->i2c_bus[0];
snprintf(ADAPTER_NAME(bus->adap), sizeof(ADAPTER_NAME(bus->adap)),
"ProSavage I2C bus at %02x:%02x.%x",
dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
ret = i2c_register_bus(bus, chip->mmio + 0x8000, CR_SERIAL1);
if (ret) {
goto err_adap;
}
/*
* ddc bus registration
*/
bus = &chip->i2c_bus[1];
snprintf(ADAPTER_NAME(bus->adap), sizeof(ADAPTER_NAME(bus->adap)),
"ProSavage DDC bus at %02x:%02x.%x",
dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
ret = i2c_register_bus(bus, chip->mmio + 0x8000, CR_SERIAL2);
if (ret) {
goto err_adap;
}
return 0;
err_adap:
printk (DRIVER_ID ": %s failed\n", ADAPTER_NAME(bus->adap));
prosavage_remove(dev);
return ret;
}
/*
* Data for PCI driver interface
*/
static struct pci_device_id prosavage_pci_tbl[] __devinitdata = {
{
.vendor = PCI_VENDOR_ID_S3,
.device = PCI_DEVICE_ID_S3_SAVAGE4,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
},{
.vendor = PCI_VENDOR_ID_S3,
.device = PCI_DEVICE_ID_S3_PROSAVAGE8,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
},{ 0, }
};
static struct pci_driver prosavage_driver = {
.name = "prosavage-smbus",
.id_table = prosavage_pci_tbl,
.probe = prosavage_probe,
.remove = __devexit_p(prosavage_remove),
};
static int __init i2c_prosavage_init(void)
{
printk(DRIVER_ID " version %s (%s)\n", I2C_VERSION, DRIVER_VERSION);
return pci_module_init(&prosavage_driver);
}
static void __exit i2c_prosavage_exit(void)
{
pci_unregister_driver(&prosavage_driver);
}
MODULE_DEVICE_TABLE(pci, prosavage_pci_tbl);
MODULE_AUTHOR("Henk Vergonet");
MODULE_DESCRIPTION("ProSavage VIA 8365/8375 smbus driver");
MODULE_LICENSE("GPL");
module_init (i2c_prosavage_init);
module_exit (i2c_prosavage_exit);
......@@ -473,7 +473,7 @@ int ide_event(event_t event, int priority,
static struct pcmcia_driver ide_cs_driver = {
.owner = THIS_MODULE,
.drv = {
.name = "ide_cs",
.name = "ide-cs",
},
.attach = ide_attach,
.detach = ide_detach,
......
......@@ -175,6 +175,27 @@ static int ti_override(struct yenta_socket *socket)
new = reg & ~I365_INTR_ENA;
if (new != reg)
exca_writeb(socket, I365_INTCTL, new);
/*
* If ISA interrupts don't work, then fall back to routing card
* interrupts to the PCI interrupt of the socket.
*/
if (!socket->socket.irq_mask) {
int irqmux, devctl;
printk (KERN_INFO "ti113x: Routing card interrupts to PCI\n");
devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
devctl &= ~TI113X_DCR_IMODE_MASK;
irqmux = config_readl(socket, TI122X_IRQMUX);
irqmux = (irqmux & ~0x0f) | 0x02; /* route INTA */
irqmux = (irqmux & ~0xf0) | 0x20; /* route INTB */
config_writel(socket, TI122X_IRQMUX, irqmux);
config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);
}
socket->socket.ss_entry->init = ti_init;
return 0;
}
......@@ -241,6 +262,17 @@ static int ti1250_override(struct yenta_socket *socket)
return 0;
}
static int ti12xx_override(struct yenta_socket *socket)
{
/* make sure that memory burst is active */
ti_sysctl(socket) = config_readl(socket, TI113X_SYSTEM_CONTROL);
ti_sysctl(socket) |= TI122X_SCR_MRBURSTUP;
config_writel(socket, TI113X_SYSTEM_CONTROL, ti_sysctl(socket));
return ti113x_override(socket);
}
#endif /* CONFIG_CARDBUS */
#endif /* _LINUX_TI113X_H */
......
......@@ -807,23 +807,30 @@ struct cardbus_override_struct {
unsigned short device;
int (*override) (struct yenta_socket *socket);
} cardbus_override[] = {
{ PD(TI,1130), &ti113x_override },
{ PD(TI,1031), &ti_override },
{ PD(TI,1131), &ti113x_override },
{ PD(TI,1250), &ti1250_override },
{ PD(TI,1220), &ti_override },
{ PD(TI,1221), &ti_override },
/* TBD: Check if these TI variants can use more
* advanced overrides instead */
{ PD(TI,1210), &ti_override },
{ PD(TI,1450), &ti_override },
{ PD(TI,1225), &ti_override },
{ PD(TI,1251A), &ti_override },
{ PD(TI,1211), &ti_override },
{ PD(TI,1251A), &ti_override },
{ PD(TI,1251B), &ti_override },
{ PD(TI,1410), ti1250_override },
{ PD(TI,1420), &ti_override },
{ PD(TI,1450), &ti_override },
{ PD(TI,4410), &ti_override },
{ PD(TI,4451), &ti_override },
{ PD(TI,1130), &ti113x_override },
{ PD(TI,1131), &ti113x_override },
{ PD(TI,1220), &ti12xx_override },
{ PD(TI,1221), &ti12xx_override },
{ PD(TI,1225), &ti12xx_override },
{ PD(TI,1520), &ti12xx_override },
{ PD(TI,1250), &ti1250_override },
{ PD(TI,1410), &ti1250_override },
{ PD(RICOH,RL5C465), &ricoh_override },
{ PD(RICOH,RL5C466), &ricoh_override },
{ PD(RICOH,RL5C475), &ricoh_override },
......
......@@ -122,13 +122,13 @@ struct uart_8250_port {
struct uart_port port;
struct timer_list timer; /* "no irq" timer */
struct list_head list; /* ports on this IRQ */
unsigned short rev;
unsigned char acr;
unsigned char ier;
unsigned char rev;
unsigned char lcr;
unsigned char mcr_mask; /* mask of user bits */
unsigned char mcr_force; /* mask of forced bits */
unsigned int lsr_break_flag;
unsigned char lsr_break_flag;
/*
* We provide a per-port pm hook.
......
......@@ -2,7 +2,7 @@
A driver for PCMCIA serial devices
serial_cs.c 1.123 2000/08/24 18:46:38
serial_cs.c 1.134 2002/05/04 05:48:53
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
......@@ -43,7 +43,6 @@
#include <linux/serial.h>
#include <linux/serial_core.h>
#include <linux/major.h>
#include <linux/workqueue.h>
#include <asm/io.h>
#include <asm/system.h>
......@@ -59,7 +58,7 @@
static int pc_debug = PCMCIA_DEBUG;
MODULE_PARM(pc_debug, "i");
#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
static char *version = "serial_cs.c 1.123 2000/08/24 18:46:38 (David Hinds)";
static char *version = "serial_cs.c 1.134 2002/05/04 05:48:53 (David Hinds)";
#else
#define DEBUG(n, args...)
#endif
......@@ -74,10 +73,13 @@ static int irq_list[4] = { -1 };
/* Enable the speaker? */
static int do_sound = 1;
/* Skip strict UART tests? */
static int buggy_uart;
MODULE_PARM(irq_mask, "i");
MODULE_PARM(irq_list, "1-4i");
MODULE_PARM(do_sound, "i");
MODULE_PARM(buggy_uart, "i");
/*====================================================================*/
......@@ -100,7 +102,7 @@ static struct multi_id multi_id[] = {
};
#define MULTI_COUNT (sizeof(multi_id)/sizeof(struct multi_id))
typedef struct serial_info {
struct serial_info {
dev_link_t link;
int ndev;
int multi;
......@@ -108,8 +110,7 @@ typedef struct serial_info {
int manfid;
dev_node_t node[4];
int line[4];
struct work_struct remove;
} serial_info_t;
};
static void serial_config(dev_link_t * link);
static int serial_event(event_t event, int priority,
......@@ -124,20 +125,19 @@ static dev_link_t *dev_list = NULL;
/*======================================================================
After a card is removed, do_serial_release() will unregister
After a card is removed, serial_remove() will unregister
the serial device(s), and release the PCMCIA configuration.
======================================================================*/
/*
* This always runs in process context.
*/
static void do_serial_release(void *arg)
static void serial_remove(dev_link_t *link)
{
struct serial_info *info = arg;
int i;
struct serial_info *info = link->priv;
int i, ret;
DEBUG(0, "serial_release(0x%p)\n", &info->link);
link->state &= ~DEV_PRESENT;
DEBUG(0, "serial_release(0x%p)\n", link);
/*
* Recheck to see if the device is still configured.
......@@ -158,25 +158,6 @@ static void do_serial_release(void *arg)
}
}
/*
* This may be called from IRQ context.
*/
static void serial_remove(dev_link_t *link)
{
struct serial_info *info = link->priv;
link->state &= ~DEV_PRESENT;
/*
* FIXME: Since the card has probably been removed,
* we should call into the serial layer and hang up
* the ports on the card immediately.
*/
if (link->state & DEV_CONFIG)
schedule_work(&info->remove);
}
/*======================================================================
serial_attach() creates an "instance" of the driver, allocating
......@@ -187,7 +168,7 @@ static void serial_remove(dev_link_t *link)
static dev_link_t *serial_attach(void)
{
serial_info_t *info;
struct serial_info *info;
client_reg_t client_reg;
dev_link_t *link;
int i, ret;
......@@ -202,8 +183,6 @@ static dev_link_t *serial_attach(void)
link = &info->link;
link->priv = info;
INIT_WORK(&info->remove, do_serial_release, info);
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 8;
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
......@@ -214,7 +193,6 @@ static dev_link_t *serial_attach(void)
for (i = 0; i < 4; i++)
link->irq.IRQInfo2 |= 1 << irq_list[i];
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.Vcc = 50;
if (do_sound) {
link->conf.Attributes |= CONF_ENABLE_SPKR;
link->conf.Status = CCSR_AUDIO_ENA;
......@@ -254,7 +232,7 @@ static dev_link_t *serial_attach(void)
static void serial_detach(dev_link_t * link)
{
serial_info_t *info = link->priv;
struct serial_info *info = link->priv;
dev_link_t **linkp;
int ret;
......@@ -275,7 +253,7 @@ static void serial_detach(dev_link_t * link)
/*
* Ensure that the ports have been released.
*/
do_serial_release(info);
serial_remove(link);
if (link->handle) {
ret = CardServices(DeregisterClient, link->handle);
......@@ -290,7 +268,7 @@ static void serial_detach(dev_link_t * link)
/*====================================================================*/
static int setup_serial(serial_info_t * info, ioaddr_t port, int irq)
static int setup_serial(struct serial_info * info, ioaddr_t port, int irq)
{
struct serial_struct serial;
int line;
......@@ -299,11 +277,13 @@ static int setup_serial(serial_info_t * info, ioaddr_t port, int irq)
serial.port = port;
serial.irq = irq;
serial.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ;
if (buggy_uart)
serial.flags |= UPF_BUGGY_UART;
line = register_serial(&serial);
if (line < 0) {
printk(KERN_NOTICE "serial_cs: register_serial() at 0x%04lx,"
" irq %d failed\n", (u_long) serial.port, serial.irq);
return -1;
return -EINVAL;
}
info->line[info->ndev] = line;
......@@ -341,7 +321,7 @@ static int simple_config(dev_link_t * link)
{
static ioaddr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
client_handle_t handle = link->handle;
serial_info_t *info = link->priv;
struct serial_info *info = link->priv;
tuple_t tuple;
u_char buf[256];
cisparse_t parse;
......@@ -445,13 +425,21 @@ static int simple_config(dev_link_t * link)
static int multi_config(dev_link_t * link)
{
client_handle_t handle = link->handle;
serial_info_t *info = link->priv;
struct serial_info *info = link->priv;
tuple_t tuple;
u_char buf[256];
cisparse_t parse;
cistpl_cftable_entry_t *cf = &parse.cftable_entry;
config_info_t config;
int i, base2 = 0;
i = CardServices(GetConfigurationInfo, handle, &config);
if (i != CS_SUCCESS) {
cs_error(handle, GetConfiguration, i);
return -1;
}
link->conf.Vcc = config.Vcc;
tuple.TupleData = (cisdata_t *) buf;
tuple.TupleOffset = 0;
tuple.TupleDataMax = 255;
......@@ -524,6 +512,19 @@ static int multi_config(dev_link_t * link)
return -1;
}
/* The Oxford Semiconductor OXCF950 cards are in fact single-port:
8 registers are for the UART, the others are extra registers */
if (info->manfid == MANFID_OXSEMI) {
if (cf->index == 1 || cf->index == 3) {
setup_serial(info, base2, link->irq.AssignedIRQ);
outb(12, link->io.BasePort1 + 1);
} else {
setup_serial(info, link->io.BasePort1, link->irq.AssignedIRQ);
outb(12, base2 + 1);
}
return 0;
}
setup_serial(info, link->io.BasePort1, link->irq.AssignedIRQ);
/* The Nokia cards are not really multiport cards */
if (info->manfid == MANFID_NOKIA)
......@@ -548,7 +549,7 @@ while ((last_ret=CardServices(last_fn=(fn), args))!=0) goto cs_failed
void serial_config(dev_link_t * link)
{
client_handle_t handle = link->handle;
serial_info_t *info = link->priv;
struct serial_info *info = link->priv;
tuple_t tuple;
u_short buf[128];
cisparse_t parse;
......@@ -631,7 +632,8 @@ void serial_config(dev_link_t * link)
cs_failed:
cs_error(link->handle, last_fn, last_ret);
failed:
do_serial_release(info);
serial_remove(link);
link->state &= ~DEV_CONFIG_PENDING;
}
/*======================================================================
......@@ -647,7 +649,7 @@ static int
serial_event(event_t event, int priority, event_callback_args_t * args)
{
dev_link_t *link = args->client_data;
serial_info_t *info = link->priv;
struct serial_info *info = link->priv;
DEBUG(1, "serial_event(0x%06x)\n", event);
......
......@@ -80,14 +80,14 @@ config SERIAL_8250_CS
config SERIAL_8250_ACPI
bool "8250/16550 device discovery via ACPI namespace"
default y if IA64
depends on ACPI_BUS
depends on ACPI_BUS && SERIAL_8250
---help---
If you wish to enable serial port discovery via the ACPI
namespace, say Y here. If unsure, say N.
config SERIAL_8250_HCDP
bool "8250/16550 device discovery support via EFI HCDP table"
depends on IA64
depends on IA64 && SERIAL_8250
---help---
If you wish to make the serial console port described by the EFI
HCDP table available for use as serial console or general
......
......@@ -668,7 +668,6 @@
#define PCI_DEVICE_ID_TI_1220 0xac17
#define PCI_DEVICE_ID_TI_1221 0xac19
#define PCI_DEVICE_ID_TI_1210 0xac1a
#define PCI_DEVICE_ID_TI_1410 0xac50
#define PCI_DEVICE_ID_TI_1450 0xac1b
#define PCI_DEVICE_ID_TI_1225 0xac1c
#define PCI_DEVICE_ID_TI_1251A 0xac1d
......@@ -676,7 +675,9 @@
#define PCI_DEVICE_ID_TI_1251B 0xac1f
#define PCI_DEVICE_ID_TI_4410 0xac41
#define PCI_DEVICE_ID_TI_4451 0xac42
#define PCI_DEVICE_ID_TI_1410 0xac50
#define PCI_DEVICE_ID_TI_1420 0xac51
#define PCI_DEVICE_ID_TI_1520 0xac55
#define PCI_VENDOR_ID_SONY 0x104d
#define PCI_DEVICE_ID_SONY_CXD3222 0x8039
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment