/* Again, this (and the write routine) are generic versions that can be overridden by the platform. This is necessary on platforms that don't support legacy I/O routing or that hard fail on legacy I/O timeouts.  */
int ia64_pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size)
/* Again, this (and the write routine) are generic versions that can be overridden by the platform. This is necessary on platforms that don't support legacy I/O routing or that hard fail on legacy I/O timeouts.  */
int ia64_pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size)
{
	int ret = size;
	switch (size) {
	case 1:
		*val = inb(port);
		break;
	case 2:
		*val = inw(port);
		break;
	case 4:
		*val = inl(port);
		break;
	default:
		ret = -EINVAL;
		break;
	}
	return ret;
}