PCMCIA changes
Subsystems (3)
Linus, please do a
bk pull bk://bk.arm.linux.org.uk/linux-2.5-pcmcia
to include PCMCIA changes listed below. Patches for each cset will follow on LKML.
Please note that I haven't been able to thoroughly test just these patches as a stand alone set since yenta.c needs further patches to make it usable on my ARM Cardbus machine.
A subset of these, from 1.889.359.1 to 1.889.359.7 have been in 2.5.65-mm for a while, along with an additional pcmcia patch. This additional patch has been dropped due to reported problems. Since we now have the PCI changes in place, 1.889.359.8 is included, which converts cardbus to use more of the PCI layer.
Also, hch sent me a Makefile cleanup, which appears as the last cset.
The whole patch was sent for the -ac and -mm trees on Monday, but there haven't been any new -ac trees released, and it seems to have been missed for -mm, although Alan says: "mae darnau pcmcia edrych iawn / the pcmcia patches look fine".
I am currently receiving a number of requests to get this merged.
This will update the following files:
drivers/char/pcmcia/synclink_cs.c | 3 drivers/isdn/hisax/elsa_cs.c | 7 drivers/isdn/hisax/sedlbauer_cs.c | 7 drivers/pci/Makefile | 3 drivers/pcmcia/Kconfig | 4 drivers/pcmcia/Makefile | 69 ++++----- drivers/pcmcia/cardbus.c | 195 +++++--------------------- drivers/pcmcia/cistpl.c | 281 ++++++++++++++++---------------------- drivers/pcmcia/cs.c | 36 +--- drivers/pcmcia/cs_internal.h | 7 drivers/pcmcia/hd64465_ss.c | 32 ---- drivers/pcmcia/i82092.c | 88 ----------- drivers/pcmcia/i82092aa.h | 2 drivers/pcmcia/i82365.c | 77 ---------- drivers/pcmcia/pci_socket.c | 20 -- drivers/pcmcia/pci_socket.h | 2 drivers/pcmcia/ricoh.h | 2 drivers/pcmcia/rsrc_mgr.c | 273 ++++++++++++++++++++++++++---------- drivers/pcmcia/sa1100_generic.c | 54 ------- drivers/pcmcia/tcic.c | 85 ----------- drivers/pcmcia/ti113x.h | 6 drivers/pcmcia/yenta.c | 63 -------- drivers/scsi/pcmcia/nsp_cs.c | 3 include/pcmcia/bus_ops.h | 154 -------------------- include/pcmcia/cs.h | 1 include/pcmcia/ss.h | 3 26 files changed, 416 insertions, 1061 deletions
through these ChangeSets:
<[email protected].(none)> (03/03/24 1.889.359.9)
[PCMCIA] drivers/pcmcia/Makefile tidyups (1) use the builtin foo-$(BAR) mechanism of the 2.5 kbuild (2) align all += foo.o statements
<[email protected]> (03/03/23 1.889.359.8)
[PCMCIA] pcmcia-10: Make cardbus use the new PCI functionality.
Now that we have the critical PCI changes in place, we can convert cardbus to use this PCI functionality. This allows us to scan behind PCI to PCI bridges on cardbus cards, and setup the bus resources using the generic PCI support code.
Note that drivers/pci/setup-bus.c needs to be built when hotplug (ie, cardbus) is enabled.
<[email protected]> (03/03/23 1.889.359.7)
[PCMCIA] pcmcia-8/9: Clean up CIS setup.
- Re-order functions in cistpl.c.
- Combine setup_cis_mem and set_cis_map into one function.
- Move cis_readable(), checksum() and checksum_match() into rsrc_mgr.c
- Only pass the socket structure to validate_mem()
- Remove socket_info_t *vs variable, and the race condition along with it.
- Pass the socket_info_t through validate_mem(), do_mem_probe() and inv_probe() to these functions.
- Call cis_readable() and checksum_match() directly from do_mem_probe().
<[email protected]> (03/03/22 1.889.359.6)
[PCMCIA] pcmcia-7: Remove cb_enable() and cb_disable()
Remove support for the old PCMCIA cardbus clients - all cardbus drivers should be converted to be full-class PCI citizens.
<[email protected]> (03/03/18 1.889.359.5)
[PCMCIA] pcmcia-6: s/CONFIG_ISA/CONFIG_PCMCIA_PROBE/
Remove the dependence of the PCMCIA layer on CONFIG_ISA - introduce CONFIG_PCMCIA_PROBE to determine whether we need the resource handling code. This prevents oopsen on SA11x0 and similar platforms which use statically mapped, non-windowed sockets.
<[email protected]> (03/03/18 1.889.359.4)
[PCMCIA] pcmcia-5: Add locking to resource manager.
Add an element of locking to the resource manager - don't allow the PCMCIA resource lists to be changed while the pcmcia code is scanning them.
<[email protected]> (03/03/17 1.889.359.3)
[PCMCIA] pcmcia-4: introduce SOCKET_CARDBUS_CONFIG
Cardbus uses socket->cb_config to detect when the cardbus card has been initialised. Since cb_config will eventually die, we need a solution - introduce the SOCKET_CARDBUS_CONFIG flag, which is set once we have initialised the cardbus socket.
<[email protected]> (03/03/17 1.889.359.2)
[PCMCIA] pcmcia-3: Remove bus_ops abstractions.
Remove bus_* abstractions from PCMCIA core and PCMCIA drivers; they are unused.
<[email protected]> (03/03/17 1.889.359.1)
[PCMCIA] pcmcia-2: Remove get_io_map and get_mem_map socket methods.
get_io_map and get_mem_map PCMCIA socket methods are never called by the PCMCIA core code. They are therefore dead code, and can be removed.
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Re: [BK PULL] (1/9) PCMCIA changes
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.889.342.35 -> 1.889.359.1
# drivers/pcmcia/i82092aa.h 1.2 -> 1.3
# drivers/pcmcia/pci_socket.h 1.4 -> 1.5
# drivers/pcmcia/ti113x.h 1.4 -> 1.5
# drivers/pcmcia/ricoh.h 1.4 -> 1.5
# drivers/pcmcia/tcic.c 1.16 -> 1.17
# drivers/pcmcia/hd64465_ss.c 1.11 -> 1.12
# drivers/pcmcia/yenta.c 1.19 -> 1.20
# drivers/pcmcia/sa1100_generic.c 1.26 -> 1.27
# drivers/pcmcia/i82365.c 1.24 -> 1.25
# include/pcmcia/ss.h 1.7 -> 1.8
# drivers/pcmcia/pci_socket.c 1.13 -> 1.14
# drivers/pcmcia/i82092.c 1.13 -> 1.14
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/03/17 [email protected] 1.889.359.1
# [PCMCIA] pcmcia-2: Remove get_io_map and get_mem_map socket methods. #
# get_io_map and get_mem_map PCMCIA socket methods are never called # by the PCMCIA core code. They are therefore dead code, and can be # removed. # -------------------------------------------- # diff -Nru a/drivers/pcmcia/hd64465_ss.c b/drivers/pcmcia/hd64465_ss.c --- a/drivers/pcmcia/hd64465_ss.c Wed Mar 26 19:18:19 2003 +++ b/drivers/pcmcia/hd64465_ss.c Wed Mar 26 19:18:19 2003 @@ -599,21 +599,6 @@
/*============================================================*/
-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)
{
hs_socket_t *sp = &hs_sockets[sock];@@ -696,21 +681,6 @@
/*============================================================*/
-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)
{
hs_socket_t *sp = &hs_sockets[sock];@@ -894,9 +864,7 @@
.get_status = hs_get_status,
.get_socket = hs_get_socket,
.set_socket = hs_set_socket,
- .get_io_map = hs_get_io_map,
.set_io_map = hs_set_io_map,
- .get_mem_map = hs_get_mem_map,
.set_mem_map = hs_set_mem_map,
.proc_setup = hs_proc_setup,
};
drivers/pcmcia/i82092.c +0 -88
@@ -63,9 +63,7 @@ .get_status = i82092aa_get_status, .get_socket = i82092aa_get_socket, .set_socket = i82092aa_set_socket, - .get_io_map = i82092aa_get_io_map, .set_io_map = i82092aa_set_io_map, - .get_mem_map = i82092aa_get_mem_map, .set_mem_map = i82092aa_set_mem_map, .proc_setup = i82092aa_proc_setup, };
@@ -688,34 +686,6 @@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) {unsigned char map, ioctl;
@@ -757,64 +727,6 @@leave ("i82092aa_set_io_map" );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)
drivers/pcmcia/i82092aa.h +0 -2
@@ -29,9 +29,7 @@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_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_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_init (unsigned int s);static int i82092aa_suspend (unsigned int sock);
drivers/pcmcia/i82365.c +0 -77
108 lines not on this page · raw message
drivers/pcmcia/pci_socket.c +0 -20
@@ -105,15 +105,6 @@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) {pci_socket_t *socket = pci_socket_array + sock;
@@ -123,15 +114,6 @@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) {pci_socket_t *socket = pci_socket_array + sock;
@@ -158,9 +140,7 @@ .get_status = pci_get_status, .get_socket = pci_get_socket, .set_socket = pci_set_socket, - .get_io_map = pci_get_io_map, .set_io_map = pci_set_io_map, - .get_mem_map = pci_get_mem_map, .set_mem_map = pci_set_mem_map, .proc_setup = pci_proc_setup, };
drivers/pcmcia/pci_socket.h +0 -2
@@ -37,9 +37,7 @@int (*get_status)(struct pci_socket *,unsigned int *);int (*get_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 (*get_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); };
drivers/pcmcia/ricoh.h +0 -2
@@ -170,9 +170,7 @@ yenta_get_status, yenta_get_socket, yenta_set_socket, - yenta_get_io_map, yenta_set_io_map, - yenta_get_mem_map, yenta_set_mem_map, yenta_proc_setup };
drivers/pcmcia/sa1100_generic.c +0 -53
72 lines not on this page · raw message
drivers/pcmcia/tcic.c +0 -85
104 lines not on this page · raw message
drivers/pcmcia/ti113x.h +0 -6
@@ -185,9 +185,7 @@ yenta_get_status, yenta_get_socket, yenta_set_socket, - yenta_get_io_map, yenta_set_io_map, - yenta_get_mem_map, yenta_set_mem_map, yenta_proc_setup };
@@ -230,9 +228,7 @@ yenta_get_status, yenta_get_socket, yenta_set_socket, - yenta_get_io_map, yenta_set_io_map, - yenta_get_mem_map, yenta_set_mem_map, yenta_proc_setup };
@@ -272,9 +268,7 @@ yenta_get_status, yenta_get_socket, yenta_set_socket, - yenta_get_io_map, yenta_set_io_map, - yenta_get_mem_map, yenta_set_mem_map, yenta_proc_setup };
drivers/pcmcia/yenta.c +1 -61
87 lines not on this page · raw message
include/pcmcia/ss.h +0 -2
@@ -134,9 +134,7 @@int (*get_status)(unsigned int sock,u_int *value);int (*get_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 (*get_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); };
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Re: [BK PULL] (2/9) PCMCIA changes
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.889.359.1 -> 1.889.359.2
# include/pcmcia/cs.h 1.2 -> 1.3
# drivers/pcmcia/cs.c 1.16 -> 1.17
# drivers/pcmcia/cistpl.c 1.8 -> 1.9
# drivers/isdn/hisax/sedlbauer_cs.c 1.6 -> 1.7
# drivers/char/pcmcia/synclink_cs.c 1.9 -> 1.10
# drivers/isdn/hisax/elsa_cs.c 1.3 -> 1.4
# include/pcmcia/bus_ops.h 1.2 -> 1.3
# drivers/pcmcia/yenta.c 1.20 -> 1.21
# drivers/pcmcia/sa1100_generic.c 1.27 -> 1.28
# include/pcmcia/ss.h 1.8 -> 1.9
# drivers/scsi/pcmcia/nsp_cs.c 1.17 -> 1.18
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/03/17 [email protected] 1.889.359.2
# [PCMCIA] pcmcia-3: Remove bus_ops abstractions.
#
# Remove bus_* abstractions from PCMCIA core and PCMCIA drivers; they
# are unused. # -------------------------------------------- # diff -Nru a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c --- a/drivers/char/pcmcia/synclink_cs.c Wed Mar 26 19:19:18 2003 +++ b/drivers/char/pcmcia/synclink_cs.c Wed Mar 26 19:19:18 2003 @@ -76,7 +76,6 @@ #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h> -#include <pcmcia/bus_ops.h>
#ifdef CONFIG_SYNCLINK_SYNCPPP_MODULE
#define CONFIG_SYNCLINK_SYNCPPP 1
@@ -241,7 +240,6 @@
dev_link_t link;
dev_node_t node;
int stop;
- struct bus_operations *bus;
/* SPPP/Cisco HDLC device parts */
int netcount;
@@ -826,7 +824,6 @@
break;
case CS_EVENT_CARD_INSERTION:
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
- info->bus = args->bus;
mgslpc_config(link);
break;
case CS_EVENT_PM_SUSPEND:
drivers/isdn/hisax/elsa_cs.c +0 -7
@@ -53,7 +53,6 @@#include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h> -#include <pcmcia/bus_ops.h> MODULE_DESCRIPTION ("ISDN4Linux: PCMCIA client driver for Elsa PCM cards" );MODULE_AUTHOR ("Klaus Lichtenwalder" );
@@ -163,17 +162,12 @@"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 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 {dev_link_t link;dev_node_t node;int busy; -struct bus_operations *bus; }local_info_t ;/*====================================================================*/
@@ -522,7 +516,6 @@break ;case CS_EVENT_CARD_INSERTION : link->state |=DEV_PRESENT |DEV_CONFIG_PENDING ; - dev->bus = args->bus;elsa_cs_config (link);break ;case CS_EVENT_PM_SUSPEND :
drivers/isdn/hisax/sedlbauer_cs.c +0 -7
@@ -53,7 +53,6 @@#include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h> -#include <pcmcia/bus_ops.h> MODULE_DESCRIPTION ("ISDN4Linux: PCMCIA client driver for Sedlbauer cards" );MODULE_AUTHOR ("Marcus Niemann" );
@@ -171,17 +170,12 @@"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 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 {dev_link_t link;dev_node_t node;int stop; -struct bus_operations *bus; }local_info_t ;/*====================================================================*/
@@ -620,7 +614,6 @@break ;case CS_EVENT_CARD_INSERTION : link->state |=DEV_PRESENT |DEV_CONFIG_PENDING ; - dev->bus = args->bus;sedlbauer_config (link);break ;case CS_EVENT_PM_SUSPEND :
drivers/pcmcia/cistpl.c +27 -29
133 lines not on this page · raw message
drivers/pcmcia/cs.c +2 -4
@@ -59,7 +59,6 @@#include <pcmcia/bulkmem.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> -#include <pcmcia/bus_ops.h> #include "cs_internal.h" #ifdef CONFIG_PCI
@@ -1469,7 +1468,6 @@ client->event_handler = req->event_handler; client->event_callback_args = req->event_callback_args; client->event_callback_args.client_handle = client; - client->event_callback_args.bus = s->cap.bus;if (s->state &SOCKET_CARDBUS ) client->state |=CLIENT_CARDBUS ;
@@ -1618,7 +1616,7 @@ }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
@@ -1913,7 +1911,7 @@if (ret !=0 )return ret;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) || (s->functions > 1) || (irq == s->cap.pci_irq)) ? SA_SHIRQ : 0,
drivers/pcmcia/sa1100_generic.c +0 -1
@@ -52,7 +52,6 @@#include <pcmcia/cs_types.h> #include <pcmcia/cs.h> #include <pcmcia/ss.h> -#include <pcmcia/bus_ops.h> #include <asm/hardware.h> #include <asm/io.h>
drivers/pcmcia/yenta.c +0 -1
@@ -514,7 +514,6 @@ socket->cap.pci_irq = socket->cb_irq; socket->cap.irq_mask =yenta_probe_irq (socket, isa_irq_mask); 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); }
drivers/scsi/pcmcia/nsp_cs.c +0 -3
@@ -62,7 +62,6 @@#include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h> -#include <pcmcia/bus_ops.h> #include "nsp_cs.h"
@@ -93,7 +92,6 @@int ndev;dev_node_t node[8 ];int stop; -struct bus_operations *bus; } scsi_info_t;
@@ -1948,7 +1946,6 @@case CS_EVENT_CARD_INSERTION :DEBUG (0 ," event: insert\n" ); link->state |=DEV_PRESENT |DEV_CONFIG_PENDING ; - info->bus = args->bus;nsp_cs_config (link);break ;
include/pcmcia/bus_ops.h +2 -152
154 lines not on this page · raw message
include/pcmcia/cs.h +0 -1
@@ -98,7 +98,6 @@void *buffer;void *misc;void *client_data; -struct bus_operations *bus; } event_callback_args_t;/* for GetConfigurationInfo */
include/pcmcia/ss.h +0 -1
@@ -58,7 +58,6 @@ioaddr_t io_offset;u_char pci_irq;struct pci_dev *cb_dev; -struct bus_operations *bus; } socket_cap_t;/* InquireSocket capabilities */
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Re: [BK PULL] (3/9) PCMCIA changes
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.889.359.2 -> 1.889.359.3
# drivers/pcmcia/cs_internal.h 1.5 -> 1.6
# drivers/pcmcia/cs.c 1.17 -> 1.18
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/03/17 [email protected] 1.889.359.3
# [PCMCIA] pcmcia-4: introduce SOCKET_CARDBUS_CONFIG
#
# Cardbus uses socket->cb_config to detect when the cardbus card has
# been initialised. Since cb_config will eventually die, we need a
# solution - introduce the SOCKET_CARDBUS_CONFIG flag, which is set
# once we have initialised the cardbus socket.
# --------------------------------------------
#
diff -Nru a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
--- a/drivers/pcmcia/cs.c Wed Mar 26 19:19:46 2003
+++ b/drivers/pcmcia/cs.c Wed Mar 26 19:19:46 2003
@@ -621,8 +621,10 @@
send_event(s, CS_EVENT_PM_RESUME, CS_EVENT_PRI_LOW);
} else if (s->state & SOCKET_SETUP_PENDING) {
#ifdef CONFIG_CARDBUS
- if (s->state & SOCKET_CARDBUS)
+ if (s->state & SOCKET_CARDBUS) {
cb_alloc(s);
+ s->state |= SOCKET_CARDBUS_CONFIG;
+ }
#endif
send_event(s, CS_EVENT_CARD_INSERTION, CS_EVENT_PRI_LOW);
s->state &= ~SOCKET_SETUP_PENDING;
@@ -1072,7 +1074,7 @@
config->Vcc = s->socket.Vcc;
config->Vpp1 = config->Vpp2 = s->socket.Vpp;
config->Option = s->cap.cb_dev->subordinate->number;
- if (s->cb_config) {
+ if (s->state & SOCKET_CARDBUS_CONFIG) {
config->Attributes = CONF_VALID_CLIENT;
config->IntType = INT_CARDBUS;
config->AssignedIRQ = s->irq.AssignedIRQ;
diff -Nru a/drivers/pcmcia/cs_internal.h b/drivers/pcmcia/cs_internal.h
--- a/drivers/pcmcia/cs_internal.h Wed Mar 26 19:19:46 2003
+++ b/drivers/pcmcia/cs_internal.h Wed Mar 26 19:19:46 2003
@@ -176,6 +176,7 @@
#define SOCKET_IO_REQ(i) (0x1000<<(i))
#define SOCKET_REGION_INFO 0x4000
#define SOCKET_CARDBUS 0x8000
+#define SOCKET_CARDBUS_CONFIG 0x10000 #define CHECK_HANDLE(h) \
(((h) == NULL) || ((h)->client_magic != CLIENT_MAGIC))Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Re: [BK PULL] (4/9) PCMCIA changes
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.889.359.3 -> 1.889.359.4
# drivers/pcmcia/rsrc_mgr.c 1.9 -> 1.10
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/03/18 [email protected] 1.889.359.4
# [PCMCIA] pcmcia-5: Add locking to resource manager.
#
# Add an element of locking to the resource manager - don't allow
# the PCMCIA resource lists to be changed while the pcmcia code is
# scanning them.
# --------------------------------------------
#
diff -Nru a/drivers/pcmcia/rsrc_mgr.c b/drivers/pcmcia/rsrc_mgr.c
--- a/drivers/pcmcia/rsrc_mgr.c Wed Mar 26 19:20:24 2003
+++ b/drivers/pcmcia/rsrc_mgr.c Wed Mar 26 19:20:24 2003
@@ -85,6 +85,8 @@
/* IO port resource database */
static resource_map_t io_db = { 0, 0, &io_db };+static DECLARE_MUTEX(rsrc_sem);
+
#ifdef CONFIG_ISA
typedef struct irq_info_t {
@@ -403,16 +405,20 @@
static u_char order[] = { 0xd0, 0xe0, 0xc0, 0xf0 };
static int hi = 0, lo = 0;
u_long b, i, ok = 0;-
- if (!probe_mem) return;
+
+ if (!probe_mem)
+ return;
+
+ down(&rsrc_sem);
/* We do up to four passes through the list */
if (!force_low) { if (hi++ || (inv_probe(is_valid, do_cksum, mem_db.next, s) > 0))
- return;
+ goto out;
printk(KERN_NOTICE "cs: warning: no high memory space "
"available!\n");
}
- if (lo++) return;
+ if (lo++)
+ goto out;
for (m = mem_db.next; m != &mem_db; m = n) { n = m->next;
/* Only probe < 1 MB */
@@ -432,6 +438,8 @@
}
}
}
+ out:
+ up(&rsrc_sem);
}
#else /* CONFIG_ISA */
@@ -442,11 +450,13 @@
resource_map_t *m;
static int done = 0;- if (!probe_mem || done++)
- return;
- for (m = mem_db.next; m != &mem_db; m = m->next)
- if (do_mem_probe(m->base, m->num, is_valid, do_cksum, s))
- return;
+ if (probe_mem && done++ == 0) {
+ down(&rsrc_sem);
+ for (m = mem_db.next; m != &mem_db; m = m->next)
+ if (do_mem_probe(m->base, m->num, is_valid, do_cksum, s))
+ break;
+ up(&rsrc_sem);
+ }
}
#endif /* CONFIG_ISA */
@@ -469,7 +479,9 @@
{
ioaddr_t try;
resource_map_t *m;
-
+ int ret = -1;
+
+ down(&rsrc_sem);
for (m = io_db.next; m != &io_db; m = m->next) { try = (m->base & ~(align-1)) + *base;
for (try = (try >= m->base) ? try : try+align;
@@ -477,12 +489,16 @@
try += align) {
if (request_io_resource(try, num, name, s->cap.cb_dev) == 0) {
*base = try;
- return 0;
+ ret = 0;
+ goto out;
}
- if (!align) break;
+ if (!align)
+ break;
}
}
- return -1;
+ out:
+ up(&rsrc_sem);
+ return ret;
}
int find_mem_region(u_long *base, u_long num, u_long align,
@@ -490,26 +506,35 @@
{
u_long try;
resource_map_t *m;+ int ret = -1;
+ down(&rsrc_sem);
while (1) { for (m = mem_db.next; m != &mem_db; m = m->next) {
/* first pass >1MB, second pass <1MB */
- if ((force_low != 0) ^ (m->base < 0x100000)) continue;
+ if ((force_low != 0) ^ (m->base < 0x100000))
+ continue;
+
try = (m->base & ~(align-1)) + *base;
for (try = (try >= m->base) ? try : try+align;
(try >= m->base) && (try+num <= m->base+m->num); try += align) {
if (request_mem_resource(try, num, name, s->cap.cb_dev) == 0) {
*base = try;
- return 0; + ret = 0; + goto out;
}
- if (!align) break;
+ if (!align)
+ break;
}
}
- if (force_low) break;
+ if (force_low)
+ break;
force_low++;
}- return -1;
+ out:
+ up(&rsrc_sem);
+ return ret;
}
/*======================================================================
@@ -534,53 +559,75 @@
int try_irq(u_int Attributes, int irq, int specific)
{
irq_info_t *info = &irq_table[irq];
+ int ret = 0;
+
+ down(&rsrc_sem);
if (info->Attributes & RES_ALLOCATED) {
switch (Attributes & IRQ_TYPE) {
case IRQ_TYPE_EXCLUSIVE:
- return CS_IN_USE;
+ ret = CS_IN_USE;
+ break; case IRQ_TYPE_TIME:
if ((info->Attributes & RES_IRQ_TYPE)
- != RES_IRQ_TYPE_TIME)
- return CS_IN_USE;
- if (Attributes & IRQ_FIRST_SHARED)
- return CS_BAD_ATTRIBUTE;
+ != RES_IRQ_TYPE_TIME) {
+ ret = CS_IN_USE;
+ break;
+ }
+ if (Attributes & IRQ_FIRST_SHARED) {
+ ret = CS_BAD_ATTRIBUTE;
+ break;
+ }
info->Attributes |= RES_IRQ_TYPE_TIME | RES_ALLOCATED; info->time_share++;
break;
case IRQ_TYPE_DYNAMIC_SHARING:
if ((info->Attributes & RES_IRQ_TYPE)
- != RES_IRQ_TYPE_DYNAMIC)
- return CS_IN_USE;
- if (Attributes & IRQ_FIRST_SHARED)
- return CS_BAD_ATTRIBUTE;
+ != RES_IRQ_TYPE_DYNAMIC) {
+ ret = CS_IN_USE;
+ break;
+ }
+ if (Attributes & IRQ_FIRST_SHARED) {
+ ret = CS_BAD_ATTRIBUTE;
+ break;
+ }
info->Attributes |= RES_IRQ_TYPE_DYNAMIC | RES_ALLOCATED; info->dyn_share++;
break;
}
} else {- if ((info->Attributes & RES_RESERVED) && !specific)
- return CS_IN_USE;
- if (check_irq(irq) != 0)
- return CS_IN_USE;
+ if ((info->Attributes & RES_RESERVED) && !specific) {
+ ret = CS_IN_USE;
+ goto out;
+ }
+ if (check_irq(irq) != 0) {
+ ret = CS_IN_USE;
+ goto out;
+ }
switch (Attributes & IRQ_TYPE) {
case IRQ_TYPE_EXCLUSIVE:
info->Attributes |= RES_ALLOCATED;
break;
case IRQ_TYPE_TIME:
- if (!(Attributes & IRQ_FIRST_SHARED))
- return CS_BAD_ATTRIBUTE;
+ if (!(Attributes & IRQ_FIRST_SHARED)) {
+ ret = CS_BAD_ATTRIBUTE;
+ break;
+ }
info->Attributes |= RES_IRQ_TYPE_TIME | RES_ALLOCATED; info->time_share = 1;
break;
case IRQ_TYPE_DYNAMIC_SHARING:
- if (!(Attributes & IRQ_FIRST_SHARED))
- return CS_BAD_ATTRIBUTE;
+ if (!(Attributes & IRQ_FIRST_SHARED)) {
+ ret = CS_BAD_ATTRIBUTE;
+ break;
+ }
info->Attributes |= RES_IRQ_TYPE_DYNAMIC | RES_ALLOCATED; info->dyn_share = 1;
break;
}
}
- return 0;
+ out:
+ up(&rsrc_sem);
+ return ret;
}
#endif
@@ -594,6 +641,7 @@
irq_info_t *info;
info = &irq_table[irq];
+ down(&rsrc_sem);
switch (Attributes & IRQ_TYPE) {
case IRQ_TYPE_EXCLUSIVE:
info->Attributes &= RES_RESERVED;
@@ -609,6 +657,7 @@
info->Attributes &= RES_RESERVED;
break;
}+ up(&rsrc_sem);
}
#endif
@@ -631,6 +680,8 @@
return CS_BAD_SIZE;
ret = CS_SUCCESS;
+
+ down(&rsrc_sem);
switch (adj->Action) {
case ADD_MANAGED_RESOURCE:
ret = add_interval(&mem_db, base, num);
@@ -649,6 +700,7 @@
default:
ret = CS_UNSUPPORTED_FUNCTION;
}
+ up(&rsrc_sem);
return ret; }
@@ -657,7 +709,7 @@
static int adjust_io(adjust_t *adj)
{
- int base, num;
+ int base, num, ret = CS_SUCCESS;
base = adj->resource.io.BasePort;
num = adj->resource.io.NumPorts;
@@ -666,10 +718,13 @@
if ((num <= 0) || (base+num > 0x10000) || (base+num <= base)) return CS_BAD_SIZE;
+ down(&rsrc_sem);
switch (adj->Action) {
case ADD_MANAGED_RESOURCE:- if (add_interval(&io_db, base, num) != 0)
- return CS_IN_USE;
+ if (add_interval(&io_db, base, num) != 0) {
+ ret = CS_IN_USE;
+ break;
+ }
#ifdef CONFIG_ISA
if (probe_io)
do_io_probe(base, num);
@@ -679,17 +734,19 @@
sub_interval(&io_db, base, num);
break;
default:
- return CS_UNSUPPORTED_FUNCTION;
+ ret = CS_UNSUPPORTED_FUNCTION;
break;
}+ up(&rsrc_sem);
- return CS_SUCCESS;
+ return ret;
}
/*====================================================================*/
static int adjust_irq(adjust_t *adj)
{
+ int ret = CS_SUCCESS;
#ifdef CONFIG_ISA
int irq;
irq_info_t *info;
@@ -698,33 +755,41 @@
if ((irq < 0) || (irq > 15))
return CS_BAD_IRQ;
info = &irq_table[irq];
-
+
+ down(&rsrc_sem);
switch (adj->Action) {
case ADD_MANAGED_RESOURCE: if (info->Attributes & RES_REMOVED)
info->Attributes &= ~(RES_REMOVED|RES_ALLOCATED);
else
- if (adj->Attributes & RES_ALLOCATED)
- return CS_IN_USE;
+ if (adj->Attributes & RES_ALLOCATED) {
+ ret = CS_IN_USE;
+ break;
+ }
if (adj->Attributes & RES_RESERVED)
info->Attributes |= RES_RESERVED;
else
info->Attributes &= ~RES_RESERVED;
break;
case REMOVE_MANAGED_RESOURCE:
- if (info->Attributes & RES_REMOVED)
- return 0;
- if (info->Attributes & RES_ALLOCATED)
- return CS_IN_USE;
+ if (info->Attributes & RES_REMOVED) {
+ ret = 0;
+ break;
+ }
+ if (info->Attributes & RES_ALLOCATED) {
+ ret = CS_IN_USE;
+ break;
+ }
info->Attributes |= RES_ALLOCATED|RES_REMOVED; info->Attributes &= ~RES_RESERVED;
break;
default:
- return CS_UNSUPPORTED_FUNCTION;
+ ret = CS_UNSUPPORTED_FUNCTION;
break;
}+ up(&rsrc_sem);
#endif
- return CS_SUCCESS;
+ return ret;
}
/*====================================================================*/
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Re: [BK PULL] (5/9) PCMCIA changes
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.889.359.4 -> 1.889.359.5
# drivers/pcmcia/cs.c 1.18 -> 1.19
# drivers/pcmcia/rsrc_mgr.c 1.10 -> 1.11
# drivers/pcmcia/Kconfig 1.2 -> 1.3
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/03/18 [email protected] 1.889.359.5
# [PCMCIA] pcmcia-6: s/CONFIG_ISA/CONFIG_PCMCIA_PROBE/
#
# Remove the dependence of the PCMCIA layer on CONFIG_ISA - introduce # CONFIG_PCMCIA_PROBE to determine whether we need the resource
# handling code. This prevents oopsen on SA11x0 and similar platforms # which use statically mapped, non-windowed sockets. # -------------------------------------------- # diff -Nru a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig --- a/drivers/pcmcia/Kconfig Wed Mar 26 19:21:02 2003 +++ b/drivers/pcmcia/Kconfig Wed Mar 26 19:21:02 2003 @@ -87,5 +87,9 @@ tristate "SA1111 support" depends on PCMCIA_SA1100 && SA1111
+config PCMCIA_PROBE
+ bool
+ default y if ISA && !ARCH_SA1100 && !ARCH_CLPS711X
+
endmenu
drivers/pcmcia/cs.c +2 -2
@@ -1621,7 +1621,7 @@free_irq (req->AssignedIRQ, req->Instance); } -#ifdef CONFIG_ISA +#ifdef CONFIG_PCMCIA_PROBE if (req->AssignedIRQ != s->cap.pci_irq)undo_irq (req->Attributes, req->AssignedIRQ);#endif
@@ -1883,7 +1883,7 @@if (!s->cap.irq_mask) { irq = s->cap.pci_irq; ret = (irq) ?0 :CS_IN_USE ; -#ifdef CONFIG_ISA +#ifdef CONFIG_PCMCIA_PROBE }else if (s->irq.AssignedIRQ !=0 ) {/* If the interrupt is already assigned, it must match */ irq = s->irq.AssignedIRQ;
drivers/pcmcia/rsrc_mgr.c +10 -10
@@ -62,7 +62,7 @@#define INT_MODULE_PARM (n, v) static int n = v; MODULE_PARM(n, "i")INT_MODULE_PARM (probe_mem,1 );/* memory probe? */ -#ifdef CONFIG_ISA +#ifdef CONFIG_PCMCIA_PROBE INT_MODULE_PARM (probe_io,1 );/* IO port probe? */ INT_MODULE_PARM (mem_limit,0x10000 );#endif
@@ -87,7 +87,7 @@static DECLARE_MUTEX (rsrc_sem); -#ifdef CONFIG_ISA +#ifdef CONFIG_PCMCIA_PROBE typedef struct irq_info_t { u_int Attributes;
@@ -273,7 +273,7 @@======================================================================*/ -#ifdef CONFIG_ISA +#ifdef CONFIG_PCMCIA_PROBE static void do_io_probe (ioaddr_t base,ioaddr_t num) {
@@ -378,7 +378,7 @@return (num - bad); } -#ifdef CONFIG_ISA +#ifdef CONFIG_PCMCIA_PROBE static u_long inv_probe(int (*is_valid)(u_long), int (*do_cksum)(u_long),
@@ -442,7 +442,7 @@ up(&rsrc_sem); } -#else /* CONFIG_ISA */ +#else /* CONFIG_PCMCIA_PROBE */ void validate_mem (int (*is_valid)(u_long ),int (*do_cksum)(u_long ),int force_low,socket_info_t *s)
@@ -459,7 +459,7 @@ } } -#endif /* CONFIG_ISA */ +#endif /* CONFIG_PCMCIA_PROBE */ /*======================================================================
@@ -545,7 +545,7 @@======================================================================*/ -#ifdef CONFIG_ISA +#ifdef CONFIG_PCMCIA_PROBE static void fake_irq (int i,void *d,struct pt_regs *r) { }static inline int check_irq (int irq)
@@ -634,7 +634,7 @@/*====================================================================*/ -#ifdef CONFIG_ISA +#ifdef CONFIG_PCMCIA_PROBE void undo_irq (u_int Attributes,int irq) {
@@ -725,7 +725,7 @@ ret =CS_IN_USE ;break ; } -#ifdef CONFIG_ISA +#ifdef CONFIG_PCMCIA_PROBE if (probe_io)do_io_probe (base, num);#endif
@@ -747,7 +747,7 @@static int adjust_irq (adjust_t *adj) {int ret =CS_SUCCESS ; -#ifdef CONFIG_ISA +#ifdef CONFIG_PCMCIA_PROBE int irq;irq_info_t *info;
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Re: [BK PULL] (6/9) PCMCIA changes
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.889.359.5 -> 1.889.359.6
# drivers/pcmcia/cs_internal.h 1.6 -> 1.7
# drivers/pcmcia/cs.c 1.19 -> 1.20
# drivers/pcmcia/cardbus.c 1.23 -> 1.23.1.1
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/03/22 [email protected] 1.889.359.6
# [PCMCIA] pcmcia-7: Remove cb_enable() and cb_disable()
#
# Remove support for the old PCMCIA cardbus clients - all cardbus
# drivers should be converted to be full-class PCI citizens.
# --------------------------------------------
#
diff -Nru a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c
--- a/drivers/pcmcia/cardbus.c Wed Mar 26 19:21:29 2003
+++ b/drivers/pcmcia/cardbus.c Wed Mar 26 19:21:29 2003
@@ -327,65 +327,3 @@
printk(KERN_INFO "cs: cb_free(bus %d)\n", s->cap.cb_dev->subordinate->number);
}
}
-
-/*=====================================================================
-
- 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_dev *dev;
- u_char i;
-
- DEBUG(0, "cs: cb_enable(bus %d)\n", s->cap.cb_dev->subordinate->number);
-
- /* Configure bridge */
- cb_release_cis_mem(s);
-
- /* Set up PCI interrupt and command registers */
- for (i = 0; i < s->functions; i++) {
- dev = s->cb_config->dev[i];
- pci_write_config_byte(dev, PCI_COMMAND, PCI_COMMAND_MASTER |
- PCI_COMMAND_IO | PCI_COMMAND_MEMORY);
- pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE,
- L1_CACHE_BYTES / 4);
- }
-
- if (s->irq.AssignedIRQ) {
- for (i = 0; i < s->functions; i++) {
- 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);
- }
-}
-
-/*======================================================================
-
- 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);
-
- /* Turn off bridge windows */
- cb_release_cis_mem(s);
-}
diff -Nru a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
--- a/drivers/pcmcia/cs.c Wed Mar 26 19:21:29 2003
+++ b/drivers/pcmcia/cs.c Wed Mar 26 19:21:29 2003
@@ -1518,11 +1518,8 @@
s = SOCKET(handle); #ifdef CONFIG_CARDBUS
- if (handle->state & CLIENT_CARDBUS) {
- cb_disable(s);
- s->lock_count = 0;
+ if (handle->state & CLIENT_CARDBUS)
return CS_SUCCESS;
- }
#endif
if (!(handle->state & CLIENT_STALE)) {
@@ -1569,9 +1566,8 @@
s = SOCKET(handle); #ifdef CONFIG_CARDBUS
- if (handle->state & CLIENT_CARDBUS) {
+ if (handle->state & CLIENT_CARDBUS)
return CS_SUCCESS;
- }
#endif
if (!(handle->state & CLIENT_STALE)) {@@ -1674,16 +1670,8 @@
return CS_NO_CARD;
#ifdef CONFIG_CARDBUS
- if (handle->state & CLIENT_CARDBUS) {
- if (!(req->IntType & INT_CARDBUS))
- 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;
- }
+ if (handle->state & CLIENT_CARDBUS)
+ return CS_UNSUPPORTED_MODE;
#endif
if (req->IntType & INT_CARDBUS)drivers/pcmcia/cs_internal.h +0 -2
@@ -199,8 +199,6 @@/* In cardbus.c */ int cb_alloc (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);void cb_release_cis_mem (socket_info_t *s);
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Re: [BK PULL] (7/9) PCMCIA changes
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.889.359.6 -> 1.889.359.7
# drivers/pcmcia/cs_internal.h 1.7 -> 1.8
# drivers/pcmcia/cistpl.c 1.9 -> 1.10
# drivers/pcmcia/rsrc_mgr.c 1.11 -> 1.12
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/03/23 [email protected] 1.889.359.7
# [PCMCIA] pcmcia-8/9: Clean up CIS setup.
#
# - Re-order functions in cistpl.c.
# - Combine setup_cis_mem and set_cis_map into one function.
# - Move cis_readable(), checksum() and checksum_match() into rsrc_mgr.c # - Only pass the socket structure to validate_mem()
# - Remove socket_info_t *vs variable, and the race condition along
# with it.
# - Pass the socket_info_t through validate_mem(), do_mem_probe() and
# inv_probe() to these functions.
# - Call cis_readable() and checksum_match() directly from
# do_mem_probe().
# --------------------------------------------
#
drivers/pcmcia/cistpl.c +107 -138
@@ -84,6 +84,52 @@INT_MODULE_PARM (cis_width,0 );/* 16-bit CIS? */ +void release_cis_mem (socket_info_t *s) +{ +if (s->cis_mem.sys_start !=0 ) { + s->cis_mem.flags &= ~MAP_ACTIVE ; + s->ss_entry->set_mem_map (s->sock, &s->cis_mem); +if (!(s->cap.features &SS_CAP_STATIC_MAP )) +release_mem_region (s->cis_mem.sys_start, s->cap.map_size); +iounmap (s->cis_virt); + s->cis_mem.sys_start =0 ; + s->cis_virt =NULL ; + } +} + +/* +* Map the card memory at "card_offset" into virtual space. +* If flags & MAP_ATTRIB, map the attribute space, otherwise +* map the memory space. +*/ +static unsigned char * +set_cis_map (socket_info_t *s,unsigned int card_offset,unsigned int flags) +{ +pccard_mem_map *mem = &s->cis_mem; +if (!(s->cap.features &SS_CAP_STATIC_MAP ) && + mem->sys_start ==0 ) { +int low = !(s->cap.features &SS_CAP_PAGE_REGS ); +validate_mem (s); + mem->sys_start =0 ; +if (find_mem_region (&mem->sys_start, s->cap.map_size, + s->cap.map_size, low,"card services" , s)) { +printk (KERN_NOTICE "cs: unable to map card memory!\n" ); +return NULL ; + } + mem->sys_stop = mem->sys_start+s->cap.map_size-1 ; + s->cis_virt =ioremap (mem->sys_start, s->cap.map_size); + } + mem->card_start = card_offset; + mem->flags = flags; + s->ss_entry->set_mem_map (s->sock, mem); +if (s->cap.features &SS_CAP_STATIC_MAP ) { +if (s->cis_virt) +iounmap (s->cis_virt); + s->cis_virt =ioremap (mem->sys_start, s->cap.map_size); + } +return s->cis_virt; +} +/*====================================================================== Low-level functions to read and write CIS memory. I think the
@@ -95,39 +141,28 @@#define IS_ATTR 1#define IS_INDIRECT 8 -static int setup_cis_mem (socket_info_t *s); - -static void set_cis_map (socket_info_t *s,pccard_mem_map *mem) -{ - s->ss_entry->set_mem_map (s->sock, mem); -if (s->cap.features &SS_CAP_STATIC_MAP ) { -if (s->cis_virt) -iounmap (s->cis_virt); - s->cis_virt =ioremap (mem->sys_start, s->cap.map_size); - } -} -int read_cis_mem (socket_info_t *s,int attr,u_int addr,u_int len,void *ptr) { -pccard_mem_map *mem = &s->cis_mem; -u_char *sys, *buf = ptr; +u_char *sys, *end, *buf = ptr;DEBUG (3 ,"cs: read_cis_mem(%d, %#x, %u)\n" , attr, addr, len); -if (setup_cis_mem (s) !=0 ) { -memset (ptr,0xff , len); -return -1 ; - } - mem->flags =MAP_ACTIVE | ((cis_width) ?MAP_16BIT :0 );if (attr &IS_INDIRECT ) {/* Indirect accesses use a bunch of special registers at fixed locations in common memory */ u_char flags =ICTRL0_COMMON |ICTRL0_AUTOINC |ICTRL0_BYTEGRAN ; -if (attr &IS_ATTR ) { addr *=2 ; flags =ICTRL0_AUTOINC ; } - mem->card_start =0 ; mem->flags =MAP_ACTIVE ; -set_cis_map (s, mem); - sys = s->cis_virt; +if (attr &IS_ATTR ) { + addr *=2 ; + flags =ICTRL0_AUTOINC ; + } + + sys =set_cis_map (s,0 ,MAP_ACTIVE | ((cis_width) ?MAP_16BIT :0 )); +if (!sys) { +memset (ptr,0xff , len); +return -1 ; + } +writeb (flags, sys+CISREG_ICTRL0 );writeb (addr &0xff , sys+CISREG_IADDR0 );writeb ((addr>>8 ) &0xff , sys+CISREG_IADDR1 );
@@ -136,18 +171,30 @@for ( ; len >0 ; len--, buf++) *buf =readb (sys+CISREG_IDATA0 ); }else { -u_int inc =1 ; -if (attr) { mem->flags |=MAP_ATTRIB ; inc++; addr *=2 ; } - sys += (addr & (s->cap.map_size-1 )); - mem->card_start = addr & ~(s->cap.map_size-1 ); +u_int inc =1 , card_offset, flags; + + flags =MAP_ACTIVE | ((cis_width) ?MAP_16BIT :0 ); +if (attr) { + flags |=MAP_ATTRIB ; + inc++; + addr *=2 ; + } + + card_offset = addr & ~(s->cap.map_size-1 );while (len) { -set_cis_map (s, mem); - sys = s->cis_virt + (addr & (s->cap.map_size-1 )); + sys =set_cis_map (s, card_offset, flags); +if (!sys) { +memset (ptr,0xff , len); +return -1 ; + } + end = sys + s->cap.map_size; + sys = sys + (addr & (s->cap.map_size-1 ));for ( ; len >0 ; len--, buf++, sys += inc) { -if (sys == s->cis_virt+s->cap.map_size)break ; +if (sys == end) +break ; *buf =readb (sys); } - mem->card_start += s->cap.map_size; + card_offset += s->cap.map_size; addr =0 ; } }
@@ -160,21 +207,23 @@void write_cis_mem (socket_info_t *s,int attr,u_int addr,u_int len,void *ptr) { -pccard_mem_map *mem = &s->cis_mem; -u_char *sys, *buf = ptr; +u_char *sys, *end, *buf = ptr;DEBUG (3 ,"cs: write_cis_mem(%d, %#x, %u)\n" , attr, addr, len); -if (setup_cis_mem (s) !=0 )return ; - mem->flags =MAP_ACTIVE | ((cis_width) ?MAP_16BIT :0 );if (attr &IS_INDIRECT ) {/* Indirect accesses use a bunch of special registers at fixed locations in common memory */ u_char flags =ICTRL0_COMMON |ICTRL0_AUTOINC |ICTRL0_BYTEGRAN ; -if (attr &IS_ATTR ) { addr *=2 ; flags =ICTRL0_AUTOINC ; } - mem->card_start =0 ; mem->flags =MAP_ACTIVE ; -set_cis_map (s, mem); - sys = s->cis_virt; +if (attr &IS_ATTR ) { + addr *=2 ; + flags =ICTRL0_AUTOINC ; + } + + sys =set_cis_map (s,0 ,MAP_ACTIVE | ((cis_width) ?MAP_16BIT :0 )); +if (!sys) +return ;/* FIXME: Error */ +writeb (flags, sys+CISREG_ICTRL0 );writeb (addr &0xff , sys+CISREG_IADDR0 );writeb ((addr>>8 ) &0xff , sys+CISREG_IADDR1 );
@@ -183,111 +232,31 @@for ( ; len >0 ; len--, buf++)writeb (*buf, sys+CISREG_IDATA0 ); }else { -int inc =1 ; -if (attr &IS_ATTR ) { mem->flags |=MAP_ATTRIB ; inc++; addr *=2 ; } - mem->card_start = addr & ~(s->cap.map_size-1 ); +u_int inc =1 , card_offset, flags; + + flags =MAP_ACTIVE | ((cis_width) ?MAP_16BIT :0 ); +if (attr &IS_ATTR ) { + flags |=MAP_ATTRIB ; + inc++; + addr *=2 ; + } + + card_offset = addr & ~(s->cap.map_size-1 );while (len) { -set_cis_map (s, mem); - sys = s->cis_virt + (addr & (s->cap.map_size-1 )); + sys =set_cis_map (s, card_offset, flags); +if (!sys) +return ;/* FIXME: error */ + + end = sys + s->cap.map_size; + sys = sys + (addr & (s->cap.map_size-1 ));for ( ; len >0 ; len--, buf++, sys += inc) { -if (sys == s->cis_virt+s->cap.map_size)break ; +if (sys == end) +break ;writeb (*buf, sys); } - mem->card_start += s->cap.map_size; + card_offset += s->cap.map_size; addr =0 ; } - } -} - -/*====================================================================== - -This is tricky... when we set up CIS memory, we try to validate -the memory window space allocations. -- ======================================================================*/ - -/* Scratch pointer to the socket we use for validation */ -static socket_info_t *vs =NULL ; - -/* Validation function for cards with a valid CIS */ -static int cis_readable (u_long base) -{ -cisinfo_t info1, info2; -int ret; - vs->cis_mem.sys_start = base; - vs->cis_mem.sys_stop = base+vs->cap.map_size-1 ; - vs->cis_virt =ioremap (base, vs->cap.map_size); - ret =pcmcia_validate_cis (vs->clients, &info1); -/* invalidate mapping and CIS cache */ -iounmap (vs->cis_virt); - vs->cis_used =0 ; -if ((ret !=0 ) || (info1.Chains ==0 )) -return 0 ; - vs->cis_mem.sys_start = base+vs->cap.map_size; - vs->cis_mem.sys_stop = base+2 *vs->cap.map_size-1 ; - vs->cis_virt =ioremap (base+vs->cap.map_size, vs->cap.map_size); - ret =pcmcia_validate_cis (vs->clients, &info2); -iounmap (vs->cis_virt); - vs->cis_used =0 ; -return ((ret ==0 ) && (info1.Chains == info2.Chains)); -} - -/* Validation function for simple memory cards */ -static int checksum (u_long base) -{ -int i, a, b, d; - vs->cis_mem.sys_start = base; - vs->cis_mem.sys_stop = base+vs->cap.map_size-1 ; - vs->cis_virt =ioremap (base, vs->cap.map_size); - vs->cis_mem.card_start =0 ; - vs->cis_mem.flags =MAP_ACTIVE ; - vs->ss_entry->set_mem_map (vs->sock, &vs->cis_mem); -/* Don't bother checking every word... */ - a =0 ; b =-1 ; -for (i =0 ; i < vs->cap.map_size; i +=44 ) { - d =readl (vs->cis_virt+i); - a += d; b &= d; - } -iounmap (vs->cis_virt); -return (b ==-1 ) ?-1 : (a>>1 ); -} - -static int checksum_match (u_long base) -{ -int a =checksum (base), b =checksum (base+vs->cap.map_size); -return ((a == b) && (a >=0 )); -} - -static int setup_cis_mem (socket_info_t *s) -{ -if (!(s->cap.features &SS_CAP_STATIC_MAP ) && - (s->cis_mem.sys_start ==0 )) { -int low = !(s->cap.features &SS_CAP_PAGE_REGS ); - vs = s; -validate_mem (cis_readable, checksum_match, low, s); - s->cis_mem.sys_start =0 ; - vs =NULL ; -if (find_mem_region (&s->cis_mem.sys_start, s->cap.map_size, - s->cap.map_size, low,"card services" , s)) { -printk (KERN_NOTICE "cs: unable to map card memory!\n" ); -return -1 ; - } - s->cis_mem.sys_stop = s->cis_mem.sys_start+s->cap.map_size-1 ; - s->cis_virt =ioremap (s->cis_mem.sys_start, s->cap.map_size); - } -return 0 ; -} - -void release_cis_mem (socket_info_t *s) -{ -if (s->cis_mem.sys_start !=0 ) { - s->cis_mem.flags &= ~MAP_ACTIVE ; - s->ss_entry->set_mem_map (s->sock, &s->cis_mem); -if (!(s->cap.features &SS_CAP_STATIC_MAP )) -release_mem_region (s->cis_mem.sys_start, s->cap.map_size); -iounmap (s->cis_virt); - s->cis_mem.sys_start =0 ; - s->cis_virt =NULL ; } }
drivers/pcmcia/cs_internal.h +1 -2
@@ -233,8 +233,7 @@int copy_memory (memory_handle_t handle,copy_op_t *req);/* In rsrc_mgr */ -void validate_mem (int (*is_valid)(u_long ),int (*do_cksum)(u_long ), -int force_low,socket_info_t *s); +void validate_mem (socket_info_t *s);int find_io_region (ioaddr_t *base,ioaddr_t num,ioaddr_t align,char *name,socket_info_t *s); int find_mem_region(u_long *base, u_long num, u_long align,
drivers/pcmcia/rsrc_mgr.c +72 -18
171 lines not on this page · raw message
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Re: [BK PULL] (8/9) PCMCIA changes
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.889.359.7 -> 1.889.359.8
# drivers/pcmcia/cs_internal.h 1.8 -> 1.9
# drivers/pcmcia/cardbus.c 1.23.1.1 -> 1.23.1.2
# drivers/pcmcia/cistpl.c 1.10 -> 1.11
# drivers/pci/Makefile 1.24 -> 1.25
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/03/23 [email protected] 1.889.359.8
# [PCMCIA] pcmcia-10: Make cardbus use the new PCI functionality. #
# Now that we have the critical PCI changes in place, we can convert
# cardbus to use this PCI functionality. This allows us to scan # behind PCI to PCI bridges on cardbus cards, and setup the bus # resources using the generic PCI support code. # # Note that drivers/pci/setup-bus.c needs to be built when hotplug # (ie, cardbus) is enabled. # -------------------------------------------- # diff -Nru a/drivers/pci/Makefile b/drivers/pci/Makefile --- a/drivers/pci/Makefile Wed Mar 26 19:22:24 2003 +++ b/drivers/pci/Makefile Wed Mar 26 19:22:24 2003 @@ -29,6 +29,9 @@ obj-y += setup-bus.o endif
+# Hotplug (eg, cardbus) now requires setup-bus
+obj-$(CONFIG_HOTPLUG) += setup-bus.o
+
ifndef CONFIG_X86
obj-y += syscall.o
endif
drivers/pcmcia/cardbus.c +45 -98
@@ -89,10 +89,6 @@#define PCDATA_CODE_TYPE 0x0014#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
@@ -175,11 +171,10 @@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; - dev = s->cb_config->dev[0 ]; -/* Config space? */ if (space ==0 ) {if (addr + len >0x100 )
@@ -221,109 +216,61 @@=====================================================================*/ -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; -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 )); - } +struct pci_dev *dev; - irq = s->cap.pci_irq; -for (i =0 ; i < fn; i++) { -struct pci_dev *dev = c->dev[i]; +list_for_each_entry (dev, &bus->devices, bus_list) {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); -if (irq_pin) +if (irq_pin) { dev->irq = 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); +pci_write_config_byte (dev,PCI_INTERRUPT_LINE , dev->irq); + } + +if (dev->subordinate) +cardbus_assign_irqs (dev->subordinate, irq); } +} + +int cb_alloc (socket_info_t * s) +{ +struct pci_bus *bus = s->cap.cb_dev->subordinate; +struct pci_dev *dev; +unsigned int max, pass; + + s->functions =pci_scan_slot (bus,PCI_DEVFN (0 ,0 )); +// pcibios_fixup_bus(bus); + + max = bus->secondary; +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); + +/* +* Size all resources below the CardBus controller. +*/ +pci_bus_size_bridges (bus); +pci_bus_assign_resources (bus); +cardbus_assign_irqs (bus, s->cap.pci_irq); +pci_enable_bridges (bus); +pci_bus_add_devices (bus); - s->cb_config = c; - s->irq.AssignedIRQ = irq; + s->irq.AssignedIRQ = s->cap.pci_irq;return CS_SUCCESS ; }void cb_free (socket_info_t * s) { -cb_config_t *c = s->cb_config; +struct pci_dev *bridge = s->cap.cb_dev; -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); - } +pci_remove_behind_bridge (bridge); }
drivers/pcmcia/cistpl.c +2 -4
@@ -396,11 +396,9 @@ tuple->TupleLink = tuple->Flags =0 ;#ifdef CONFIG_CARDBUS if (s->state &SOCKET_CARDBUS ) { +struct pci_dev *dev = s->cap.cb_dev;u_int ptr; -struct pci_dev *dev =pci_find_slot (s->cap.cb_dev->subordinate->number,0 ); -if (!dev) -return CS_BAD_HANDLE ; -pci_read_config_dword (dev,0x28 , &ptr); +pci_bus_read_config_dword (dev->subordinate,0 ,PCI_CARDBUS_CIS , &ptr); tuple->CISOffset = ptr & ~7 ;SPACE (tuple->Flags) = (ptr &7 ); }else
drivers/pcmcia/cs_internal.h +0 -1
@@ -136,7 +136,6 @@#ifdef CONFIG_CARDBUS struct resource * cb_cis_res;u_char *cb_cis_virt; -struct cb_config_t *cb_config;#endif struct {u_int AssignedIRQ;
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Re: [BK PULL] (9/9) PCMCIA changes
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.889.359.8 -> 1.889.359.9
# drivers/pcmcia/Makefile 1.21 -> 1.22
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/03/24 [email protected].(none) 1.889.359.9
# [PCMCIA] drivers/pcmcia/Makefile tidyups
#
# (1) use the builtin foo-$(BAR) mechanism of the 2.5 kbuild
# (2) align all += foo.o statements
# --------------------------------------------
#
drivers/pcmcia/Makefile +33 -36
@@ -2,46 +2,43 @@ # Makefile for the kernel pcmcia subsystem (c/o David Hinds) # -obj-$(CONFIG_PCMCIA) += pcmcia_core.o ds.o +obj-$(CONFIG_PCMCIA) += pcmcia_core.o ds.o ifeq ($(CONFIG_CARDBUS),y) - obj-$(CONFIG_PCMCIA) += yenta_socket.o + obj-$(CONFIG_PCMCIA) += yenta_socket.o endif -obj-$(CONFIG_I82365) += i82365.o -obj-$(CONFIG_I82092) += i82092.o -obj-$(CONFIG_TCIC) += tcic.o -obj-$(CONFIG_HD64465_PCMCIA) += hd64465_ss.o -obj-$(CONFIG_PCMCIA_SA1100) += sa1100_cs.o -obj-$(CONFIG_PCMCIA_SA1111) += sa1111_cs.o +obj-$(CONFIG_I82365) += i82365.o +obj-$(CONFIG_I82092) += i82092.o +obj-$(CONFIG_TCIC) += tcic.o +obj-$(CONFIG_HD64465_PCMCIA) += hd64465_ss.o +obj-$(CONFIG_PCMCIA_SA1100) += sa1100_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-objs-$(CONFIG_CARDBUS) += cardbus.o -pcmcia_core-objs := $(pcmcia_core-objs-y) +pcmcia_core-y += cistpl.o rsrc_mgr.o bulkmem.o cs.o +pcmcia_core-$(CONFIG_CARDBUS) += cardbus.o -sa1111_cs-objs-y := sa1111_generic.o -sa1111_cs-objs-$(CONFIG_SA1100_ADSBITSY) += sa1100_adsbitsy.o -sa1111_cs-objs-$(CONFIG_ASSABET_NEPONSET) += sa1100_neponset.o -sa1111_cs-objs-$(CONFIG_SA1100_BADGE4) += sa1100_badge4.o -sa1111_cs-objs-$(CONFIG_SA1100_GRAPHICSMASTER) += sa1100_graphicsmaster.o -sa1111_cs-objs-$(CONFIG_SA1100_JORNADA720) += sa1100_jornada720.o -sa1111_cs-objs-$(CONFIG_SA1100_PFS168) += sa1100_pfs168.o -sa1111_cs-objs-$(CONFIG_SA1100_PT_SYSTEM3) += sa1100_system3.o -sa1111_cs-objs-$(CONFIG_SA1100_XP860) += sa1100_xp860.o -sa1111_cs-objs := $(sa1111_cs-objs-y) +sa1111_cs-y += sa1111_generic.o +sa1111_cs-$(CONFIG_SA1100_ADSBITSY) += sa1100_adsbitsy.o +sa1111_cs-$(CONFIG_ASSABET_NEPONSET) += sa1100_neponset.o +sa1111_cs-$(CONFIG_SA1100_BADGE4) += sa1100_badge4.o +sa1111_cs-$(CONFIG_SA1100_GRAPHICSMASTER) += sa1100_graphicsmaster.o +sa1111_cs-$(CONFIG_SA1100_JORNADA720) += sa1100_jornada720.o +sa1111_cs-$(CONFIG_SA1100_PFS168) += sa1100_pfs168.o +sa1111_cs-$(CONFIG_SA1100_PT_SYSTEM3) += sa1100_system3.o +sa1111_cs-$(CONFIG_SA1100_XP860) += sa1100_xp860.o -sa1100_cs-objs-y := sa1100_generic.o -sa1100_cs-objs-$(CONFIG_SA1100_ASSABET) += sa1100_assabet.o -sa1100_cs-objs-$(CONFIG_SA1100_CERF) += sa1100_cerf.o -sa1100_cs-objs-$(CONFIG_SA1100_FLEXANET) += sa1100_flexanet.o -sa1100_cs-objs-$(CONFIG_SA1100_FREEBIRD) += sa1100_freebird.o -sa1100_cs-objs-$(CONFIG_SA1100_GRAPHICSCLIENT) += sa1100_graphicsclient.o -sa1100_cs-objs-$(CONFIG_SA1100_H3600) += sa1100_h3600.o -sa1100_cs-objs-$(CONFIG_SA1100_PANGOLIN) += sa1100_pangolin.o -sa1100_cs-objs-$(CONFIG_SA1100_SHANNON) += sa1100_shannon.o -sa1100_cs-objs-$(CONFIG_SA1100_SIMPAD) += sa1100_simpad.o -sa1100_cs-objs-$(CONFIG_SA1100_STORK) += sa1100_stork.o -sa1100_cs-objs-$(CONFIG_SA1100_TRIZEPS) += sa1100_trizeps.o -sa1100_cs-objs-$(CONFIG_SA1100_YOPY) += sa1100_yopy.o -sa1100_cs-objs := $(sa1100_cs-objs-y) +sa1100_cs-y += sa1100_generic.o +sa1100_cs-$(CONFIG_SA1100_ASSABET) += sa1100_assabet.o +sa1100_cs-$(CONFIG_SA1100_CERF) += sa1100_cerf.o +sa1100_cs-$(CONFIG_SA1100_FLEXANET) += sa1100_flexanet.o +sa1100_cs-$(CONFIG_SA1100_FREEBIRD) += sa1100_freebird.o +sa1100_cs-$(CONFIG_SA1100_GRAPHICSCLIENT) += sa1100_graphicsclient.o +sa1100_cs-$(CONFIG_SA1100_H3600) += sa1100_h3600.o +sa1100_cs-$(CONFIG_SA1100_PANGOLIN) += sa1100_pangolin.o +sa1100_cs-$(CONFIG_SA1100_SHANNON) += sa1100_shannon.o +sa1100_cs-$(CONFIG_SA1100_SIMPAD) += sa1100_simpad.o +sa1100_cs-$(CONFIG_SA1100_STORK) += sa1100_stork.o +sa1100_cs-$(CONFIG_SA1100_TRIZEPS) += sa1100_trizeps.o +sa1100_cs-$(CONFIG_SA1100_YOPY) += sa1100_yopy.o
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Quoted 4 lines · Russell King
bk pull bk://bk.arm.linux.org.uk/linux-2.5-pcmciato include PCMCIA changes listed below. Patches for each cset will follow on LKML.
Pulled.
Russell, since you use BK _and_ you're working on PCMCIA, can you work as the middle man for the patches that Dominik has been sending out? They all look sane, and the "driver services" socket add/remove abstraction in particular looks like something that is needed. I just didn't have time to check them out more deeply and test them.
Dominik?
Linus
Quoted 9 lines · Linus Torvalds
Quoted 4 lines · Russell King
bk pull bk://bk.arm.linux.org.uk/linux-2.5-pcmciato include PCMCIA changes listed below. Patches for each cset will follow on LKML.
Pulled.
Quoted 7 lines
Russell, since you use BK _and_ you're working on PCMCIA, can you work as the middle man for the patches that Dominik has been sending out? They all look sane, and the "driver services" socket add/remove abstraction in particular looks like something that is needed. I just didn't have time to check them out more deeply and test them.
Dominik?
Fine with me - the four patches are on their way to Russell.
Dominik