[parisc-linux-cvs] fix hardware database reference and use named initializers

Helge Deller deller@gmx.de
Tue, 28 Aug 2001 10:18:10 +0200


Index: ccio-dma.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/ccio-dma.c,v
retrieving revision 1.36
diff -u -r1.36 ccio-dma.c
--- ccio-dma.c	2001/08/21 04:41:06	1.36
+++ ccio-dma.c	2001/08/28 08:13:32
@@ -173,6 +173,7 @@
 	u32 chainid_shift; 		/* specify bit location of chain_id */
 	struct ccio_device *ioa;
 	struct parisc_device_id *iodc;	/* data about dev from firmware */
+	const char *name;		/* device name from firmware */
 };
 
 struct ccio_device {
@@ -1130,8 +1131,7 @@
 			unsigned int total_pages = ioc->res_size << 3;
 
 			sprintf(buf, "%s%s rev %d.%d\n", buf,
-				parisc_getHWdescription(ioc->iodc->hw_type, ioc->iodc->hversion, 
-							ioc->iodc->sversion),
+				ioc->name,
 				(ioc->ioa->hw_rev & 0x7) + 1, (ioc->ioa->hw_rev & 0x18) >> 3);
 			
 			sprintf(buf, "%sCujo 2.0 bug    : %s\n",
@@ -1496,6 +1496,7 @@
 	}
 
 	ioa->ioc[i].iodc = &dev->id;
+	ioa->ioc[i].name = dev->name;
 	ioa->ioc[i].ioc_hpa = (struct ioa_registers *)dev->hpa;
 	ioa->ioc[i].ioa = ioa;
 	ccio_ioc_init(&ioa->ioc[i]);
Index: lba_pci.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/lba_pci.c,v
retrieving revision 1.33
diff -u -r1.33 lba_pci.c
--- lba_pci.c	2001/08/24 14:45:03	1.33
+++ lba_pci.c	2001/08/28 08:13:33
@@ -291,7 +291,7 @@
 ** The workaround is only used for device discovery.
 */
 
-static int
+static int __init
 lba_device_present( u8 bus, u8 dfn, struct lba_device *d)
 {
 	u8 first_bus = d->hba.hba_bus->secondary;
@@ -944,8 +944,12 @@
 
 
 static struct pci_port_ops lba_astro_port_ops = {
-	lba_astro_in8, lba_astro_in16, lba_astro_in32,
-	lba_astro_out8, lba_astro_out16, lba_astro_out32
+	inb:	lba_astro_in8,
+	inw:	lba_astro_in16,
+	inl:	lba_astro_in32,
+	outb:	lba_astro_out8,
+	outw:	lba_astro_out16,
+	outl:	lba_astro_out32
 };
 
 
@@ -1000,8 +1004,12 @@
 
 
 static struct pci_port_ops lba_pat_port_ops = {
-	lba_pat_in8, lba_pat_in16, lba_pat_in32,
-	lba_pat_out8, lba_pat_out16, lba_pat_out32
+	inb:	lba_pat_in8,
+	inw:	lba_pat_in16,
+	inl:	lba_pat_in32,
+	outb:	lba_pat_out8,
+	outw:	lba_pat_out16,
+	outl:	lba_pat_out32
 };
 
 
@@ -1203,7 +1211,7 @@
 **
 **************************************************************************/
 
-static int
+static int __init
 lba_hw_init(struct lba_device *d)
 {
 	u32 stat;
@@ -1280,7 +1288,7 @@
 
 
 
-static void
+static void __init
 lba_common_init(struct lba_device *lba_dev)
 {
 	pci_bios = &lba_bios_ops;
@@ -1302,7 +1310,7 @@
 ** If so, initialize the chip and tell other partners in crime they
 ** have work to do.
 */
-static __init int
+static int __init
 lba_driver_callback(struct parisc_device *dev)
 {
 	struct lba_device *lba_dev;
@@ -1458,7 +1466,8 @@
 ** Initialize the IBASE/IMASK registers for LBA (Elroy).
 ** Only called from sba_iommu.c initialization sequence.
 */
-void lba_init_iregs(void *sba_hpa, u32 ibase, u32 imask)
+void __init
+lba_init_iregs(void *sba_hpa, u32 ibase, u32 imask)
 {
 	extern struct pci_hba_data *hba_list;	/* arch/parisc/kernel/pci.c */
 	struct pci_hba_data *lba;
Index: sba_iommu.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/sba_iommu.c,v
retrieving revision 1.50
diff -u -r1.50 sba_iommu.c
--- sba_iommu.c	2001/08/16 20:57:18	1.50
+++ sba_iommu.c	2001/08/28 08:13:35
@@ -238,6 +238,7 @@
 struct sba_device {
 	struct sba_device	*next;	/* list of LBA's in system */
 	struct parisc_device_id	*iodc;	/* data about dev from firmware */
+	const char 		*name;
 	unsigned long		sba_hpa; /* base address */
 	spinlock_t		sba_lock;
 	unsigned int		flags;  /* state/functionality enabled */
@@ -1559,8 +1560,7 @@
 	unsigned long i = 0, avg = 0, min, max;
 
 	sprintf(buf, "%s rev %d.%d\n",
-		parisc_getHWdescription(sba_dev->iodc->hw_type,
-			sba_dev->iodc->hversion, sba_dev->iodc->sversion),
+		sba_dev->name,
 		(sba_dev->hw_rev & 0x7) + 1,
 		(sba_dev->hw_rev & 0x18) >> 3
 		);
@@ -1675,6 +1675,7 @@
 
 	sba_dev->hw_rev = func_class;
 	sba_dev->iodc = &dev->id;
+	sba_dev->name = dev->name;
 	sba_dev->sba_hpa = dev->hpa;  /* faster access */
 
 	sba_get_pat_resources(sba_dev);