static void __init schizo_pbm_init(struct pci_controller_info *p, int prom_node, u32 portid, int chip_type) 
static void schizo_pbm_init(struct pci_controller_info *p, int prom_node, u32 portid, int chip_type) 
static void __init schizo_pbm_init(struct pci_controller_info *p,				   int prom_node, u32 portid,				   int chip_type){	struct linux_prom64_registers pr_regs[4];	unsigned int busrange[2];	struct pci_pbm_info *pbm;	const char *chipset_name;	u32 ino_bitmap[2];	int is_pbm_a;	int err;	switch (chip_type) {	case PBM_CHIP_TYPE_TOMATILLO:		chipset_name = "TOMATILLO";		break;	case PBM_CHIP_TYPE_SCHIZO_PLUS:		chipset_name = "SCHIZO+";		break;	case PBM_CHIP_TYPE_SCHIZO:	default:		chipset_name = "SCHIZO";		break;	};	/* For SCHIZO, three OBP regs:	 * 1) PBM controller regs	 * 2) Schizo front-end controller regs (same for both PBMs)	 * 3) PBM PCI config space	 *	 * For TOMATILLO, four OBP regs:	 * 1) PBM controller regs	 * 2) Tomatillo front-end controller regs	 * 3) PBM PCI config space	 * 4) Ichip regs	 */	err = prom_getproperty(prom_node, "reg",			       (char *)&pr_regs[0],			       sizeof(pr_regs));	if (err == 0 || err == -1) {		prom_printf("%s: Fatal error, no reg property.\n",			    chipset_name);		prom_halt();	}	is_pbm_a = ((pr_regs[0].phys_addr & 0x00700000) == 0x00600000);	if (is_pbm_a)		pbm = &p->pbm_A;	else		pbm = &p->pbm_B;	pbm->portid = portid;	pbm->parent = p;	pbm->prom_node = prom_node;	pbm->pci_first_slot = 1;	pbm->chip_type = chip_type;	pbm->chip_version =		prom_getintdefault(prom_node, "version#", 0);	pbm->chip_revision =		prom_getintdefault(prom_node, "module-revision#", 0);	pbm->pbm_regs = pr_regs[0].phys_addr;	pbm->controller_regs = pr_regs[1].phys_addr - 0x10000UL;	if (chip_type == PBM_CHIP_TYPE_TOMATILLO)		pbm->sync_reg = pr_regs[3].phys_addr + 0x1a18UL;	sprintf(pbm->name,		(chip_type == PBM_CHIP_TYPE_TOMATILLO ?		 "TOMATILLO%d PBM%c" :		 "SCHIZO%d PBM%c"),		p->index,		(pbm == &p->pbm_A ? 'A' : 'B'));	printk("%s: ver[%x:%x], portid %x, "	       "cregs[%lx] pregs[%lx]\n",	       pbm->name,	       pbm->chip_version, pbm->chip_revision,	       pbm->portid,	       pbm->controller_regs,	       pbm->pbm_regs);	schizo_pbm_hw_init(pbm);	prom_getstring(prom_node, "name",		       pbm->prom_name,		       sizeof(pbm->prom_name));	err = prom_getproperty(prom_node, "ranges",			       (char *) pbm->pbm_ranges,			       sizeof(pbm->pbm_ranges));	if (err == 0 || err == -1) {		prom_printf("%s: Fatal error, no ranges property.\n",			    pbm->name);		prom_halt();	}	pbm->num_pbm_ranges =		(err / sizeof(struct linux_prom_pci_ranges));	schizo_determine_mem_io_space(pbm);	pbm_register_toplevel_resources(p, pbm);	err = prom_getproperty(prom_node, "interrupt-map",			       (char *)pbm->pbm_intmap,			       sizeof(pbm->pbm_intmap));	if (err != -1) {		pbm->num_pbm_intmap = (err / sizeof(struct linux_prom_pci_intmap));		err = prom_getproperty(prom_node, "interrupt-map-mask",				       (char *)&pbm->pbm_intmask,				       sizeof(pbm->pbm_intmask));		if (err == -1) {			prom_printf("%s: Fatal error, no "				    "interrupt-map-mask.\n", pbm->name);			prom_halt();		}	} else {		pbm->num_pbm_intmap = 0;		memset(&pbm->pbm_intmask, 0, sizeof(pbm->pbm_intmask));	}	err = prom_getproperty(prom_node, "ino-bitmap",			       (char *) &ino_bitmap[0],			       sizeof(ino_bitmap));	if (err == 0 || err == -1) {		prom_printf("%s: Fatal error, no ino-bitmap.\n", pbm->name);		prom_halt();	}	pbm->ino_bitmap = (((u64)ino_bitmap[1] << 32UL) |			   ((u64)ino_bitmap[0] <<  0UL));	err = prom_getproperty(prom_node, "bus-range",			       (char *)&busrange[0],			       sizeof(busrange));	if (err == 0 || err == -1) {		prom_printf("%s: Fatal error, no bus-range.\n", pbm->name);		prom_halt();	}	pbm->pci_first_busno = busrange[0];	pbm->pci_last_busno = busrange[1];	schizo_pbm_iommu_init(pbm);	schizo_pbm_strbuf_init(pbm);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/085ae41f66657a9655ce832b0a61832a06f0e1dc/pci_schizo.c/clean/arch/sparc64/kernel/pci_schizo.c