From: Jan-Benedict G. <jb...@us...> - 2005-04-25 09:37:22
|
Update of /cvsroot/linux-vax/kernel-2.5/drivers/vax/bus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10024/bus Modified Files: cqbic.c qbus.c vsbus-ka4x.c vsbus.c Log Message: - Some more __iomem and whitespace updates. Index: cqbic.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/drivers/vax/bus/cqbic.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- cqbic.c 9 May 2004 23:39:58 -0000 1.3 +++ cqbic.c 25 Apr 2005 09:37:11 -0000 1.4 @@ -3,7 +3,7 @@ * * Support for the CQBIC (which I guess stands for something like * CVAX QBus Interface Chip). - * + * * This is the QBUS bus adapter used in the KA640/650/655. * Documentation is in the KA655 Technical manual * (EK-KA655-TM-001, available online via http://vt100.net/manx). @@ -35,13 +35,13 @@ static struct device_driver cqbic_driver; struct cqbic_private { - struct qbus_ops *bus_ops; + struct qbus_ops * bus_ops; DECLARE_BITMAP(vector_bitmap, QBUS_NUM_VECTORS); - unsigned int * mapregbase; - unsigned long iospace_phys_base; - unsigned int scb_offset; + unsigned int __iomem * mapregbase; + unsigned long iospace_phys_base; + unsigned int scb_offset; }; /* Given a (start, len), how many pagelets does this span? */ @@ -84,10 +84,10 @@ This is a very dumb allocator - does linear searches for available registers. Need a better way to do this. My first thought was to - use bits 30:0 in invalid map registers to contain forward and + use bits 30:0 in invalid map registers to contain forward and backward links to maintain a list of free registers. However, bits 30:20 are reserved (read as zero and should be written as zero), - so that only leaves us with 20 bits for links. This would be + so that only leaves us with 20 bits for links. This would be OK if we allow the allocation granularity to be 8 registers. - KPH */ @@ -121,7 +121,7 @@ map->virtaddr = start; map->busaddr = (reg * PAGELET_SIZE) + ((unsigned int)start & ~PAGELET_MASK); #if CQBIC_DEBUG - printk("Using map registers 0x%04x to 0x%04x to map virt %p to %p (bus %08x)\n", + printk("Using map registers 0x%04x to 0x%04x to map virt %p to %p (bus %08x)\n", reg, reg + pagelets - 1, start, (char *)start + len - 1, map->busaddr); #endif @@ -155,13 +155,13 @@ for (i=0; i<CQBIC_NUMMAPREGS; i++) { if (cqbic->mapregbase[i] != 0) { - printk("CQBIC map reg %04x = %08x (-> %08x)\n", i, + printk("CQBIC map reg %04x = %08x (-> %08x)\n", i, cqbic->mapregbase[i], (cqbic->mapregbase[i] & 0xfffff) << PAGELET_SHIFT); } } } - + /* Traditionally, QBUS interrupt vectors are multiples of 4. */ @@ -178,7 +178,7 @@ const char * devname, void *dev_id) { - return request_irq(cqbic_vector_to_irq(busdev, vector), + return request_irq(cqbic_vector_to_irq(busdev, vector), handler, irqflags, devname, dev_id); } @@ -192,7 +192,7 @@ return test_and_set_bit(vector / 4, cqbic->vector_bitmap); } -/* Locate an available interrupt vector and mark it reserved. Return 0 +/* Locate an available interrupt vector and mark it reserved. Return 0 if none available. */ static unsigned int cqbic_alloc_vector(struct device *busdev) @@ -267,7 +267,7 @@ static int __init cqbic_probe(struct device *busdev) { int i; - void *cqbic_iospace; + void __iomem *cqbic_iospace; struct cqbic_private *cqbic; cqbic = kmalloc(sizeof(*cqbic), GFP_KERNEL); @@ -283,14 +283,14 @@ cqbic->iospace_phys_base = CQBIC_IOSPACE_BASE; - /* The CQBIC maps QBUS interrupts to the second page of the SCB + /* The CQBIC maps QBUS interrupts to the second page of the SCB (each page of the SCB contains 128 vectors). */ cqbic->scb_offset = 128; /* Mark vector 0 as reserved */ set_bit(0, cqbic->vector_bitmap); - cqbic->mapregbase = (unsigned int *)ioremap(CQBIC_MAPREGPHYS, + cqbic->mapregbase = (unsigned int *)ioremap(CQBIC_MAPREGPHYS, CQBIC_NUMMAPREGS * sizeof(unsigned int)); #if CQBIC_DEBUG printk("CQBIC map registers mapped at %p\n", cqbic->mapregbase); @@ -324,7 +324,7 @@ }; int __init cqbic_init(void) -{ +{ return driver_register(&cqbic_driver); } Index: qbus.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/drivers/vax/bus/qbus.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- qbus.c 26 Apr 2004 23:29:52 -0000 1.9 +++ qbus.c 25 Apr 2005 09:37:11 -0000 1.10 @@ -20,7 +20,7 @@ #define QBUS_DEBUG 0 -/* These DMA, memory mapping and IRQ handling functions isolate +/* These DMA, memory mapping and IRQ handling functions isolate drivers for QBUS devices from the details of how the QBUS is hooked up to the rest of the system */ Index: vsbus.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/drivers/vax/bus/vsbus.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- vsbus.c 28 Feb 2005 22:46:19 -0000 1.3 +++ vsbus.c 25 Apr 2005 09:37:11 -0000 1.4 @@ -1,20 +1,20 @@ /* * $Id$ * - * Support for the VSBUS pseudo-bus type. + * Support for the VSBUS pseudo-bus type. * - * As far as I can make out, VAXstation 3100, MicroVAX 3100 and - * VAXstation 4000 series machines have a chunk of bus interface + * As far as I can make out, VAXstation 3100, MicroVAX 3100 and + * VAXstation 4000 series machines have a chunk of bus interface * circuitry between the main CPU-memory bus and the on-board * peripheral chips (ethernet controller, SCSI controller, etc). * I imagine that this 'bus adapter' is responsible for mapping - * device interrupt lines to VAX SCB vectors, doing address - * line decoding to locate these devices in I/O space and + * device interrupt lines to VAX SCB vectors, doing address + * line decoding to locate these devices in I/O space and * provide DMA facilities to main memory. * * It would be real nice to see a datasheet or tech manual * for one of these boards. - * + * * This file implements the drivel model 'bus type' for the VSBUS * and the common features of all the VSBUS implementations. * @@ -31,7 +31,7 @@ #define VSBUS_DEBUG 1 -static struct vsbus_registers *vs_cpu_ptr; +static struct vsbus_registers __iomem *vs_cpu_ptr; static unsigned int vsbus_rom_vectors[VSBUS_NR_IRQS]; @@ -73,7 +73,7 @@ causes the ROM to place the longword at that address on the data bus, which the CPU picks up as the interrupt vector. - So, in summary, the firmware ROM contains an 8-longword table + So, in summary, the firmware ROM contains an 8-longword table at physical address 0x20040020, which contains the interrupt vectors. The hardware-specific driver fills in this table. */ @@ -118,7 +118,7 @@ return info->handler(irq, info->dev_id, regs); } -int vsbus_request_irq(unsigned int vsbus_irqindex, +int vsbus_request_irq(unsigned int vsbus_irqindex, irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long irqflags, const char *devname, void *dev_id) { @@ -131,7 +131,7 @@ } info = irqinfo + vsbus_irqindex; - + /* FIXME: need a semaphore here */ if (info->handler) { @@ -181,7 +181,7 @@ } -void vsbus_add_fixed_device(struct device *parent, char *name, +void vsbus_add_fixed_device(struct device *parent, char *name, unsigned int phys_base, unsigned int irqindex) { struct vsbus_device *vsbus_dev; @@ -240,7 +240,7 @@ } /* This gets called for each device when a new driver is - registered. Since the set of devices that can appear on + registered. Since the set of devices that can appear on the VSBUS is very limited, we can get away with a very simple name-based match. */ Index: vsbus-ka4x.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/drivers/vax/bus/vsbus-ka4x.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- vsbus-ka4x.c 18 Sep 2004 23:06:33 -0000 1.3 +++ vsbus-ka4x.c 25 Apr 2005 09:37:11 -0000 1.4 @@ -19,12 +19,12 @@ static int __init vsbus_ka4x_probe(struct device *busdev) { - unsigned int *vectors; + unsigned int __iomem *vectors; int retval; /* * Map the area where we expect to find our device - * interrupt vectors so that we can copy them somewhere + * interrupt vectors so that we can copy them somewhere * more convenient */ |