/* turn on ExpMemEn */ cmdreg = READCFG32(CFGOFFSET(0, PCI_DEVFN(PCI_BRIDGE_DEVICE, 0), 0x40)); printk("PCIFeatureCtrl = %x\n", cmdreg); WRITECFG32(CFGOFFSET(0, PCI_DEVFN(PCI_BRIDGE_DEVICE, 0), 0x40), cmdreg | 0x10); cmdreg = READCFG32(CFGOFFSET(0, PCI_DEVFN(PCI_BRIDGE_DEVICE, 0), 0x40)); printk("PCIFeatureCtrl = %x\n", cmdreg);  
static int __init bcm1480_pcibios_init(void){	uint32_t cmdreg;	uint64_t reg;	extern int pci_probe_only;	/* CFE will assign PCI resources */	pci_probe_only = 1;	/* Avoid ISA compat ranges.  */	PCIBIOS_MIN_IO = 0x00008000UL;	PCIBIOS_MIN_MEM = 0x01000000UL;	/* Set I/O resource limits. - unlimited for now to accomodate HT */	ioport_resource.end = 0xffffffffUL;	iomem_resource.end = 0xffffffffUL;	cfg_space = ioremap(A_BCM1480_PHYS_PCI_CFG_MATCH_BITS, 16*1024*1024);	/*	 * See if the PCI bus has been configured by the firmware.	 */	reg = *((volatile uint64_t *) IOADDR(A_SCD_SYSTEM_CFG));	if (!(reg & M_BCM1480_SYS_PCI_HOST)) {		bcm1480_bus_status |= PCI_DEVICE_MODE;	} else {		cmdreg = READCFG32(CFGOFFSET(0, PCI_DEVFN(PCI_BRIDGE_DEVICE, 0),					     PCI_COMMAND));		if (!(cmdreg & PCI_COMMAND_MASTER)) {			printk			    ("PCI: Skipping PCI probe.  Bus is not initialized.\n");			iounmap(cfg_space);			return 1; /* XXX */		}		bcm1480_bus_status |= PCI_BUS_ENABLED;	}	/*	 * Establish mappings in KSEG2 (kernel virtual) to PCI I/O	 * space.  Use "match bytes" policy to make everything look	 * little-endian.  So, you need to also set	 * CONFIG_SWAP_IO_SPACE, but this is the combination that	 * works correctly with most of Linux's drivers.	 * XXX ehs: Should this happen in PCI Device mode?	 */	set_io_port_base((unsigned long)		ioremap(A_BCM1480_PHYS_PCI_IO_MATCH_BYTES, 65536));	isa_slot_offset = (unsigned long)		ioremap(A_BCM1480_PHYS_PCI_MEM_MATCH_BYTES, 1024*1024);	register_pci_controller(&bcm1480_controller);#ifdef CONFIG_VGA_CONSOLE	take_over_console(&vga_con,0,MAX_NR_CONSOLES-1,1);#endif	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/cb4262481fce1d43ac9a483be4faf36fdd1c7abb/pci-bcm1480.c/buggy/arch/mips/pci/pci-bcm1480.c