/* We don't do error checking on the address for writes. It's assumed that the user checked for the device existing first by doing a read first.  */
static int ixp23xx_pci_write_config(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 value)
/* We don't do error checking on the address for writes. It's assumed that the user checked for the device existing first by doing a read first.  */
static int ixp23xx_pci_write_config(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 value)
{
	u32 mask;
	u32 *addr;
	u32 temp;
	mask = ~(bytemask[size] << ((where % 0x4) * 8));
	addr = ixp23xx_pci_config_addr(bus->number, devfn, where);
	if (!addr)
		return PCIBIOS_DEVICE_NOT_FOUND;
	temp = (u32) (value) << ((where % 0x4) * 8);
	*addr = (*addr & mask) | temp;
	clear_master_aborts();
	return PCIBIOS_SUCCESSFUL;
}