Commit fff263fe authored by Linus Torvalds's avatar Linus Torvalds

Merge ssh://master.kernel.org//home/hch/BK/xfs/linux-2.5/

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 04792016 8c26220b
...@@ -76,7 +76,6 @@ ...@@ -76,7 +76,6 @@
#include <pcmcia/cistpl.h> #include <pcmcia/cistpl.h>
#include <pcmcia/cisreg.h> #include <pcmcia/cisreg.h>
#include <pcmcia/ds.h> #include <pcmcia/ds.h>
#include <pcmcia/bus_ops.h>
#ifdef CONFIG_SYNCLINK_SYNCPPP_MODULE #ifdef CONFIG_SYNCLINK_SYNCPPP_MODULE
#define CONFIG_SYNCLINK_SYNCPPP 1 #define CONFIG_SYNCLINK_SYNCPPP 1
...@@ -241,7 +240,6 @@ typedef struct _mgslpc_info { ...@@ -241,7 +240,6 @@ typedef struct _mgslpc_info {
dev_link_t link; dev_link_t link;
dev_node_t node; dev_node_t node;
int stop; int stop;
struct bus_operations *bus;
/* SPPP/Cisco HDLC device parts */ /* SPPP/Cisco HDLC device parts */
int netcount; int netcount;
...@@ -826,7 +824,6 @@ static int mgslpc_event(event_t event, int priority, ...@@ -826,7 +824,6 @@ static int mgslpc_event(event_t event, int priority,
break; break;
case CS_EVENT_CARD_INSERTION: case CS_EVENT_CARD_INSERTION:
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
info->bus = args->bus;
mgslpc_config(link); mgslpc_config(link);
break; break;
case CS_EVENT_PM_SUSPEND: case CS_EVENT_PM_SUSPEND:
......
...@@ -53,7 +53,6 @@ ...@@ -53,7 +53,6 @@
#include <pcmcia/cistpl.h> #include <pcmcia/cistpl.h>
#include <pcmcia/cisreg.h> #include <pcmcia/cisreg.h>
#include <pcmcia/ds.h> #include <pcmcia/ds.h>
#include <pcmcia/bus_ops.h>
MODULE_DESCRIPTION("ISDN4Linux: PCMCIA client driver for Elsa PCM cards"); MODULE_DESCRIPTION("ISDN4Linux: PCMCIA client driver for Elsa PCM cards");
MODULE_AUTHOR("Klaus Lichtenwalder"); MODULE_AUTHOR("Klaus Lichtenwalder");
...@@ -163,17 +162,12 @@ static dev_link_t *dev_list = NULL; ...@@ -163,17 +162,12 @@ static dev_link_t *dev_list = NULL;
"stopped" due to a power management event, or card ejection. The "stopped" due to a power management event, or card ejection. The
device IO routines can use a flag like this to throttle IO to a device IO routines can use a flag like this to throttle IO to a
card that is not ready to accept it. card that is not ready to accept it.
The bus_operations pointer is used on platforms for which we need
to use special socket-specific versions of normal IO primitives
(inb, outb, readb, writeb, etc) for card IO.
*/ */
typedef struct local_info_t { typedef struct local_info_t {
dev_link_t link; dev_link_t link;
dev_node_t node; dev_node_t node;
int busy; int busy;
struct bus_operations *bus;
} local_info_t; } local_info_t;
/*====================================================================*/ /*====================================================================*/
...@@ -522,7 +516,6 @@ static int elsa_cs_event(event_t event, int priority, ...@@ -522,7 +516,6 @@ static int elsa_cs_event(event_t event, int priority,
break; break;
case CS_EVENT_CARD_INSERTION: case CS_EVENT_CARD_INSERTION:
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
dev->bus = args->bus;
elsa_cs_config(link); elsa_cs_config(link);
break; break;
case CS_EVENT_PM_SUSPEND: case CS_EVENT_PM_SUSPEND:
......
...@@ -53,7 +53,6 @@ ...@@ -53,7 +53,6 @@
#include <pcmcia/cistpl.h> #include <pcmcia/cistpl.h>
#include <pcmcia/cisreg.h> #include <pcmcia/cisreg.h>
#include <pcmcia/ds.h> #include <pcmcia/ds.h>
#include <pcmcia/bus_ops.h>
MODULE_DESCRIPTION("ISDN4Linux: PCMCIA client driver for Sedlbauer cards"); MODULE_DESCRIPTION("ISDN4Linux: PCMCIA client driver for Sedlbauer cards");
MODULE_AUTHOR("Marcus Niemann"); MODULE_AUTHOR("Marcus Niemann");
...@@ -171,17 +170,12 @@ static dev_link_t *dev_list = NULL; ...@@ -171,17 +170,12 @@ static dev_link_t *dev_list = NULL;
"stopped" due to a power management event, or card ejection. The "stopped" due to a power management event, or card ejection. The
device IO routines can use a flag like this to throttle IO to a device IO routines can use a flag like this to throttle IO to a
card that is not ready to accept it. card that is not ready to accept it.
The bus_operations pointer is used on platforms for which we need
to use special socket-specific versions of normal IO primitives
(inb, outb, readb, writeb, etc) for card IO.
*/ */
typedef struct local_info_t { typedef struct local_info_t {
dev_link_t link; dev_link_t link;
dev_node_t node; dev_node_t node;
int stop; int stop;
struct bus_operations *bus;
} local_info_t; } local_info_t;
/*====================================================================*/ /*====================================================================*/
...@@ -620,7 +614,6 @@ static int sedlbauer_event(event_t event, int priority, ...@@ -620,7 +614,6 @@ static int sedlbauer_event(event_t event, int priority,
break; break;
case CS_EVENT_CARD_INSERTION: case CS_EVENT_CARD_INSERTION:
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
dev->bus = args->bus;
sedlbauer_config(link); sedlbauer_config(link);
break; break;
case CS_EVENT_PM_SUSPEND: case CS_EVENT_PM_SUSPEND:
......
...@@ -29,6 +29,9 @@ ifdef CONFIG_HOTPLUG_PCI_CPCI ...@@ -29,6 +29,9 @@ ifdef CONFIG_HOTPLUG_PCI_CPCI
obj-y += setup-bus.o obj-y += setup-bus.o
endif endif
# Hotplug (eg, cardbus) now requires setup-bus
obj-$(CONFIG_HOTPLUG) += setup-bus.o
ifndef CONFIG_X86 ifndef CONFIG_X86
obj-y += syscall.o obj-y += syscall.o
endif endif
......
...@@ -87,5 +87,9 @@ config PCMCIA_SA1111 ...@@ -87,5 +87,9 @@ config PCMCIA_SA1111
tristate "SA1111 support" tristate "SA1111 support"
depends on PCMCIA_SA1100 && SA1111 depends on PCMCIA_SA1100 && SA1111
config PCMCIA_PROBE
bool
default y if ISA && !ARCH_SA1100 && !ARCH_CLPS711X
endmenu endmenu
...@@ -14,34 +14,31 @@ obj-$(CONFIG_HD64465_PCMCIA) += hd64465_ss.o ...@@ -14,34 +14,31 @@ obj-$(CONFIG_HD64465_PCMCIA) += hd64465_ss.o
obj-$(CONFIG_PCMCIA_SA1100) += sa1100_cs.o obj-$(CONFIG_PCMCIA_SA1100) += sa1100_cs.o
obj-$(CONFIG_PCMCIA_SA1111) += sa1111_cs.o obj-$(CONFIG_PCMCIA_SA1111) += sa1111_cs.o
yenta_socket-objs := pci_socket.o yenta.o yenta_socket-y += pci_socket.o yenta.o
pcmcia_core-objs-y := cistpl.o rsrc_mgr.o bulkmem.o cs.o pcmcia_core-y += cistpl.o rsrc_mgr.o bulkmem.o cs.o
pcmcia_core-objs-$(CONFIG_CARDBUS) += cardbus.o pcmcia_core-$(CONFIG_CARDBUS) += cardbus.o
pcmcia_core-objs := $(pcmcia_core-objs-y)
sa1111_cs-objs-y := sa1111_generic.o sa1111_cs-y += sa1111_generic.o
sa1111_cs-objs-$(CONFIG_SA1100_ADSBITSY) += sa1100_adsbitsy.o sa1111_cs-$(CONFIG_SA1100_ADSBITSY) += sa1100_adsbitsy.o
sa1111_cs-objs-$(CONFIG_ASSABET_NEPONSET) += sa1100_neponset.o sa1111_cs-$(CONFIG_ASSABET_NEPONSET) += sa1100_neponset.o
sa1111_cs-objs-$(CONFIG_SA1100_BADGE4) += sa1100_badge4.o sa1111_cs-$(CONFIG_SA1100_BADGE4) += sa1100_badge4.o
sa1111_cs-objs-$(CONFIG_SA1100_GRAPHICSMASTER) += sa1100_graphicsmaster.o sa1111_cs-$(CONFIG_SA1100_GRAPHICSMASTER) += sa1100_graphicsmaster.o
sa1111_cs-objs-$(CONFIG_SA1100_JORNADA720) += sa1100_jornada720.o sa1111_cs-$(CONFIG_SA1100_JORNADA720) += sa1100_jornada720.o
sa1111_cs-objs-$(CONFIG_SA1100_PFS168) += sa1100_pfs168.o sa1111_cs-$(CONFIG_SA1100_PFS168) += sa1100_pfs168.o
sa1111_cs-objs-$(CONFIG_SA1100_PT_SYSTEM3) += sa1100_system3.o sa1111_cs-$(CONFIG_SA1100_PT_SYSTEM3) += sa1100_system3.o
sa1111_cs-objs-$(CONFIG_SA1100_XP860) += sa1100_xp860.o sa1111_cs-$(CONFIG_SA1100_XP860) += sa1100_xp860.o
sa1111_cs-objs := $(sa1111_cs-objs-y)
sa1100_cs-objs-y := sa1100_generic.o sa1100_cs-y += sa1100_generic.o
sa1100_cs-objs-$(CONFIG_SA1100_ASSABET) += sa1100_assabet.o sa1100_cs-$(CONFIG_SA1100_ASSABET) += sa1100_assabet.o
sa1100_cs-objs-$(CONFIG_SA1100_CERF) += sa1100_cerf.o sa1100_cs-$(CONFIG_SA1100_CERF) += sa1100_cerf.o
sa1100_cs-objs-$(CONFIG_SA1100_FLEXANET) += sa1100_flexanet.o sa1100_cs-$(CONFIG_SA1100_FLEXANET) += sa1100_flexanet.o
sa1100_cs-objs-$(CONFIG_SA1100_FREEBIRD) += sa1100_freebird.o sa1100_cs-$(CONFIG_SA1100_FREEBIRD) += sa1100_freebird.o
sa1100_cs-objs-$(CONFIG_SA1100_GRAPHICSCLIENT) += sa1100_graphicsclient.o sa1100_cs-$(CONFIG_SA1100_GRAPHICSCLIENT) += sa1100_graphicsclient.o
sa1100_cs-objs-$(CONFIG_SA1100_H3600) += sa1100_h3600.o sa1100_cs-$(CONFIG_SA1100_H3600) += sa1100_h3600.o
sa1100_cs-objs-$(CONFIG_SA1100_PANGOLIN) += sa1100_pangolin.o sa1100_cs-$(CONFIG_SA1100_PANGOLIN) += sa1100_pangolin.o
sa1100_cs-objs-$(CONFIG_SA1100_SHANNON) += sa1100_shannon.o sa1100_cs-$(CONFIG_SA1100_SHANNON) += sa1100_shannon.o
sa1100_cs-objs-$(CONFIG_SA1100_SIMPAD) += sa1100_simpad.o sa1100_cs-$(CONFIG_SA1100_SIMPAD) += sa1100_simpad.o
sa1100_cs-objs-$(CONFIG_SA1100_STORK) += sa1100_stork.o sa1100_cs-$(CONFIG_SA1100_STORK) += sa1100_stork.o
sa1100_cs-objs-$(CONFIG_SA1100_TRIZEPS) += sa1100_trizeps.o sa1100_cs-$(CONFIG_SA1100_TRIZEPS) += sa1100_trizeps.o
sa1100_cs-objs-$(CONFIG_SA1100_YOPY) += sa1100_yopy.o sa1100_cs-$(CONFIG_SA1100_YOPY) += sa1100_yopy.o
sa1100_cs-objs := $(sa1100_cs-objs-y)
...@@ -87,10 +87,6 @@ static int pc_debug = PCMCIA_DEBUG; ...@@ -87,10 +87,6 @@ static int pc_debug = PCMCIA_DEBUG;
#define PCDATA_CODE_TYPE 0x0014 #define PCDATA_CODE_TYPE 0x0014
#define PCDATA_INDICATOR 0x0015 #define PCDATA_INDICATOR 0x0015
typedef struct cb_config_t {
struct pci_dev *dev[8];
} cb_config_t;
/*===================================================================== /*=====================================================================
Expansion ROM's have a special layout, and pointers specify an Expansion ROM's have a special layout, and pointers specify an
...@@ -173,11 +169,10 @@ int read_cb_mem(socket_info_t * s, int space, u_int addr, u_int len, void *ptr) ...@@ -173,11 +169,10 @@ int read_cb_mem(socket_info_t * s, int space, u_int addr, u_int len, void *ptr)
DEBUG(3, "cs: read_cb_mem(%d, %#x, %u)\n", space, addr, len); DEBUG(3, "cs: read_cb_mem(%d, %#x, %u)\n", space, addr, len);
if (!s->cb_config) dev = pci_find_slot(s->cap.cb_dev->subordinate->number, 0);
if (!dev)
goto fail; goto fail;
dev = s->cb_config->dev[0];
/* Config space? */ /* Config space? */
if (space == 0) { if (space == 0) {
if (addr + len > 0x100) if (addr + len > 0x100)
...@@ -219,171 +214,61 @@ int read_cb_mem(socket_info_t * s, int space, u_int addr, u_int len, void *ptr) ...@@ -219,171 +214,61 @@ int read_cb_mem(socket_info_t * s, int space, u_int addr, u_int len, void *ptr)
=====================================================================*/ =====================================================================*/
int cb_alloc(socket_info_t * s) /*
* Since there is only one interrupt available to CardBus
* devices, all devices downstream of this device must
* be using this IRQ.
*/
static void cardbus_assign_irqs(struct pci_bus *bus, int irq)
{ {
struct pci_bus *bus; struct pci_dev *dev;
u_short vend, v, dev;
u_char i, hdr, fn;
cb_config_t *c;
int irq;
bus = s->cap.cb_dev->subordinate;
pci_bus_read_config_word(bus, 0, PCI_VENDOR_ID, &vend);
pci_bus_read_config_word(bus, 0, PCI_DEVICE_ID, &dev);
printk(KERN_INFO "cs: cb_alloc(bus %d): vendor 0x%04x, "
"device 0x%04x\n", bus->number, vend, dev);
pci_bus_read_config_byte(bus, 0, PCI_HEADER_TYPE, &hdr);
fn = 1;
if (hdr & 0x80) {
do {
if (pci_bus_read_config_word(bus, fn, PCI_VENDOR_ID, &v) ||
!v || v == 0xffff)
break;
fn++;
} while (fn < 8);
}
s->functions = fn;
c = kmalloc(sizeof(struct cb_config_t), GFP_ATOMIC);
if (!c)
return CS_OUT_OF_RESOURCE;
memset(c, 0, sizeof(struct cb_config_t));
for (i = 0; i < fn; i++) {
c->dev[i] = kmalloc(sizeof(struct pci_dev), GFP_ATOMIC);
if (!c->dev[i]) {
for (; i--; )
kfree(c->dev[i]);
kfree(c);
return CS_OUT_OF_RESOURCE;
}
memset(c->dev[i], 0, sizeof(struct pci_dev));
}
irq = s->cap.pci_irq; list_for_each_entry(dev, &bus->devices, bus_list) {
for (i = 0; i < fn; i++) {
struct pci_dev *dev = c->dev[i];
u8 irq_pin; u8 irq_pin;
int r;
dev->bus = bus;
dev->sysdata = bus->sysdata;
dev->dev.parent = bus->dev;
dev->dev.bus = &pci_bus_type;
dev->devfn = i;
pci_read_config_word(dev, PCI_VENDOR_ID, &dev->vendor);
pci_read_config_word(dev, PCI_DEVICE_ID, &dev->device);
dev->hdr_type = hdr & 0x7f;
dev->dma_mask = 0xffffffff;
dev->dev.dma_mask = &dev->dma_mask;
pci_setup_device(dev);
strcpy(dev->dev.bus_id, dev->slot_name);
/* We need to assign resources for expansion ROM. */
for (r = 0; r < 7; r++) {
struct resource *res = dev->resource + r;
if (res->flags)
pci_assign_resource(dev, r);
}
/* Does this function have an interrupt at all? */
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &irq_pin); pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &irq_pin);
if (irq_pin) if (irq_pin) {
dev->irq = irq; dev->irq = irq;
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
/* pci_enable_device needs to be called after pci_assign_resource */
/* because it returns an error if (!res->start && res->end). */
if (pci_enable_device(dev))
continue;
if (irq_pin)
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);
device_register(&dev->dev);
pci_insert_device(dev, bus);
} }
s->cb_config = c; if (dev->subordinate)
s->irq.AssignedIRQ = irq; cardbus_assign_irqs(dev->subordinate, irq);
return CS_SUCCESS;
}
void cb_free(socket_info_t * s)
{
cb_config_t *c = s->cb_config;
if (c) {
s->cb_config = NULL;
pci_remove_behind_bridge(s->cap.cb_dev);
kfree(c);
printk(KERN_INFO "cs: cb_free(bus %d)\n", s->cap.cb_dev->subordinate->number);
} }
} }
/*===================================================================== int cb_alloc(socket_info_t * s)
cb_enable() has the job of configuring a socket for a Cardbus
card, and initializing the card's PCI configuration registers.
It first sets up the Cardbus bridge windows, for IO and memory
accesses. Then, it initializes each card function's base address
registers, interrupt line register, and command register.
It is called as part of the RequestConfiguration card service.
It should be called after a previous call to cb_config() (via the
RequestIO service).
======================================================================*/
void cb_enable(socket_info_t * s)
{ {
struct pci_bus *bus = s->cap.cb_dev->subordinate;
struct pci_dev *dev; struct pci_dev *dev;
u_char i; unsigned int max, pass;
DEBUG(0, "cs: cb_enable(bus %d)\n", s->cap.cb_dev->subordinate->number); s->functions = pci_scan_slot(bus, PCI_DEVFN(0, 0));
// pcibios_fixup_bus(bus);
/* Configure bridge */ max = bus->secondary;
cb_release_cis_mem(s); for (pass = 0; pass < 2; pass++)
list_for_each_entry(dev, &bus->devices, bus_list)
if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
max = pci_scan_bridge(bus, dev, max, pass);
/* Set up PCI interrupt and command registers */ /*
for (i = 0; i < s->functions; i++) { * Size all resources below the CardBus controller.
dev = s->cb_config->dev[i]; */
pci_write_config_byte(dev, PCI_COMMAND, PCI_COMMAND_MASTER | pci_bus_size_bridges(bus);
PCI_COMMAND_IO | PCI_COMMAND_MEMORY); pci_bus_assign_resources(bus);
pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, cardbus_assign_irqs(bus, s->cap.pci_irq);
L1_CACHE_BYTES / 4); pci_enable_bridges(bus);
} pci_bus_add_devices(bus);
if (s->irq.AssignedIRQ) { s->irq.AssignedIRQ = s->cap.pci_irq;
for (i = 0; i < s->functions; i++) { return CS_SUCCESS;
dev = s->cb_config->dev[i];
pci_write_config_byte(dev, PCI_INTERRUPT_LINE,
s->irq.AssignedIRQ);
}
s->socket.io_irq = s->irq.AssignedIRQ;
s->ss_entry->set_socket(s->sock, &s->socket);
}
} }
/*====================================================================== void cb_free(socket_info_t * s)
cb_disable() unconfigures a Cardbus card previously set up by
cb_enable().
It is called from the ReleaseConfiguration service.
======================================================================*/
void cb_disable(socket_info_t * s)
{ {
DEBUG(0, "cs: cb_disable(bus %d)\n", s->cap.cb_dev->subordinate->number); struct pci_dev *bridge = s->cap.cb_dev;
/* Turn off bridge windows */ pci_remove_behind_bridge(bridge);
cb_release_cis_mem(s);
} }
This diff is collapsed.
...@@ -59,7 +59,6 @@ ...@@ -59,7 +59,6 @@
#include <pcmcia/bulkmem.h> #include <pcmcia/bulkmem.h>
#include <pcmcia/cistpl.h> #include <pcmcia/cistpl.h>
#include <pcmcia/cisreg.h> #include <pcmcia/cisreg.h>
#include <pcmcia/bus_ops.h>
#include "cs_internal.h" #include "cs_internal.h"
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
...@@ -622,8 +621,10 @@ static void unreset_socket(socket_info_t *s) ...@@ -622,8 +621,10 @@ static void unreset_socket(socket_info_t *s)
send_event(s, CS_EVENT_PM_RESUME, CS_EVENT_PRI_LOW); send_event(s, CS_EVENT_PM_RESUME, CS_EVENT_PRI_LOW);
} else if (s->state & SOCKET_SETUP_PENDING) { } else if (s->state & SOCKET_SETUP_PENDING) {
#ifdef CONFIG_CARDBUS #ifdef CONFIG_CARDBUS
if (s->state & SOCKET_CARDBUS) if (s->state & SOCKET_CARDBUS) {
cb_alloc(s); cb_alloc(s);
s->state |= SOCKET_CARDBUS_CONFIG;
}
#endif #endif
send_event(s, CS_EVENT_CARD_INSERTION, CS_EVENT_PRI_LOW); send_event(s, CS_EVENT_CARD_INSERTION, CS_EVENT_PRI_LOW);
s->state &= ~SOCKET_SETUP_PENDING; s->state &= ~SOCKET_SETUP_PENDING;
...@@ -1077,7 +1078,7 @@ int pcmcia_get_configuration_info(client_handle_t handle, ...@@ -1077,7 +1078,7 @@ int pcmcia_get_configuration_info(client_handle_t handle,
config->Vcc = s->socket.Vcc; config->Vcc = s->socket.Vcc;
config->Vpp1 = config->Vpp2 = s->socket.Vpp; config->Vpp1 = config->Vpp2 = s->socket.Vpp;
config->Option = s->cap.cb_dev->subordinate->number; config->Option = s->cap.cb_dev->subordinate->number;
if (s->cb_config) { if (s->state & SOCKET_CARDBUS_CONFIG) {
config->Attributes = CONF_VALID_CLIENT; config->Attributes = CONF_VALID_CLIENT;
config->IntType = INT_CARDBUS; config->IntType = INT_CARDBUS;
config->AssignedIRQ = s->irq.AssignedIRQ; config->AssignedIRQ = s->irq.AssignedIRQ;
...@@ -1473,7 +1474,6 @@ int pcmcia_register_client(client_handle_t *handle, client_reg_t *req) ...@@ -1473,7 +1474,6 @@ int pcmcia_register_client(client_handle_t *handle, client_reg_t *req)
client->event_handler = req->event_handler; client->event_handler = req->event_handler;
client->event_callback_args = req->event_callback_args; client->event_callback_args = req->event_callback_args;
client->event_callback_args.client_handle = client; client->event_callback_args.client_handle = client;
client->event_callback_args.bus = s->cap.bus;
if (s->state & SOCKET_CARDBUS) if (s->state & SOCKET_CARDBUS)
client->state |= CLIENT_CARDBUS; client->state |= CLIENT_CARDBUS;
...@@ -1522,11 +1522,8 @@ int pcmcia_release_configuration(client_handle_t handle) ...@@ -1522,11 +1522,8 @@ int pcmcia_release_configuration(client_handle_t handle)
s = SOCKET(handle); s = SOCKET(handle);
#ifdef CONFIG_CARDBUS #ifdef CONFIG_CARDBUS
if (handle->state & CLIENT_CARDBUS) { if (handle->state & CLIENT_CARDBUS)
cb_disable(s);
s->lock_count = 0;
return CS_SUCCESS; return CS_SUCCESS;
}
#endif #endif
if (!(handle->state & CLIENT_STALE)) { if (!(handle->state & CLIENT_STALE)) {
...@@ -1573,9 +1570,8 @@ int pcmcia_release_io(client_handle_t handle, io_req_t *req) ...@@ -1573,9 +1570,8 @@ int pcmcia_release_io(client_handle_t handle, io_req_t *req)
s = SOCKET(handle); s = SOCKET(handle);
#ifdef CONFIG_CARDBUS #ifdef CONFIG_CARDBUS
if (handle->state & CLIENT_CARDBUS) { if (handle->state & CLIENT_CARDBUS)
return CS_SUCCESS; return CS_SUCCESS;
}
#endif #endif
if (!(handle->state & CLIENT_STALE)) { if (!(handle->state & CLIENT_STALE)) {
...@@ -1622,10 +1618,10 @@ int pcmcia_release_irq(client_handle_t handle, irq_req_t *req) ...@@ -1622,10 +1618,10 @@ int pcmcia_release_irq(client_handle_t handle, irq_req_t *req)
} }
if (req->Attributes & IRQ_HANDLE_PRESENT) { if (req->Attributes & IRQ_HANDLE_PRESENT) {
bus_free_irq(s->cap.bus, req->AssignedIRQ, req->Instance); free_irq(req->AssignedIRQ, req->Instance);
} }
#ifdef CONFIG_ISA #ifdef CONFIG_PCMCIA_PROBE
if (req->AssignedIRQ != s->cap.pci_irq) if (req->AssignedIRQ != s->cap.pci_irq)
undo_irq(req->Attributes, req->AssignedIRQ); undo_irq(req->Attributes, req->AssignedIRQ);
#endif #endif
...@@ -1678,16 +1674,8 @@ int pcmcia_request_configuration(client_handle_t handle, ...@@ -1678,16 +1674,8 @@ int pcmcia_request_configuration(client_handle_t handle,
return CS_NO_CARD; return CS_NO_CARD;
#ifdef CONFIG_CARDBUS #ifdef CONFIG_CARDBUS
if (handle->state & CLIENT_CARDBUS) { if (handle->state & CLIENT_CARDBUS)
if (!(req->IntType & INT_CARDBUS))
return CS_UNSUPPORTED_MODE; return CS_UNSUPPORTED_MODE;
if (s->lock_count != 0)
return CS_CONFIGURATION_LOCKED;
cb_enable(s);
handle->state |= CLIENT_CONFIG_LOCKED;
s->lock_count++;
return CS_SUCCESS;
}
#endif #endif
if (req->IntType & INT_CARDBUS) if (req->IntType & INT_CARDBUS)
...@@ -1887,7 +1875,7 @@ int pcmcia_request_irq(client_handle_t handle, irq_req_t *req) ...@@ -1887,7 +1875,7 @@ int pcmcia_request_irq(client_handle_t handle, irq_req_t *req)
if (!s->cap.irq_mask) { if (!s->cap.irq_mask) {
irq = s->cap.pci_irq; irq = s->cap.pci_irq;
ret = (irq) ? 0 : CS_IN_USE; ret = (irq) ? 0 : CS_IN_USE;
#ifdef CONFIG_ISA #ifdef CONFIG_PCMCIA_PROBE
} else if (s->irq.AssignedIRQ != 0) { } else if (s->irq.AssignedIRQ != 0) {
/* If the interrupt is already assigned, it must match */ /* If the interrupt is already assigned, it must match */
irq = s->irq.AssignedIRQ; irq = s->irq.AssignedIRQ;
...@@ -1917,7 +1905,7 @@ int pcmcia_request_irq(client_handle_t handle, irq_req_t *req) ...@@ -1917,7 +1905,7 @@ int pcmcia_request_irq(client_handle_t handle, irq_req_t *req)
if (ret != 0) return ret; if (ret != 0) return ret;
if (req->Attributes & IRQ_HANDLE_PRESENT) { if (req->Attributes & IRQ_HANDLE_PRESENT) {
if (bus_request_irq(s->cap.bus, irq, req->Handler, if (request_irq(irq, req->Handler,
((req->Attributes & IRQ_TYPE_DYNAMIC_SHARING) || ((req->Attributes & IRQ_TYPE_DYNAMIC_SHARING) ||
(s->functions > 1) || (s->functions > 1) ||
(irq == s->cap.pci_irq)) ? SA_SHIRQ : 0, (irq == s->cap.pci_irq)) ? SA_SHIRQ : 0,
......
...@@ -136,7 +136,6 @@ typedef struct socket_info_t { ...@@ -136,7 +136,6 @@ typedef struct socket_info_t {
#ifdef CONFIG_CARDBUS #ifdef CONFIG_CARDBUS
struct resource * cb_cis_res; struct resource * cb_cis_res;
u_char *cb_cis_virt; u_char *cb_cis_virt;
struct cb_config_t *cb_config;
#endif #endif
struct { struct {
u_int AssignedIRQ; u_int AssignedIRQ;
...@@ -176,6 +175,7 @@ typedef struct socket_info_t { ...@@ -176,6 +175,7 @@ typedef struct socket_info_t {
#define SOCKET_IO_REQ(i) (0x1000<<(i)) #define SOCKET_IO_REQ(i) (0x1000<<(i))
#define SOCKET_REGION_INFO 0x4000 #define SOCKET_REGION_INFO 0x4000
#define SOCKET_CARDBUS 0x8000 #define SOCKET_CARDBUS 0x8000
#define SOCKET_CARDBUS_CONFIG 0x10000
#define CHECK_HANDLE(h) \ #define CHECK_HANDLE(h) \
(((h) == NULL) || ((h)->client_magic != CLIENT_MAGIC)) (((h) == NULL) || ((h)->client_magic != CLIENT_MAGIC))
...@@ -198,8 +198,6 @@ typedef struct socket_info_t { ...@@ -198,8 +198,6 @@ typedef struct socket_info_t {
/* In cardbus.c */ /* In cardbus.c */
int cb_alloc(socket_info_t *s); int cb_alloc(socket_info_t *s);
void cb_free(socket_info_t *s); void cb_free(socket_info_t *s);
void cb_enable(socket_info_t *s);
void cb_disable(socket_info_t *s);
int read_cb_mem(socket_info_t *s, int space, u_int addr, u_int len, void *ptr); int read_cb_mem(socket_info_t *s, int space, u_int addr, u_int len, void *ptr);
void cb_release_cis_mem(socket_info_t *s); void cb_release_cis_mem(socket_info_t *s);
...@@ -234,8 +232,7 @@ int write_memory(memory_handle_t handle, mem_op_t *req, caddr_t buf); ...@@ -234,8 +232,7 @@ int write_memory(memory_handle_t handle, mem_op_t *req, caddr_t buf);
int copy_memory(memory_handle_t handle, copy_op_t *req); int copy_memory(memory_handle_t handle, copy_op_t *req);
/* In rsrc_mgr */ /* In rsrc_mgr */
void validate_mem(int (*is_valid)(u_long), int (*do_cksum)(u_long), void validate_mem(socket_info_t *s);
int force_low, socket_info_t *s);
int find_io_region(ioaddr_t *base, ioaddr_t num, ioaddr_t align, int find_io_region(ioaddr_t *base, ioaddr_t num, ioaddr_t align,
char *name, socket_info_t *s); char *name, socket_info_t *s);
int find_mem_region(u_long *base, u_long num, u_long align, int find_mem_region(u_long *base, u_long num, u_long align,
......
...@@ -599,21 +599,6 @@ static int hs_set_socket(unsigned int sock, socket_state_t *state) ...@@ -599,21 +599,6 @@ static int hs_set_socket(unsigned int sock, socket_state_t *state)
/*============================================================*/ /*============================================================*/
static int hs_get_io_map(unsigned int sock, struct pccard_io_map *io)
{
hs_socket_t *sp = &hs_sockets[sock];
int map = io->map;
DPRINTK("hs_get_io_map(%d, %d)\n", sock, map);
if (map >= MAX_IO_WIN)
return -EINVAL;
*io = sp->io_maps[map];
return 0;
}
/*============================================================*/
static int hs_set_io_map(unsigned int sock, struct pccard_io_map *io) static int hs_set_io_map(unsigned int sock, struct pccard_io_map *io)
{ {
hs_socket_t *sp = &hs_sockets[sock]; hs_socket_t *sp = &hs_sockets[sock];
...@@ -696,21 +681,6 @@ static int hs_set_io_map(unsigned int sock, struct pccard_io_map *io) ...@@ -696,21 +681,6 @@ static int hs_set_io_map(unsigned int sock, struct pccard_io_map *io)
/*============================================================*/ /*============================================================*/
static int hs_get_mem_map(unsigned int sock, struct pccard_mem_map *mem)
{
hs_socket_t *sp = &hs_sockets[sock];
int map = mem->map;
DPRINTK("hs_get_mem_map(%d, %d)\n", sock, map);
if (map >= MAX_WIN)
return -EINVAL;
*mem = sp->mem_maps[map];
return 0;
}
/*============================================================*/
static int hs_set_mem_map(unsigned int sock, struct pccard_mem_map *mem) static int hs_set_mem_map(unsigned int sock, struct pccard_mem_map *mem)
{ {
hs_socket_t *sp = &hs_sockets[sock]; hs_socket_t *sp = &hs_sockets[sock];
...@@ -894,9 +864,7 @@ static struct pccard_operations hs_operations = { ...@@ -894,9 +864,7 @@ static struct pccard_operations hs_operations = {
.get_status = hs_get_status, .get_status = hs_get_status,
.get_socket = hs_get_socket, .get_socket = hs_get_socket,
.set_socket = hs_set_socket, .set_socket = hs_set_socket,
.get_io_map = hs_get_io_map,
.set_io_map = hs_set_io_map, .set_io_map = hs_set_io_map,
.get_mem_map = hs_get_mem_map,
.set_mem_map = hs_set_mem_map, .set_mem_map = hs_set_mem_map,
.proc_setup = hs_proc_setup, .proc_setup = hs_proc_setup,
}; };
......
...@@ -63,9 +63,7 @@ static struct pccard_operations i82092aa_operations = { ...@@ -63,9 +63,7 @@ static struct pccard_operations i82092aa_operations = {
.get_status = i82092aa_get_status, .get_status = i82092aa_get_status,
.get_socket = i82092aa_get_socket, .get_socket = i82092aa_get_socket,
.set_socket = i82092aa_set_socket, .set_socket = i82092aa_set_socket,
.get_io_map = i82092aa_get_io_map,
.set_io_map = i82092aa_set_io_map, .set_io_map = i82092aa_set_io_map,
.get_mem_map = i82092aa_get_mem_map,
.set_mem_map = i82092aa_set_mem_map, .set_mem_map = i82092aa_set_mem_map,
.proc_setup = i82092aa_proc_setup, .proc_setup = i82092aa_proc_setup,
}; };
...@@ -688,34 +686,6 @@ static int i82092aa_set_socket(unsigned int sock, socket_state_t *state) ...@@ -688,34 +686,6 @@ static int i82092aa_set_socket(unsigned int sock, socket_state_t *state)
return 0; return 0;
} }
static int i82092aa_get_io_map(unsigned int sock, struct pccard_io_map *io)
{
unsigned char map, ioctl, addr;
enter("i82092aa_get_io_map");
map = io->map;
if (map > 1) {
leave("i82092aa_get_io_map with -EINVAL");
return -EINVAL;
}
/* FIXME: How does this fit in with the PCI resource (re)allocation */
io->start = indirect_read16(sock, I365_IO(map)+I365_W_START);
io->stop = indirect_read16(sock, I365_IO(map)+I365_W_START);
ioctl = indirect_read(sock,I365_IOCTL); /* IOCREG: I/O Control Register */
addr = indirect_read(sock,I365_ADDRWIN); /* */
io->speed = to_ns(ioctl & I365_IOCTL_WAIT(map)) ? 1 : 0; /* check this out later */
io->flags = 0;
if (addr & I365_IOCTL_16BIT(map))
io->flags |= MAP_AUTOSZ;
leave("i82092aa_get_io_map");
return 0;
}
static int i82092aa_set_io_map(unsigned sock, struct pccard_io_map *io) static int i82092aa_set_io_map(unsigned sock, struct pccard_io_map *io)
{ {
unsigned char map, ioctl; unsigned char map, ioctl;
...@@ -759,64 +729,6 @@ static int i82092aa_set_io_map(unsigned sock, struct pccard_io_map *io) ...@@ -759,64 +729,6 @@ static int i82092aa_set_io_map(unsigned sock, struct pccard_io_map *io)
return 0; return 0;
} }
static int i82092aa_get_mem_map(unsigned sock, struct pccard_mem_map *mem)
{
unsigned short base, i;
unsigned char map, addr;
enter("i82092aa_get_mem_map");
mem->flags = 0;
mem->speed = 0;
map = mem->map;
if (map > 4) {
leave("i82092aa_get_mem_map: -EINVAL");
return -EINVAL;
}
addr = indirect_read(sock, I365_ADDRWIN);
if (addr & I365_ENA_MEM(map))
mem->flags |= MAP_ACTIVE; /* yes this mapping is active */
base = I365_MEM(map);
/* Find the start address - this register also has mapping info */
i = indirect_read16(sock,base+I365_W_START);
if (i & I365_MEM_16BIT)
mem->flags |= MAP_16BIT;
if (i & I365_MEM_0WS)
mem->flags |= MAP_0WS;
mem->sys_start = ((unsigned long)(i & 0x0fff) << 12);
/* Find the end address - this register also has speed info */
i = indirect_read16(sock,base+I365_W_STOP);
if (i & I365_MEM_WS0)
mem->speed = 1;
if (i & I365_MEM_WS1)
mem->speed += 2;
mem->speed = to_ns(mem->speed);
mem->sys_stop = ( (unsigned long)(i & 0x0fff) << 12) + 0x0fff;
/* Find the card start address, also some more MAP attributes */
i = indirect_read16(sock, base+I365_W_OFF);
if (i & I365_MEM_WRPROT)
mem->flags |= MAP_WRPROT;
if (i & I365_MEM_REG)
mem->flags |= MAP_ATTRIB;
mem->card_start = ( (unsigned long)(i & 0x3fff)<12) + mem->sys_start;
mem->card_start &= 0x3ffffff;
printk("Card %i is from %lx to %lx \n",sock,mem->sys_start,mem->sys_stop);
leave("i82092aa_get_mem_map");
return 0;
}
static int i82092aa_set_mem_map(unsigned sock, struct pccard_mem_map *mem) static int i82092aa_set_mem_map(unsigned sock, struct pccard_mem_map *mem)
{ {
unsigned short base, i; unsigned short base, i;
......
...@@ -29,9 +29,7 @@ static void i82092aa_interrupt(int irq, void *dev, struct pt_regs *regs); ...@@ -29,9 +29,7 @@ static void i82092aa_interrupt(int irq, void *dev, struct pt_regs *regs);
static int i82092aa_get_status(unsigned int sock, u_int *value); static int i82092aa_get_status(unsigned int sock, u_int *value);
static int i82092aa_get_socket(unsigned int sock, socket_state_t *state); static int i82092aa_get_socket(unsigned int sock, socket_state_t *state);
static int i82092aa_set_socket(unsigned int sock, socket_state_t *state); static int i82092aa_set_socket(unsigned int sock, socket_state_t *state);
static int i82092aa_get_io_map(unsigned int sock, struct pccard_io_map *io);
static int i82092aa_set_io_map(unsigned int sock, struct pccard_io_map *io); static int i82092aa_set_io_map(unsigned int sock, struct pccard_io_map *io);
static int i82092aa_get_mem_map(unsigned int sock, struct pccard_mem_map *mem);
static int i82092aa_set_mem_map(unsigned int sock, struct pccard_mem_map *mem); static int i82092aa_set_mem_map(unsigned int sock, struct pccard_mem_map *mem);
static int i82092aa_init(unsigned int s); static int i82092aa_init(unsigned int s);
static int i82092aa_suspend(unsigned int sock); static int i82092aa_suspend(unsigned int sock);
......
...@@ -1250,29 +1250,6 @@ static int i365_set_socket(u_short sock, socket_state_t *state) ...@@ -1250,29 +1250,6 @@ static int i365_set_socket(u_short sock, socket_state_t *state)
/*====================================================================*/ /*====================================================================*/
static int i365_get_io_map(u_short sock, struct pccard_io_map *io)
{
u_char map, ioctl, addr;
map = io->map;
if (map > 1) return -EINVAL;
io->start = i365_get_pair(sock, I365_IO(map)+I365_W_START);
io->stop = i365_get_pair(sock, I365_IO(map)+I365_W_STOP);
ioctl = i365_get(sock, I365_IOCTL);
addr = i365_get(sock, I365_ADDRWIN);
io->speed = to_ns(ioctl & I365_IOCTL_WAIT(map)) ? 1 : 0;
io->flags = (addr & I365_ENA_IO(map)) ? MAP_ACTIVE : 0;
io->flags |= (ioctl & I365_IOCTL_0WS(map)) ? MAP_0WS : 0;
io->flags |= (ioctl & I365_IOCTL_16BIT(map)) ? MAP_16BIT : 0;
io->flags |= (ioctl & I365_IOCTL_IOCS16(map)) ? MAP_AUTOSZ : 0;
DEBUG(1, "i82365: GetIOMap(%d, %d) = %#2.2x, %d ns, "
"%#4.4x-%#4.4x\n", sock, map, io->flags, io->speed,
io->start, io->stop);
return 0;
} /* i365_get_io_map */
/*====================================================================*/
static int i365_set_io_map(u_short sock, struct pccard_io_map *io) static int i365_set_io_map(u_short sock, struct pccard_io_map *io)
{ {
u_char map, ioctl; u_char map, ioctl;
...@@ -1302,42 +1279,6 @@ static int i365_set_io_map(u_short sock, struct pccard_io_map *io) ...@@ -1302,42 +1279,6 @@ static int i365_set_io_map(u_short sock, struct pccard_io_map *io)
/*====================================================================*/ /*====================================================================*/
static int i365_get_mem_map(u_short sock, struct pccard_mem_map *mem)
{
u_short base, i;
u_char map, addr;
map = mem->map;
if (map > 4) return -EINVAL;
addr = i365_get(sock, I365_ADDRWIN);
mem->flags = (addr & I365_ENA_MEM(map)) ? MAP_ACTIVE : 0;
base = I365_MEM(map);
i = i365_get_pair(sock, base+I365_W_START);
mem->flags |= (i & I365_MEM_16BIT) ? MAP_16BIT : 0;
mem->flags |= (i & I365_MEM_0WS) ? MAP_0WS : 0;
mem->sys_start = ((u_long)(i & 0x0fff) << 12);
i = i365_get_pair(sock, base+I365_W_STOP);
mem->speed = (i & I365_MEM_WS0) ? 1 : 0;
mem->speed += (i & I365_MEM_WS1) ? 2 : 0;
mem->speed = to_ns(mem->speed);
mem->sys_stop = ((u_long)(i & 0x0fff) << 12) + 0x0fff;
i = i365_get_pair(sock, base+I365_W_OFF);
mem->flags |= (i & I365_MEM_WRPROT) ? MAP_WRPROT : 0;
mem->flags |= (i & I365_MEM_REG) ? MAP_ATTRIB : 0;
mem->card_start = ((u_int)(i & 0x3fff) << 12) + mem->sys_start;
mem->card_start &= 0x3ffffff;
DEBUG(1, "i82365: GetMemMap(%d, %d) = %#2.2x, %d ns, %#5.5lx-%#5."
"5lx, %#5.5x\n", sock, mem->map, mem->flags, mem->speed,
mem->sys_start, mem->sys_stop, mem->card_start);
return 0;
} /* i365_get_mem_map */
/*====================================================================*/
static int i365_set_mem_map(u_short sock, struct pccard_mem_map *mem) static int i365_set_mem_map(u_short sock, struct pccard_mem_map *mem)
{ {
u_short base, i; u_short base, i;
...@@ -1506,14 +1447,6 @@ static int pcic_set_socket(unsigned int sock, socket_state_t *state) ...@@ -1506,14 +1447,6 @@ static int pcic_set_socket(unsigned int sock, socket_state_t *state)
LOCKED(i365_set_socket(sock, state)); LOCKED(i365_set_socket(sock, state));
} }
static int pcic_get_io_map(unsigned int sock, struct pccard_io_map *io)
{
if (socket[sock].flags & IS_ALIVE)
return -EINVAL;
LOCKED(i365_get_io_map(sock, io));
}
static int pcic_set_io_map(unsigned int sock, struct pccard_io_map *io) static int pcic_set_io_map(unsigned int sock, struct pccard_io_map *io)
{ {
if (socket[sock].flags & IS_ALIVE) if (socket[sock].flags & IS_ALIVE)
...@@ -1522,14 +1455,6 @@ static int pcic_set_io_map(unsigned int sock, struct pccard_io_map *io) ...@@ -1522,14 +1455,6 @@ static int pcic_set_io_map(unsigned int sock, struct pccard_io_map *io)
LOCKED(i365_set_io_map(sock, io)); LOCKED(i365_set_io_map(sock, io));
} }
static int pcic_get_mem_map(unsigned int sock, struct pccard_mem_map *mem)
{
if (socket[sock].flags & IS_ALIVE)
return -EINVAL;
LOCKED(i365_get_mem_map(sock, mem));
}
static int pcic_set_mem_map(unsigned int sock, struct pccard_mem_map *mem) static int pcic_set_mem_map(unsigned int sock, struct pccard_mem_map *mem)
{ {
if (socket[sock].flags & IS_ALIVE) if (socket[sock].flags & IS_ALIVE)
...@@ -1571,9 +1496,7 @@ static struct pccard_operations pcic_operations = { ...@@ -1571,9 +1496,7 @@ static struct pccard_operations pcic_operations = {
.get_status = pcic_get_status, .get_status = pcic_get_status,
.get_socket = pcic_get_socket, .get_socket = pcic_get_socket,
.set_socket = pcic_set_socket, .set_socket = pcic_set_socket,
.get_io_map = pcic_get_io_map,
.set_io_map = pcic_set_io_map, .set_io_map = pcic_set_io_map,
.get_mem_map = pcic_get_mem_map,
.set_mem_map = pcic_set_mem_map, .set_mem_map = pcic_set_mem_map,
.proc_setup = pcic_proc_setup, .proc_setup = pcic_proc_setup,
}; };
......
...@@ -105,15 +105,6 @@ static int pci_set_socket(unsigned int sock, socket_state_t *state) ...@@ -105,15 +105,6 @@ static int pci_set_socket(unsigned int sock, socket_state_t *state)
return -EINVAL; return -EINVAL;
} }
static int pci_get_io_map(unsigned int sock, struct pccard_io_map *io)
{
pci_socket_t *socket = pci_socket_array + sock;
if (socket->op && socket->op->get_io_map)
return socket->op->get_io_map(socket, io);
return -EINVAL;
}
static int pci_set_io_map(unsigned int sock, struct pccard_io_map *io) static int pci_set_io_map(unsigned int sock, struct pccard_io_map *io)
{ {
pci_socket_t *socket = pci_socket_array + sock; pci_socket_t *socket = pci_socket_array + sock;
...@@ -123,15 +114,6 @@ static int pci_set_io_map(unsigned int sock, struct pccard_io_map *io) ...@@ -123,15 +114,6 @@ static int pci_set_io_map(unsigned int sock, struct pccard_io_map *io)
return -EINVAL; return -EINVAL;
} }
static int pci_get_mem_map(unsigned int sock, struct pccard_mem_map *mem)
{
pci_socket_t *socket = pci_socket_array + sock;
if (socket->op && socket->op->get_mem_map)
return socket->op->get_mem_map(socket, mem);
return -EINVAL;
}
static int pci_set_mem_map(unsigned int sock, struct pccard_mem_map *mem) static int pci_set_mem_map(unsigned int sock, struct pccard_mem_map *mem)
{ {
pci_socket_t *socket = pci_socket_array + sock; pci_socket_t *socket = pci_socket_array + sock;
...@@ -158,9 +140,7 @@ static struct pccard_operations pci_socket_operations = { ...@@ -158,9 +140,7 @@ static struct pccard_operations pci_socket_operations = {
.get_status = pci_get_status, .get_status = pci_get_status,
.get_socket = pci_get_socket, .get_socket = pci_get_socket,
.set_socket = pci_set_socket, .set_socket = pci_set_socket,
.get_io_map = pci_get_io_map,
.set_io_map = pci_set_io_map, .set_io_map = pci_set_io_map,
.get_mem_map = pci_get_mem_map,
.set_mem_map = pci_set_mem_map, .set_mem_map = pci_set_mem_map,
.proc_setup = pci_proc_setup, .proc_setup = pci_proc_setup,
}; };
......
...@@ -37,9 +37,7 @@ struct pci_socket_ops { ...@@ -37,9 +37,7 @@ struct pci_socket_ops {
int (*get_status)(struct pci_socket *, unsigned int *); int (*get_status)(struct pci_socket *, unsigned int *);
int (*get_socket)(struct pci_socket *, socket_state_t *); int (*get_socket)(struct pci_socket *, socket_state_t *);
int (*set_socket)(struct pci_socket *, socket_state_t *); int (*set_socket)(struct pci_socket *, socket_state_t *);
int (*get_io_map)(struct pci_socket *, struct pccard_io_map *);
int (*set_io_map)(struct pci_socket *, struct pccard_io_map *); int (*set_io_map)(struct pci_socket *, struct pccard_io_map *);
int (*get_mem_map)(struct pci_socket *, struct pccard_mem_map *);
int (*set_mem_map)(struct pci_socket *, struct pccard_mem_map *); int (*set_mem_map)(struct pci_socket *, struct pccard_mem_map *);
void (*proc_setup)(struct pci_socket *, struct proc_dir_entry *base); void (*proc_setup)(struct pci_socket *, struct proc_dir_entry *base);
}; };
......
...@@ -170,9 +170,7 @@ static struct pci_socket_ops ricoh_ops = { ...@@ -170,9 +170,7 @@ static struct pci_socket_ops ricoh_ops = {
yenta_get_status, yenta_get_status,
yenta_get_socket, yenta_get_socket,
yenta_set_socket, yenta_set_socket,
yenta_get_io_map,
yenta_set_io_map, yenta_set_io_map,
yenta_get_mem_map,
yenta_set_mem_map, yenta_set_mem_map,
yenta_proc_setup yenta_proc_setup
}; };
......
This diff is collapsed.
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
#include <pcmcia/cs_types.h> #include <pcmcia/cs_types.h>
#include <pcmcia/cs.h> #include <pcmcia/cs.h>
#include <pcmcia/ss.h> #include <pcmcia/ss.h>
#include <pcmcia/bus_ops.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -567,31 +566,6 @@ sa1100_pcmcia_set_socket(unsigned int sock, socket_state_t *state) ...@@ -567,31 +566,6 @@ sa1100_pcmcia_set_socket(unsigned int sock, socket_state_t *state)
} /* sa1100_pcmcia_set_socket() */ } /* sa1100_pcmcia_set_socket() */
/* sa1100_pcmcia_get_io_map()
* ^^^^^^^^^^^^^^^^^^^^^^^^^^
* Implements the get_io_map() operation for the in-kernel PCMCIA
* service (formerly SS_GetIOMap in Card Services). Just returns an
* I/O map descriptor which was assigned earlier by a set_io_map().
*
* Returns: 0 on success, -1 if the map index was out of range
*/
static int
sa1100_pcmcia_get_io_map(unsigned int sock, struct pccard_io_map *map)
{
struct sa1100_pcmcia_socket *skt = PCMCIA_SOCKET(sock);
int ret = -1;
DEBUG(2, "%s() for sock %u\n", __FUNCTION__, sock);
if (map->map < MAX_IO_WIN) {
*map = skt->io_map[map->map];
ret = 0;
}
return ret;
}
/* sa1100_pcmcia_set_io_map() /* sa1100_pcmcia_set_io_map()
* ^^^^^^^^^^^^^^^^^^^^^^^^^^ * ^^^^^^^^^^^^^^^^^^^^^^^^^^
* Implements the set_io_map() operation for the in-kernel PCMCIA * Implements the set_io_map() operation for the in-kernel PCMCIA
...@@ -646,32 +620,6 @@ sa1100_pcmcia_set_io_map(unsigned int sock, struct pccard_io_map *map) ...@@ -646,32 +620,6 @@ sa1100_pcmcia_set_io_map(unsigned int sock, struct pccard_io_map *map)
} /* sa1100_pcmcia_set_io_map() */ } /* sa1100_pcmcia_set_io_map() */
/* sa1100_pcmcia_get_mem_map()
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^
* Implements the get_mem_map() operation for the in-kernel PCMCIA
* service (formerly SS_GetMemMap in Card Services). Just returns a
* memory map descriptor which was assigned earlier by a
* set_mem_map() request.
*
* Returns: 0 on success, -1 if the map index was out of range
*/
static int
sa1100_pcmcia_get_mem_map(unsigned int sock, struct pccard_mem_map *map)
{
struct sa1100_pcmcia_socket *skt = PCMCIA_SOCKET(sock);
int ret = -1;
DEBUG(2, "%s() for sock %u\n", __FUNCTION__, sock);
if (map->map < MAX_WIN) {
*map = skt->pc_mem_map[map->map];
ret = 0;
}
return ret;
}
/* sa1100_pcmcia_set_mem_map() /* sa1100_pcmcia_set_mem_map()
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^ * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
* Implements the set_mem_map() operation for the in-kernel PCMCIA * Implements the set_mem_map() operation for the in-kernel PCMCIA
...@@ -841,9 +789,7 @@ static struct pccard_operations sa1100_pcmcia_operations = { ...@@ -841,9 +789,7 @@ static struct pccard_operations sa1100_pcmcia_operations = {
.get_status = sa1100_pcmcia_get_status, .get_status = sa1100_pcmcia_get_status,
.get_socket = sa1100_pcmcia_get_socket, .get_socket = sa1100_pcmcia_get_socket,
.set_socket = sa1100_pcmcia_set_socket, .set_socket = sa1100_pcmcia_set_socket,
.get_io_map = sa1100_pcmcia_get_io_map,
.set_io_map = sa1100_pcmcia_set_io_map, .set_io_map = sa1100_pcmcia_set_io_map,
.get_mem_map = sa1100_pcmcia_get_mem_map,
.set_mem_map = sa1100_pcmcia_set_mem_map, .set_mem_map = sa1100_pcmcia_set_mem_map,
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
.proc_setup = sa1100_pcmcia_proc_setup .proc_setup = sa1100_pcmcia_proc_setup
......
...@@ -806,44 +806,6 @@ static int tcic_set_socket(unsigned int lsock, socket_state_t *state) ...@@ -806,44 +806,6 @@ static int tcic_set_socket(unsigned int lsock, socket_state_t *state)
/*====================================================================*/ /*====================================================================*/
static int tcic_get_io_map(unsigned int lsock, struct pccard_io_map *io)
{
u_short psock = socket_table[lsock].psock;
u_short base, ioctl;
u_int addr;
if (io->map > 1) return -EINVAL;
tcic_setw(TCIC_ADDR+2, TCIC_ADR2_INDREG | (psock << TCIC_SS_SHFT));
addr = TCIC_IWIN(psock, io->map);
tcic_setw(TCIC_ADDR, addr + TCIC_IBASE_X);
base = tcic_getw(TCIC_DATA);
tcic_setw(TCIC_ADDR, addr + TCIC_ICTL_X);
ioctl = tcic_getw(TCIC_DATA);
if (ioctl & TCIC_ICTL_TINY)
io->start = io->stop = base;
else {
io->start = base & (base-1);
io->stop = io->start + (base ^ (base-1));
}
io->speed = to_ns(ioctl & TCIC_ICTL_WSCNT_MASK);
io->flags = (ioctl & TCIC_ICTL_ENA) ? MAP_ACTIVE : 0;
switch (ioctl & TCIC_ICTL_BW_MASK) {
case TCIC_ICTL_BW_DYN:
io->flags |= MAP_AUTOSZ; break;
case TCIC_ICTL_BW_16:
io->flags |= MAP_16BIT; break;
default:
break;
}
DEBUG(1, "tcic: GetIOMap(%d, %d) = %#2.2x, %d ns, "
"%#4.4x-%#4.4x\n", lsock, io->map, io->flags,
io->speed, io->start, io->stop);
return 0;
} /* tcic_get_io_map */
/*====================================================================*/
static int tcic_set_io_map(unsigned int lsock, struct pccard_io_map *io) static int tcic_set_io_map(unsigned int lsock, struct pccard_io_map *io)
{ {
u_short psock = socket_table[lsock].psock; u_short psock = socket_table[lsock].psock;
...@@ -881,51 +843,6 @@ static int tcic_set_io_map(unsigned int lsock, struct pccard_io_map *io) ...@@ -881,51 +843,6 @@ static int tcic_set_io_map(unsigned int lsock, struct pccard_io_map *io)
/*====================================================================*/ /*====================================================================*/
static int tcic_get_mem_map(unsigned int lsock, struct pccard_mem_map *mem)
{
u_short psock = socket_table[lsock].psock;
u_short addr, ctl;
u_long base, mmap;
if (mem->map > 3) return -EINVAL;
tcic_setw(TCIC_ADDR+2, TCIC_ADR2_INDREG | (psock << TCIC_SS_SHFT));
addr = TCIC_MWIN(psock, mem->map);
tcic_setw(TCIC_ADDR, addr + TCIC_MBASE_X);
base = tcic_getw(TCIC_DATA);
if (base & TCIC_MBASE_4K_BIT) {
mem->sys_start = base & TCIC_MBASE_HA_MASK;
mem->sys_stop = mem->sys_start;
} else {
base &= TCIC_MBASE_HA_MASK;
mem->sys_start = (base & (base-1));
mem->sys_stop = mem->sys_start + (base ^ (base-1));
}
mem->sys_start = mem->sys_start << TCIC_MBASE_HA_SHFT;
mem->sys_stop = (mem->sys_stop << TCIC_MBASE_HA_SHFT) + 0x0fff;
tcic_setw(TCIC_ADDR, addr + TCIC_MMAP_X);
mmap = tcic_getw(TCIC_DATA);
mem->flags = (mmap & TCIC_MMAP_REG) ? MAP_ATTRIB : 0;
mmap &= TCIC_MMAP_CA_MASK;
mem->card_start = mem->sys_start + (mmap << TCIC_MMAP_CA_SHFT);
mem->card_start &= 0x3ffffff;
tcic_setw(TCIC_ADDR, addr + TCIC_MCTL_X);
ctl = tcic_getw(TCIC_DATA);
mem->flags |= (ctl & TCIC_MCTL_ENA) ? MAP_ACTIVE : 0;
mem->flags |= (ctl & TCIC_MCTL_B8) ? 0 : MAP_16BIT;
mem->flags |= (ctl & TCIC_MCTL_WP) ? MAP_WRPROT : 0;
mem->speed = to_ns(ctl & TCIC_MCTL_WSCNT_MASK);
DEBUG(1, "tcic: GetMemMap(%d, %d) = %#2.2x, %d ns, "
"%#5.5lx-%#5.5lx, %#5.5x\n", lsock, mem->map, mem->flags,
mem->speed, mem->sys_start, mem->sys_stop, mem->card_start);
return 0;
} /* tcic_get_mem_map */
/*====================================================================*/
static int tcic_set_mem_map(unsigned int lsock, struct pccard_mem_map *mem) static int tcic_set_mem_map(unsigned int lsock, struct pccard_mem_map *mem)
{ {
u_short psock = socket_table[lsock].psock; u_short psock = socket_table[lsock].psock;
...@@ -1007,9 +924,7 @@ static struct pccard_operations tcic_operations = { ...@@ -1007,9 +924,7 @@ static struct pccard_operations tcic_operations = {
.get_status = tcic_get_status, .get_status = tcic_get_status,
.get_socket = tcic_get_socket, .get_socket = tcic_get_socket,
.set_socket = tcic_set_socket, .set_socket = tcic_set_socket,
.get_io_map = tcic_get_io_map,
.set_io_map = tcic_set_io_map, .set_io_map = tcic_set_io_map,
.get_mem_map = tcic_get_mem_map,
.set_mem_map = tcic_set_mem_map, .set_mem_map = tcic_set_mem_map,
.proc_setup = tcic_proc_setup, .proc_setup = tcic_proc_setup,
}; };
......
...@@ -185,9 +185,7 @@ static struct pci_socket_ops ti_ops = { ...@@ -185,9 +185,7 @@ static struct pci_socket_ops ti_ops = {
yenta_get_status, yenta_get_status,
yenta_get_socket, yenta_get_socket,
yenta_set_socket, yenta_set_socket,
yenta_get_io_map,
yenta_set_io_map, yenta_set_io_map,
yenta_get_mem_map,
yenta_set_mem_map, yenta_set_mem_map,
yenta_proc_setup yenta_proc_setup
}; };
...@@ -230,9 +228,7 @@ static struct pci_socket_ops ti113x_ops = { ...@@ -230,9 +228,7 @@ static struct pci_socket_ops ti113x_ops = {
yenta_get_status, yenta_get_status,
yenta_get_socket, yenta_get_socket,
yenta_set_socket, yenta_set_socket,
yenta_get_io_map,
yenta_set_io_map, yenta_set_io_map,
yenta_get_mem_map,
yenta_set_mem_map, yenta_set_mem_map,
yenta_proc_setup yenta_proc_setup
}; };
...@@ -272,9 +268,7 @@ static struct pci_socket_ops ti1250_ops = { ...@@ -272,9 +268,7 @@ static struct pci_socket_ops ti1250_ops = {
yenta_get_status, yenta_get_status,
yenta_get_socket, yenta_get_socket,
yenta_set_socket, yenta_set_socket,
yenta_get_io_map,
yenta_set_io_map, yenta_set_io_map,
yenta_get_mem_map,
yenta_set_mem_map, yenta_set_mem_map,
yenta_proc_setup yenta_proc_setup
}; };
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "i82365.h" #include "i82365.h"
#if 0 #if 0
#define DEBUG(x,args...) printk(__FUNCTION__ ": " x,##args) #define DEBUG(x,args...) printk("%s: " x, __FUNCTION__, ##args)
#else #else
#define DEBUG(x,args...) #define DEBUG(x,args...)
#endif #endif
...@@ -300,29 +300,6 @@ static int yenta_set_socket(pci_socket_t *socket, socket_state_t *state) ...@@ -300,29 +300,6 @@ static int yenta_set_socket(pci_socket_t *socket, socket_state_t *state)
return 0; return 0;
} }
static int yenta_get_io_map(pci_socket_t *socket, struct pccard_io_map *io)
{
int map;
unsigned char ioctl, addr;
map = io->map;
if (map > 1)
return -EINVAL;
io->start = exca_readw(socket, I365_IO(map)+I365_W_START);
io->stop = exca_readw(socket, I365_IO(map)+I365_W_STOP);
ioctl = exca_readb(socket, I365_IOCTL);
addr = exca_readb(socket, I365_ADDRWIN);
io->speed = to_ns(ioctl & I365_IOCTL_WAIT(map)) ? 1 : 0;
io->flags = (addr & I365_ENA_IO(map)) ? MAP_ACTIVE : 0;
io->flags |= (ioctl & I365_IOCTL_0WS(map)) ? MAP_0WS : 0;
io->flags |= (ioctl & I365_IOCTL_16BIT(map)) ? MAP_16BIT : 0;
io->flags |= (ioctl & I365_IOCTL_IOCS16(map)) ? MAP_AUTOSZ : 0;
return 0;
}
static int yenta_set_io_map(pci_socket_t *socket, struct pccard_io_map *io) static int yenta_set_io_map(pci_socket_t *socket, struct pccard_io_map *io)
{ {
int map; int map;
...@@ -356,41 +333,6 @@ static int yenta_set_io_map(pci_socket_t *socket, struct pccard_io_map *io) ...@@ -356,41 +333,6 @@ static int yenta_set_io_map(pci_socket_t *socket, struct pccard_io_map *io)
return 0; return 0;
} }
static int yenta_get_mem_map(pci_socket_t *socket, struct pccard_mem_map *mem)
{
int map;
unsigned char addr;
unsigned int start, stop, page, offset;
map = mem->map;
if (map > 4)
return -EINVAL;
addr = exca_readb(socket, I365_ADDRWIN);
mem->flags = (addr & I365_ENA_MEM(map)) ? MAP_ACTIVE : 0;
start = exca_readw(socket, I365_MEM(map) + I365_W_START);
mem->flags |= (start & I365_MEM_16BIT) ? MAP_16BIT : 0;
mem->flags |= (start & I365_MEM_0WS) ? MAP_0WS : 0;
start = (start & 0x0fff) << 12;
stop = exca_readw(socket, I365_MEM(map) + I365_W_STOP);
mem->speed = to_ns(stop >> 14);
stop = ((stop & 0x0fff) << 12) + 0x0fff;
offset = exca_readw(socket, I365_MEM(map) + I365_W_OFF);
mem->flags |= (offset & I365_MEM_WRPROT) ? MAP_WRPROT : 0;
mem->flags |= (offset & I365_MEM_REG) ? MAP_ATTRIB : 0;
offset = ((offset & 0x3fff) << 12) + start;
mem->card_start = offset & 0x3ffffff;
page = exca_readb(socket, CB_MEM_PAGE(map)) << 24;
mem->sys_start = start + page;
mem->sys_stop = start + page;
return 0;
}
static int yenta_set_mem_map(pci_socket_t *socket, struct pccard_mem_map *mem) static int yenta_set_mem_map(pci_socket_t *socket, struct pccard_mem_map *mem)
{ {
int map; int map;
...@@ -572,7 +514,6 @@ static void yenta_get_socket_capabilities(pci_socket_t *socket, u32 isa_irq_mask ...@@ -572,7 +514,6 @@ static void yenta_get_socket_capabilities(pci_socket_t *socket, u32 isa_irq_mask
socket->cap.pci_irq = socket->cb_irq; socket->cap.pci_irq = socket->cb_irq;
socket->cap.irq_mask = yenta_probe_irq(socket, isa_irq_mask); socket->cap.irq_mask = yenta_probe_irq(socket, isa_irq_mask);
socket->cap.cb_dev = socket->dev; socket->cap.cb_dev = socket->dev;
socket->cap.bus = NULL;
printk("Yenta IRQ list %04x, PCI irq%d\n", socket->cap.irq_mask, socket->cb_irq); printk("Yenta IRQ list %04x, PCI irq%d\n", socket->cap.irq_mask, socket->cb_irq);
} }
...@@ -935,9 +876,7 @@ struct pci_socket_ops yenta_operations = { ...@@ -935,9 +876,7 @@ struct pci_socket_ops yenta_operations = {
yenta_get_status, yenta_get_status,
yenta_get_socket, yenta_get_socket,
yenta_set_socket, yenta_set_socket,
yenta_get_io_map,
yenta_set_io_map, yenta_set_io_map,
yenta_get_mem_map,
yenta_set_mem_map, yenta_set_mem_map,
yenta_proc_setup yenta_proc_setup
}; };
......
...@@ -62,7 +62,6 @@ ...@@ -62,7 +62,6 @@
#include <pcmcia/cistpl.h> #include <pcmcia/cistpl.h>
#include <pcmcia/cisreg.h> #include <pcmcia/cisreg.h>
#include <pcmcia/ds.h> #include <pcmcia/ds.h>
#include <pcmcia/bus_ops.h>
#include "nsp_cs.h" #include "nsp_cs.h"
...@@ -93,7 +92,6 @@ typedef struct scsi_info_t { ...@@ -93,7 +92,6 @@ typedef struct scsi_info_t {
int ndev; int ndev;
dev_node_t node[8]; dev_node_t node[8];
int stop; int stop;
struct bus_operations *bus;
} scsi_info_t; } scsi_info_t;
...@@ -1948,7 +1946,6 @@ static int nsp_cs_event(event_t event, ...@@ -1948,7 +1946,6 @@ static int nsp_cs_event(event_t event,
case CS_EVENT_CARD_INSERTION: case CS_EVENT_CARD_INSERTION:
DEBUG(0, " event: insert\n"); DEBUG(0, " event: insert\n");
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
info->bus = args->bus;
nsp_cs_config(link); nsp_cs_config(link);
break; break;
......
/* /* now empty */
* bus_ops.h 1.10 2000/06/12 21:55:41 #warning please remove the reference to this file
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License
* at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
* <dahinds@users.sourceforge.net>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License version 2 (the "GPL"), in which
* case the provisions of the GPL are applicable instead of the
* above. If you wish to allow the use of your version of this file
* only under the terms of the GPL and not to allow others to use
* your version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice and
* other provisions required by the GPL. If you do not delete the
* provisions above, a recipient may use your version of this file
* under either the MPL or the GPL.
*/
#ifndef _LINUX_BUS_OPS_H
#define _LINUX_BUS_OPS_H
#include <linux/config.h>
#ifdef CONFIG_VIRTUAL_BUS
typedef struct bus_operations {
void *priv;
u32 (*b_in)(void *bus, u32 port, s32 sz);
void (*b_ins)(void *bus, u32 port, void *buf,
u32 count, s32 sz);
void (*b_out)(void *bus, u32 val, u32 port, s32 sz);
void (*b_outs)(void *bus, u32 port, void *buf,
u32 count, s32 sz);
void *(*b_ioremap)(void *bus, u_long ofs, u_long sz);
void (*b_iounmap)(void *bus, void *addr);
u32 (*b_read)(void *bus, void *addr, s32 sz);
void (*b_write)(void *bus, u32 val, void *addr, s32 sz);
void (*b_copy_from)(void *bus, void *d, void *s, u32 count);
void (*b_copy_to)(void *bus, void *d, void *s, u32 count);
int (*b_request_irq)(void *bus, u_int irq,
void (*handler)(int, void *,
struct pt_regs *),
u_long flags, const char *device,
void *dev_id);
void (*b_free_irq)(void *bus, u_int irq, void *dev_id);
} bus_operations;
#define bus_inb(b,p) (b)->b_in((b),(p),0)
#define bus_inw(b,p) (b)->b_in((b),(p),1)
#define bus_inl(b,p) (b)->b_in((b),(p),2)
#define bus_inw_ns(b,p) (b)->b_in((b),(p),-1)
#define bus_inl_ns(b,p) (b)->b_in((b),(p),-2)
#define bus_insb(b,p,a,c) (b)->b_ins((b),(p),(a),(c),0)
#define bus_insw(b,p,a,c) (b)->b_ins((b),(p),(a),(c),1)
#define bus_insl(b,p,a,c) (b)->b_ins((b),(p),(a),(c),2)
#define bus_insw_ns(b,p,a,c) (b)->b_ins((b),(p),(a),(c),-1)
#define bus_insl_ns(b,p,a,c) (b)->b_ins((b),(p),(a),(c),-2)
#define bus_outb(b,v,p) (b)->b_out((b),(v),(p),0)
#define bus_outw(b,v,p) (b)->b_out((b),(v),(p),1)
#define bus_outl(b,v,p) (b)->b_out((b),(v),(p),2)
#define bus_outw_ns(b,v,p) (b)->b_out((b),(v),(p),-1)
#define bus_outl_ns(b,v,p) (b)->b_out((b),(v),(p),-2)
#define bus_outsb(b,p,a,c) (b)->b_outs((b),(p),(a),(c),0)
#define bus_outsw(b,p,a,c) (b)->b_outs((b),(p),(a),(c),1)
#define bus_outsl(b,p,a,c) (b)->b_outs((b),(p),(a),(c),2)
#define bus_outsw_ns(b,p,a,c) (b)->b_outs((b),(p),(a),(c),-1)
#define bus_outsl_ns(b,p,a,c) (b)->b_outs((b),(p),(a),(c),-2)
#define bus_readb(b,a) (b)->b_read((b),(a),0)
#define bus_readw(b,a) (b)->b_read((b),(a),1)
#define bus_readl(b,a) (b)->b_read((b),(a),2)
#define bus_readw_ns(b,a) (b)->b_read((b),(a),-1)
#define bus_readl_ns(b,a) (b)->b_read((b),(a),-2)
#define bus_writeb(b,v,a) (b)->b_write((b),(v),(a),0)
#define bus_writew(b,v,a) (b)->b_write((b),(v),(a),1)
#define bus_writel(b,v,a) (b)->b_write((b),(v),(a),2)
#define bus_writew_ns(b,v,a) (b)->b_write((b),(v),(a),-1)
#define bus_writel_ns(b,v,a) (b)->b_write((b),(v),(a),-2)
#define bus_ioremap(b,s,n) (b)->b_ioremap((b),(s),(n))
#define bus_iounmap(b,a) (b)->b_iounmap((b),(a))
#define bus_memcpy_fromio(b,d,s,n) (b)->b_copy_from((b),(d),(s),(n))
#define bus_memcpy_toio(b,d,s,n) (b)->b_copy_to((b),(d),(s),(n))
#define bus_request_irq(b,i,h,f,n,d) \
(b)->b_request_irq((b),(i),(h),(f),(n),(d))
#define bus_free_irq(b,i,d) (b)->b_free_irq((b),(i),(d))
#else
#define bus_inb(b,p) inb(p)
#define bus_inw(b,p) inw(p)
#define bus_inl(b,p) inl(p)
#define bus_inw_ns(b,p) inw_ns(p)
#define bus_inl_ns(b,p) inl_ns(p)
#define bus_insb(b,p,a,c) insb(p,a,c)
#define bus_insw(b,p,a,c) insw(p,a,c)
#define bus_insl(b,p,a,c) insl(p,a,c)
#define bus_insw_ns(b,p,a,c) insw_ns(p,a,c)
#define bus_insl_ns(b,p,a,c) insl_ns(p,a,c)
#define bus_outb(b,v,p) outb(b,v,p)
#define bus_outw(b,v,p) outw(b,v,p)
#define bus_outl(b,v,p) outl(b,v,p)
#define bus_outw_ns(b,v,p) outw_ns(b,v,p)
#define bus_outl_ns(b,v,p) outl_ns(b,v,p)
#define bus_outsb(b,p,a,c) outsb(p,a,c)
#define bus_outsw(b,p,a,c) outsw(p,a,c)
#define bus_outsl(b,p,a,c) outsl(p,a,c)
#define bus_outsw_ns(b,p,a,c) outsw_ns(p,a,c)
#define bus_outsl_ns(b,p,a,c) outsl_ns(p,a,c)
#define bus_readb(b,a) readb(a)
#define bus_readw(b,a) readw(a)
#define bus_readl(b,a) readl(a)
#define bus_readw_ns(b,a) readw_ns(a)
#define bus_readl_ns(b,a) readl_ns(a)
#define bus_writeb(b,v,a) writeb(v,a)
#define bus_writew(b,v,a) writew(v,a)
#define bus_writel(b,v,a) writel(v,a)
#define bus_writew_ns(b,v,a) writew_ns(v,a)
#define bus_writel_ns(b,v,a) writel_ns(v,a)
#define bus_ioremap(b,s,n) ioremap(s,n)
#define bus_iounmap(b,a) iounmap(a)
#define bus_memcpy_fromio(b,d,s,n) memcpy_fromio(d,s,n)
#define bus_memcpy_toio(b,d,s,n) memcpy_toio(d,s,n)
#define bus_request_irq(b,i,h,f,n,d) request_irq((i),(h),(f),(n),(d))
#define bus_free_irq(b,i,d) free_irq((i),(d))
#endif /* CONFIG_VIRTUAL_BUS */
#endif /* _LINUX_BUS_OPS_H */
...@@ -98,7 +98,6 @@ typedef struct event_callback_args_t { ...@@ -98,7 +98,6 @@ typedef struct event_callback_args_t {
void *buffer; void *buffer;
void *misc; void *misc;
void *client_data; void *client_data;
struct bus_operations *bus;
} event_callback_args_t; } event_callback_args_t;
/* for GetConfigurationInfo */ /* for GetConfigurationInfo */
......
...@@ -58,7 +58,6 @@ typedef struct socket_cap_t { ...@@ -58,7 +58,6 @@ typedef struct socket_cap_t {
ioaddr_t io_offset; ioaddr_t io_offset;
u_char pci_irq; u_char pci_irq;
struct pci_dev *cb_dev; struct pci_dev *cb_dev;
struct bus_operations *bus;
} socket_cap_t; } socket_cap_t;
/* InquireSocket capabilities */ /* InquireSocket capabilities */
...@@ -134,9 +133,7 @@ struct pccard_operations { ...@@ -134,9 +133,7 @@ struct pccard_operations {
int (*get_status)(unsigned int sock, u_int *value); int (*get_status)(unsigned int sock, u_int *value);
int (*get_socket)(unsigned int sock, socket_state_t *state); int (*get_socket)(unsigned int sock, socket_state_t *state);
int (*set_socket)(unsigned int sock, socket_state_t *state); int (*set_socket)(unsigned int sock, socket_state_t *state);
int (*get_io_map)(unsigned int sock, struct pccard_io_map *io);
int (*set_io_map)(unsigned int sock, struct pccard_io_map *io); int (*set_io_map)(unsigned int sock, struct pccard_io_map *io);
int (*get_mem_map)(unsigned int sock, struct pccard_mem_map *mem);
int (*set_mem_map)(unsigned int sock, struct pccard_mem_map *mem); int (*set_mem_map)(unsigned int sock, struct pccard_mem_map *mem);
void (*proc_setup)(unsigned int sock, struct proc_dir_entry *base); void (*proc_setup)(unsigned int sock, struct proc_dir_entry *base);
}; };
......
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