MODULE_NAME, version, func_class & 0xf, dev->hpa); 
MODULE_NAME, version, func_class & 0xf, dev->hpa.start); 
lba_driver_probe(struct parisc_device *dev){	struct lba_device *lba_dev;	struct pci_bus *lba_bus;	struct pci_ops *cfg_ops;	u32 func_class;	void *tmp_obj;	char *version;	void __iomem *addr = ioremap(dev->hpa, 4096);	/* Read HW Rev First */	func_class = READ_REG32(addr + LBA_FCLASS);	if (IS_ELROY(dev)) {			func_class &= 0xf;		switch (func_class) {		case 0:	version = "TR1.0"; break;		case 1:	version = "TR2.0"; break;		case 2:	version = "TR2.1"; break;		case 3:	version = "TR2.2"; break;		case 4:	version = "TR3.0"; break;		case 5:	version = "TR4.0"; break;		default: version = "TR4+";		}		printk(KERN_INFO "%s version %s (0x%x) found at 0x%lx\n",			MODULE_NAME, version, func_class & 0xf, dev->hpa);		if (func_class < 2) {			printk(KERN_WARNING "Can't support LBA older than "				"TR2.1 - continuing under adversity.\n");		}#if 0/* Elroy TR4.0 should work with simple algorithm.   But it doesn't.  Still missing something. *sigh**/		if (func_class > 4) {			cfg_ops = &mercury_cfg_ops;		} else#endif		{			cfg_ops = &elroy_cfg_ops;		}	} else if (IS_MERCURY(dev) || IS_QUICKSILVER(dev)) {		func_class &= 0xff;		version = kmalloc(6, GFP_KERNEL);		sprintf(version,"TR%d.%d",(func_class >> 4),(func_class & 0xf));		/* We could use one printk for both Elroy and Mercury,                 * but for the mask for func_class.                 */ 		printk(KERN_INFO "%s version %s (0x%x) found at 0x%lx\n",			MODULE_NAME, version, func_class & 0xff, dev->hpa);		cfg_ops = &mercury_cfg_ops;	} else {		printk(KERN_ERR "Unknown LBA found at 0x%lx\n", dev->hpa);		return -ENODEV;	}	/*	** Tell I/O SAPIC driver we have a IRQ handler/region.	*/	tmp_obj = iosapic_register(dev->hpa + LBA_IOSAPIC_BASE);	/* NOTE: PCI devices (e.g. 103c:1005 graphics card) which don't	**	have an IRT entry will get NULL back from iosapic code.	*/		lba_dev = kmalloc(sizeof(struct lba_device), GFP_KERNEL);	if (!lba_dev) {		printk(KERN_ERR "lba_init_chip - couldn't alloc lba_device\n");		return(1);	}	memset(lba_dev, 0, sizeof(struct lba_device));	/* ---------- First : initialize data we already have --------- */	lba_dev->hw_rev = func_class;	lba_dev->hba.base_addr = addr;	lba_dev->hba.dev = dev;	lba_dev->iosapic_obj = tmp_obj;  /* save interrupt handle */	lba_dev->hba.iommu = sba_get_iommu(dev);  /* get iommu data */	/* ------------ Second : initialize common stuff ---------- */	pci_bios = &lba_bios_ops;	pcibios_register_hba(HBA_DATA(lba_dev));	spin_lock_init(&lba_dev->lba_lock);	if (lba_hw_init(lba_dev))		return(1);	/* ---------- Third : setup I/O Port and MMIO resources  --------- */	if (is_pdc_pat()) {		/* PDC PAT firmware uses PIOP region of GMMIO space. */		pci_port = &lba_pat_port_ops;		/* Go ask PDC PAT what resources this LBA has */		lba_pat_resources(dev, lba_dev);	} else {		if (!astro_iop_base) {			/* Sprockets PDC uses NPIOP region */			astro_iop_base = ioremap(LBA_PORT_BASE, 64 * 1024);			pci_port = &lba_astro_port_ops;		}		/* Poke the chip a bit for /proc output */		lba_legacy_resources(dev, lba_dev);	}	/* 	** Tell PCI support another PCI bus was found.	** Walks PCI bus for us too.	*/	dev->dev.platform_data = lba_dev;	lba_bus = lba_dev->hba.hba_bus =		pci_scan_bus_parented(&dev->dev, lba_dev->hba.bus_num.start,				cfg_ops, NULL);	if (lba_bus)		pci_bus_add_devices(lba_bus);	/* This is in lieu of calling pci_assign_unassigned_resources() */	if (is_pdc_pat()) {		/* assign resources to un-initialized devices */		DBG_PAT("LBA pci_bus_size_bridges()\n");		pci_bus_size_bridges(lba_bus);		DBG_PAT("LBA pci_bus_assign_resources()\n");		pci_bus_assign_resources(lba_bus);#ifdef DEBUG_LBA_PAT		DBG_PAT("\nLBA PIOP resource tree\n");		lba_dump_res(&lba_dev->hba.io_space, 2);		DBG_PAT("\nLBA LMMIO resource tree\n");		lba_dump_res(&lba_dev->hba.lmmio_space, 2);#endif	}	pci_enable_bridges(lba_bus);	/*	** Once PCI register ops has walked the bus, access to config	** space is restricted. Avoids master aborts on config cycles.	** Early LBA revs go fatal on *any* master abort.	*/	if (cfg_ops == &elroy_cfg_ops) {		lba_dev->flags |= LBA_FLAG_SKIP_PROBE;	}	/* Whew! Finally done! Tell services we got this one covered. */	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/53f01bba49938f115237fe43a261c31ac13ae5c6/lba_pci.c/clean/drivers/parisc/lba_pci.c