FreeBSD/sys/mips/atheros/ar724x_pci.c
/*
 * XXX This is (mostly) duplicated with ar71xx_pci.c.
 * It should at some point be fixed.
 */
XXX This is (mostly) duplicated with ar71xx_pci.c.
It should at some point be fixed.
XXX This is ( mostly ) duplicated with ar71xx_pci . c . It should at some point be fixed .
static void
ar724x_pci_slot_fixup(device_t dev)
{
	long int flash_addr;
	char buf[64];
	int size;
	if (bootverbose)
	device_printf(dev, "%s: checking dev %s, %d/%d/%d\n",
	    __func__, device_get_nameunit(dev), 0, 0, 0);
	snprintf(buf, sizeof(buf), "bus.%d.%d.%d.ath_fixup_addr",
	    0, 0, 0);
	if (resource_long_value(device_get_name(dev), device_get_unit(dev),
	    buf, &flash_addr) == 0) {
		snprintf(buf, sizeof(buf), "bus.%d.%d.%d.ath_fixup_size",
		    0, 0, 0);
		if (resource_int_value(device_get_name(dev),
		    device_get_unit(dev), buf, &size) != 0) {
			device_printf(dev,
			    "%s: missing hint '%s', aborting EEPROM\n",
			    __func__, buf);
			return;
		}
		device_printf(dev, "found EEPROM at 0x%lx on %d.%d.%d\n",
		    flash_addr, 0, 0, 0);
		ar724x_pci_fixup(dev, flash_addr, size);
		ar71xx_pci_slot_create_eeprom_firmware(dev, 0, 0, 0,
		    flash_addr, size);
	}
}
static void ar724x_pci_slot_fixup ( device_t dev ) { long int flash_addr ; char buf [ 64 ] ; int size ; if ( bootverbose ) device_printf ( dev , " \n " , __func__ , device_get_nameunit ( dev ) , 0 , 0 , 0 ) ; snprintf ( buf , sizeof ( buf ) , " " , 0 , 0 , 0 ) ; if ( resource_long_value ( device_get_name ( dev ) , device_get_unit ( dev ) , buf , & flash_addr ) == 0 ) { snprintf ( buf , sizeof ( buf ) , " " , 0 , 0 , 0 ) ; if ( resource_int_value ( device_get_name ( dev ) , device_get_unit ( dev ) , buf , & size ) != 0 ) { device_printf ( dev , " \n " , __func__ , buf ) ; return ; } device_printf ( dev , " \n " , flash_addr , 0 , 0 , 0 ) ; ar724x_pci_fixup ( dev , flash_addr , size ) ; ar71xx_pci_slot_create_eeprom_firmware ( dev , 0 , 0 , 0 , flash_addr , size ) ; } }
XXX This is (mostly) duplicated with ar71xx_pci.c.
XXX This is ( mostly ) duplicated with ar71xx_pci . c .
/*
	 * Check whether the given slot has a hint to poke.
	 */