printk(KERN_ERR "radeonfb (%s): Invalid ROM signature %x should be" "0xaa55\n", pci_name(rinfo->pdev), BIOS_IN16(0)); 
printk(KERN_DEBUG "radeonfb (%s): Invalid ROM signature %x " "should be 0xaa55\n", pci_name(rinfo->pdev), BIOS_IN16(0)); 
static int __devinit radeon_map_ROM(struct radeonfb_info *rinfo, struct pci_dev *dev){	void __iomem *rom;	u16 dptr;	u8 rom_type;	size_t rom_size;	/* If this is a primary card, there is a shadow copy of the	 * ROM somewhere in the first meg. We will just ignore the copy	 * and use the ROM directly.	 */        	/* Fix from ATI for problem with Radeon hardware not leaving ROM enabled */    	unsigned int temp;	temp = INREG(MPP_TB_CONFIG);	temp &= 0x00ffffffu;	temp |= 0x04 << 24;	OUTREG(MPP_TB_CONFIG, temp);	temp = INREG(MPP_TB_CONFIG);                                                                                                          	rom = pci_map_rom(dev, &rom_size);	if (!rom) {		printk(KERN_ERR "radeonfb (%s): ROM failed to map\n",		       pci_name(rinfo->pdev));		return -ENOMEM;	}		rinfo->bios_seg = rom;	/* Very simple test to make sure it appeared */	if (BIOS_IN16(0) != 0xaa55) {		printk(KERN_ERR "radeonfb (%s): Invalid ROM signature %x should be"		       "0xaa55\n", pci_name(rinfo->pdev), BIOS_IN16(0));		goto failed;	}	/* Look for the PCI data to check the ROM type */	dptr = BIOS_IN16(0x18);	/* Check the PCI data signature. If it's wrong, we still assume a normal x86 ROM	 * for now, until I've verified this works everywhere. The goal here is more	 * to phase out Open Firmware images.	 *	 * Currently, we only look at the first PCI data, we could iteratre and deal with	 * them all, and we should use fb_bios_start relative to start of image and not	 * relative start of ROM, but so far, I never found a dual-image ATI card	 *	 * typedef struct {	 * 	u32	signature;	+ 0x00	 * 	u16	vendor;		+ 0x04	 * 	u16	device;		+ 0x06	 * 	u16	reserved_1;	+ 0x08	 * 	u16	dlen;		+ 0x0a	 * 	u8	drevision;	+ 0x0c	 * 	u8	class_hi;	+ 0x0d	 * 	u16	class_lo;	+ 0x0e	 * 	u16	ilen;		+ 0x10	 * 	u16	irevision;	+ 0x12	 * 	u8	type;		+ 0x14	 * 	u8	indicator;	+ 0x15	 * 	u16	reserved_2;	+ 0x16	 * } pci_data_t;	 */	if (BIOS_IN32(dptr) !=  (('R' << 24) | ('I' << 16) | ('C' << 8) | 'P')) {		printk(KERN_WARNING "radeonfb (%s): PCI DATA signature in ROM"		       "incorrect: %08x\n", pci_name(rinfo->pdev), BIOS_IN32(dptr));		goto anyway;	}	rom_type = BIOS_IN8(dptr + 0x14);	switch(rom_type) {	case 0:		printk(KERN_INFO "radeonfb: Found Intel x86 BIOS ROM Image\n");		break;	case 1:		printk(KERN_INFO "radeonfb: Found Open Firmware ROM Image\n");		goto failed;	case 2:		printk(KERN_INFO "radeonfb: Found HP PA-RISC ROM Image\n");		goto failed;	default:		printk(KERN_INFO "radeonfb: Found unknown type %d ROM Image\n", rom_type);		goto failed;	} anyway:	/* Locate the flat panel infos, do some sanity checking !!! */	rinfo->fp_bios_start = BIOS_IN16(0x48);	return 0; failed:	rinfo->bios_seg = NULL;	radeon_unmap_ROM(rinfo, dev);	return -ENXIO;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/3b4abffbadf728996fb9243b4af1df48dd771e86/radeon_base.c/clean/drivers/video/aty/radeon_base.c