[parisc-linux-cvs] pdc_register_device + WAX
Matthew Wilcox
willy@ldl.fc.hp.com
Sun, 08 Jul 2001 20:35:14 -0600
-pa7
* Change register_driver into pdc_register_driver. (1) This name is much
too generic for us to coopt it, and (2) PCMCIA already did :-)
* Fix WAX EISA a little bit.
Index: Documentation/pci.txt
===================================================================
RCS file: /home/cvs/parisc/linux/Documentation/pci.txt,v
retrieving revision 1.7
diff -u -p -r1.7 pci.txt
--- pci.txt 2001/07/05 21:31:18 1.7
+++ pci.txt 2001/07/09 02:15:00
@@ -80,7 +80,7 @@ Each entry consists of:
class_mask of the class are honored during the comparison.
driver_data Data private to the driver.
-When the driver exits, it just calls pci_deregister_driver() and the PCI layer
+When the driver exits, it just calls pci_unregister_driver() and the PCI layer
automatically calls the remove hook for all devices handled by the driver.
Please mark the initialization and cleanup functions where appropriate
Index: arch/parisc/kernel/ccio-dma.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/ccio-dma.c,v
retrieving revision 1.30
diff -u -p -r1.30 ccio-dma.c
--- ccio-dma.c 2001/04/14 07:13:47 1.30
+++ ccio-dma.c 2001/07/09 02:15:00
@@ -1537,5 +1537,5 @@ ccio_init(void)
{
ccio_list = (struct ccio_device *)NULL;
ccio_count = 0;
- register_driver(ccio_drivers_for);
+ pdc_register_driver(ccio_drivers_for);
}
Index: arch/parisc/kernel/ccio-rm-dma.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/ccio-rm-dma.c,v
retrieving revision 1.1
diff -u -p -r1.1 ccio-rm-dma.c
--- ccio-rm-dma.c 2000/08/05 06:09:21 1.1
+++ ccio-rm-dma.c 2001/07/09 02:15:00
@@ -89,7 +89,7 @@ static struct pa_iodc_driver ccio_driver
void __init ccio_init(void)
{
- register_driver(ccio_drivers_for);
+ pdc_register_driver(ccio_drivers_for);
}
Index: arch/parisc/kernel/drivers.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/drivers.c,v
retrieving revision 1.15
diff -u -p -r1.15 drivers.c
--- drivers.c 2001/04/06 05:10:54 1.15
+++ drivers.c 2001/07/09 02:15:00
@@ -43,7 +43,7 @@ static int compare_spec( struct hp_devic
return 1;
}
-int register_driver(struct pa_iodc_driver *driver)
+int pdc_register_driver(struct pa_iodc_driver *driver)
{
int i;
struct hp_device * device;
@@ -85,7 +85,7 @@ int register_driver(struct pa_iodc_drive
-int unregister_driver(struct pa_iodc_driver *driver)
+int pdc_unregister_driver(struct pa_iodc_driver *driver)
{
int i;
@@ -106,7 +106,7 @@ int unregister_driver(struct pa_iodc_dri
}
if(prev==NULL) {
- printk(KERN_WARNING "unregister_driver: %s %s wasn't registered\n", driver->name, driver->version);
+ printk(KERN_WARNING "pdc_unregister_driver: %s %s wasn't registered\n", driver->name, driver->version);
continue;
} else {
/* Drop driver from list */
Index: arch/parisc/kernel/lba_pci.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/lba_pci.c,v
retrieving revision 1.27
diff -u -p -r1.27 lba_pci.c
--- lba_pci.c 2001/06/24 12:25:22 1.27
+++ lba_pci.c 2001/07/09 02:15:00
@@ -46,7 +46,7 @@
#include <asm/segment.h>
#include <asm/system.h>
-#include <asm/hardware.h> /* for register_driver() stuff */
+#include <asm/hardware.h> /* for pdc_register_driver() stuff */
#include <asm/iosapic.h> /* for iosapic_register() */
#include <asm/gsc.h> /* gsc_read/write stuff */
@@ -283,7 +283,7 @@ static u32 lba_t32;
*/
void __init lba_init(void)
{
- register_driver(lba_drivers_for);
+ pdc_register_driver(lba_drivers_for);
}
Index: arch/parisc/kernel/parisc_ksyms.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/parisc_ksyms.c,v
retrieving revision 1.22
diff -u -p -r1.22 parisc_ksyms.c
--- parisc_ksyms.c 2001/06/25 14:18:47 1.22
+++ parisc_ksyms.c 2001/07/09 02:15:00
@@ -84,7 +84,8 @@ EXPORT_SYMBOL(_gsc_readb);
EXPORT_SYMBOL(_gsc_readw);
EXPORT_SYMBOL(_gsc_readl);
EXPORT_SYMBOL(busdevice_alloc_irq);
-EXPORT_SYMBOL(register_driver);
+EXPORT_SYMBOL(pdc_register_driver);
+EXPORT_SYMBOL(pdc_unregister_driver);
EXPORT_SYMBOL(gsc_alloc_irq);
EXPORT_SYMBOL(pdc_iodc_read);
@@ -114,9 +115,6 @@ EXPORT_SYMBOL(__down);
#include <linux/in6.h>
#include <asm/checksum.h>
EXPORT_SYMBOL(csum_partial_copy);
-
-#include <asm/hardware.h>
-EXPORT_SYMBOL(unregister_driver);
#include <asm/pdc.h>
EXPORT_SYMBOL(pdc_add_valid);
Index: arch/parisc/kernel/sba_iommu.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/sba_iommu.c,v
retrieving revision 1.46
diff -u -p -r1.46 sba_iommu.c
--- sba_iommu.c 2001/05/15 22:57:58 1.46
+++ sba_iommu.c 2001/07/09 02:15:00
@@ -36,7 +36,7 @@
#include <asm/io.h>
#include <asm/dma.h> /* for DMA_CHUNK_SIZE */
-#include <asm/hardware.h> /* for register_driver() stuff */
+#include <asm/hardware.h> /* for pdc_register_driver() stuff */
#include <asm/gsc.h> /* FIXME: for gsc_read/gsc_write */
#include <linux/proc_fs.h>
@@ -461,7 +461,7 @@ sba_init(void)
sba_dump_ranges((char *) 0xFED00000L);
#endif
- register_driver(sba_drivers_for);
+ pdc_register_driver(sba_drivers_for);
}
Index: arch/parisc/kernel/setup.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/setup.c,v
retrieving revision 1.84
diff -u -p -r1.84 setup.c
--- setup.c 2001/06/20 20:24:32 1.84
+++ setup.c 2001/07/09 02:15:00
@@ -51,7 +51,7 @@
#include <linux/threads.h>
#include <asm/cache.h>
-#include <asm/hardware.h> /* for register_driver() stuff */
+#include <asm/hardware.h> /* for pdc_register_driver() stuff */
#include <asm/processor.h>
#include <asm/page.h>
#include <asm/pdc.h>
@@ -97,7 +97,7 @@ int EISA_bus;
** The callback *should* do per-instance initialization of
** everything including the monarch. "Per CPU" init code in
** setup.c:start_parisc() has migrated here and start_parisc()
-** will "register_driver(cpu_driver_for)" before calling do_inventory().
+** will "pdc_register_driver(cpu_driver_for)" before calling do_inventory().
**
** The goal of consolidating CPU initialization into one place is
** to make sure all CPU's get initialized the same way.
@@ -417,7 +417,7 @@ void __init setup_arch(char **cmdline_p)
dma_ops_init();
do_device_inventory(); /* probe for hardware */
- register_driver(cpu_drivers_for); /* claim all the CPUs */
+ pdc_register_driver(cpu_drivers_for); /* claim all the CPUs */
if (boot_cpu_data.cpu_count == 0)
register_fallback_cpu();
Index: drivers/char/hp_psaux.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/char/hp_psaux.c,v
retrieving revision 1.9
diff -u -p -r1.9 hp_psaux.c
--- hp_psaux.c 2001/07/08 12:41:53 1.9
+++ hp_psaux.c 2001/07/09 02:15:00
@@ -544,7 +544,7 @@ static struct pa_iodc_driver lasi_psaux_
static int __init gsc_ps2_init(void)
{
- return register_driver(lasi_psaux_drivers_for);
+ return pdc_register_driver(lasi_psaux_drivers_for);
}
module_init(gsc_ps2_init);
Index: drivers/gsc/busdevice.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/gsc/busdevice.c,v
retrieving revision 1.21
diff -u -p -r1.21 busdevice.c
--- busdevice.c 2001/07/08 12:41:54 1.21
+++ busdevice.c 2001/07/09 02:15:00
@@ -247,12 +247,12 @@ extern void register_wax_eisa_driver(voi
void __init busdevices_init(void)
{
- register_driver(busdev_drivers_for);
-
+ pdc_register_driver(busdev_drivers_for);
+
#ifdef CONFIG_GSC_WAX
register_wax_driver();
#endif
-
+
#ifdef CONFIG_WAX_EISA
register_wax_eisa_driver();
#endif
Index: drivers/gsc/dino.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/gsc/dino.c,v
retrieving revision 1.30
diff -u -p -r1.30 dino.c
--- dino.c 2001/07/08 12:41:54 1.30
+++ dino.c 2001/07/09 02:15:00
@@ -380,7 +380,7 @@ int __init dino_init(void)
/* This claim any Dino devices discovered to date
** and invoke our driver_callback.
*/
- register_driver(dino_drivers_for);
+ pdc_register_driver(dino_drivers_for);
return 0;
}
Index: drivers/gsc/hil.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/gsc/hil.c,v
retrieving revision 1.5
diff -u -p -r1.5 hil.c
--- hil.c 2001/07/08 12:41:54 1.5
+++ hil.c 2001/07/09 02:15:00
@@ -60,7 +60,7 @@ static struct pa_iodc_driver hil_drivers
static int __init
register_hil_drivers(void)
{
- return register_driver(hil_drivers_for);
+ return pdc_register_driver(hil_drivers_for);
}
module_init(register_hil_drivers);
Index: drivers/gsc/lan.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/gsc/lan.c,v
retrieving revision 1.8
diff -u -p -r1.8 lan.c
--- lan.c 2001/07/08 12:41:54 1.8
+++ lan.c 2001/07/09 02:15:00
@@ -79,7 +79,7 @@ static struct pa_iodc_driver lan_drivers
static int __init
register_lan_drivers(void)
{
- return register_driver(lan_drivers_for);
+ return pdc_register_driver(lan_drivers_for);
}
module_init(register_lan_drivers);
Index: drivers/gsc/serial.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/gsc/serial.c,v
retrieving revision 1.14
diff -u -p -r1.14 serial.c
--- serial.c 2001/07/08 12:41:54 1.14
+++ serial.c 2001/07/09 02:15:00
@@ -176,5 +176,5 @@ probe_serial_gsc(void)
#ifdef CONFIG_SUPERIO
superio_serial_init();
#endif
- register_driver(serial_drivers_for);
+ pdc_register_driver(serial_drivers_for);
}
Index: drivers/gsc/wax.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/gsc/wax.c,v
retrieving revision 1.8
diff -u -p -r1.8 wax.c
--- wax.c 2001/07/08 12:41:54 1.8
+++ wax.c 2001/07/09 02:15:00
@@ -146,6 +146,6 @@ static struct pa_iodc_driver wax_driver_
int __init register_wax_driver(void)
{
- return register_driver(wax_driver_for);
+ return pdc_register_driver(wax_driver_for);
}
Index: drivers/gsc/wax_eisa.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/gsc/wax_eisa.c,v
retrieving revision 1.5
diff -u -p -r1.5 wax_eisa.c
--- wax_eisa.c 2001/07/08 12:41:54 1.5
+++ wax_eisa.c 2001/07/09 02:15:00
@@ -41,15 +41,9 @@
#define WAX_EISA_OUT(type, size) \
static void wax_out##type (struct pci_hba_data *hba, u16 addr, u##size d) \
{ \
- u32 out_addr; \
- if (((addr >= 0x00080000) && (addr < 0x00100000)) || \
- ((addr >= 0x00500000) && (addr < 0x03C00000))) { \
- out_addr = 0xfc000000 + ((addr & 0xfc00) >> 6) + \
- ((addr & 0x03f8) << 9) + (addr & 0x0007) ; \
- gsc_write##type(d,out_addr); \
- } else { \
- printk(KERN_ERR "Wax EISA: Ack, cannot write to 0x%x\n",addr); \
- } \
+ u32 out_addr = 0xfc000000 | ((addr & 0xfc00) >> 6) | \
+ ((addr & 0x03f8) << 9) | (addr & 0x0007) ; \
+ gsc_write##type(d,out_addr); \
}
WAX_EISA_OUT(b,8)
@@ -62,16 +56,9 @@ WAX_EISA_OUT(l,32)
#define WAX_EISA_IN(type, size) \
static u##size wax_in##type (struct pci_hba_data *hba, u16 addr) \
{ \
- u32 out_addr; \
- if (((addr >= 0x00080000) && (addr < 0x00100000)) || \
- ((addr >= 0x00500000) && (addr < 0x03C00000))) { \
- out_addr = 0xfc000000 + ((addr & 0xfc00) >> 6) + \
- ((addr & 0x03f8) << 9) + (addr & 0x0007) ; \
- return gsc_read##type(out_addr); \
- } else { \
- printk(KERN_ERR "Wax EISA: Ack, cannot read from 0x%x\n",addr); \
- return -1; \
- } \
+ u32 out_addr = 0xfc000000 | ((addr & 0xfc00) >> 6) | \
+ ((addr & 0x03f8) << 9) | (addr & 0x0007) ; \
+ return gsc_read##type(out_addr); \
}
WAX_EISA_IN(b,8)
@@ -93,7 +80,7 @@ static struct pci_port_ops wax_port_ops
struct wax_eisa_device
{
struct pci_hba_data hba; /* 'C' inheritance - must be first */
- spinlock_t dinosaur_pen;
+ spinlock_t dinosaur_pen;
int version;
unsigned long txn_addr; /* EIR addr to generate interrupt */
u32 txn_data; /* EIR data assign to each */
@@ -166,6 +153,6 @@ static struct pa_iodc_driver wax_eisa_dr
int __init
register_wax_eisa_driver(void)
{
- return register_driver(wax_eisa_drivers_for);
+ return pdc_register_driver(wax_eisa_drivers_for);
}
Index: drivers/parport/parport_gsc.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/parport/parport_gsc.c,v
retrieving revision 1.12
diff -u -p -r1.12 parport_gsc.c
--- parport_gsc.c 2001/07/05 23:42:23 1.12
+++ parport_gsc.c 2001/07/09 02:15:01
@@ -506,7 +506,7 @@ int __devinit parport_gsc_init(void)
{
parport_count = 0;
- register_driver(parport_drivers_for);
+ pdc_register_driver(parport_drivers_for);
return 0;
}
Index: drivers/scsi/lasi7xx.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/scsi/lasi7xx.c,v
retrieving revision 1.16
diff -u -p -r1.16 lasi7xx.c
--- lasi7xx.c 2001/06/25 23:39:46 1.16
+++ lasi7xx.c 2001/07/09 02:15:01
@@ -37,7 +37,7 @@
/* hosts_* are kluges to pass info between the lasi7xx_detected()
-** and the register_driver() callbacks.
+** and the pdc_register_driver() callbacks.
*/
static Scsi_Host_Template *hosts_tptr;
static int hosts_used;
@@ -76,7 +76,7 @@ int lasi7xx_detect(Scsi_Host_Template *t
/* This will cause *all* known devices which match entries
** in lasi_scsi_drivers[] to get invoked and registered.
*/
- register_driver(lasi_scsi_drivers);
+ pdc_register_driver(lasi_scsi_drivers);
/*
** Check if any callbacks actually found/claimed anything.
Index: drivers/scsi/zalon7xx.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/scsi/zalon7xx.c,v
retrieving revision 1.7
diff -u -p -r1.7 zalon7xx.c
--- zalon7xx.c 2001/06/20 20:24:35 1.7
+++ zalon7xx.c 2001/07/09 02:15:01
@@ -34,7 +34,7 @@ typedef u_long vm_offset_t;
/* hosts_* are kluges to pass info between the zalon7xx_detected()
-** and the register_driver() callbacks.
+** and the pdc_register_driver() callbacks.
*/
static Scsi_Host_Template *hosts_tptr;
static int hosts_used=0;
@@ -68,7 +68,7 @@ int zalon7xx_detect(Scsi_Host_Template *
/*
** claim all zalon cards.
*/
- register_driver(zalon_scsi_drivers);
+ pdc_register_driver(zalon_scsi_drivers);
/*
** Check if any callbacks actually found/claimed anything.
Index: drivers/sound/harmony.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/sound/harmony.c,v
retrieving revision 1.10
diff -u -p -r1.10 harmony.c
--- harmony.c 2001/04/06 15:00:15 1.10
+++ harmony.c 2001/07/09 02:15:01
@@ -1220,7 +1220,7 @@ static struct pa_iodc_driver harmony_dri
static int __init init_harmony(void)
{
- register_driver(harmony_drivers_for);
+ pdc_register_driver(harmony_drivers_for);
return 0;
}
@@ -1230,7 +1230,7 @@ static void __exit cleanup_harmony(void)
unregister_sound_mixer(harmony.mixer_unit);
unregister_sound_dsp(harmony.dsp_unit);
release_mem_region((unsigned long)harmony.hpa, 13);
- unregister_driver(harmony_drivers_for);
+ pdc_unregister_driver(harmony_drivers_for);
}
EXPORT_NO_SYMBOLS;
Index: include/asm-parisc/hardware.h
===================================================================
RCS file: /home/cvs/parisc/linux/include/asm-parisc/hardware.h,v
retrieving revision 1.16
diff -u -p -r1.16 hardware.h
--- hardware.h 2001/03/02 10:31:51 1.16
+++ hardware.h 2001/07/09 02:15:01
@@ -112,8 +112,8 @@ extern int register_pa_dev(struct hp_dev
extern int add_pa_dev_addr(struct hp_device *hp_device, unsigned long addr);
extern struct hp_device *get_pa_dev(unsigned int index);
extern void print_pa_devices(char * buf);
-extern int register_driver(struct pa_iodc_driver *driver);
-extern int unregister_driver(struct pa_iodc_driver *driver);
+extern int pdc_register_driver(struct pa_iodc_driver *driver);
+extern int pdc_unregister_driver(struct pa_iodc_driver *driver);
/* inventory.c: */
extern void do_memory_inventory(void);