/* ASIC PCI only supports type 1 config cycles.  */
static int set_config_address(unsigned int busno, unsigned int devfn, int reg)
/* ASIC PCI only supports type 1 config cycles.  */
static int set_config_address(unsigned int busno, unsigned int devfn, int reg)
{
	if ((devfn > 255) || (reg > 255))
		return PCIBIOS_BAD_REGISTER_NUMBER;
	if (busno == 0 && devfn >= PCI_DEVFN(8, 0))
		return PCIBIOS_DEVICE_NOT_FOUND;
	*(volatile u32 *)PCIMT_CONFIG_ADDRESS =
		 ((busno    & 0xff) << 16) |
	         ((devfn    & 0xff) <<  8) |
	          (reg      & 0xfc);
	return PCIBIOS_SUCCESSFUL;
}