/* The IXP4xx expansion bus only allows 16-bit wide acceses when attached to a 16-bit wide device (such as the 28F128J3A), so we can't just memcpy_fromio().  */
static void ixp4xx_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
/* The IXP4xx expansion bus only allows 16-bit wide acceses when attached to a 16-bit wide device (such as the 28F128J3A), so we can't just memcpy_fromio().  */
static void ixp4xx_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
{
	u8 *dest = (u8 *) to;
	void __iomem *src = map->virt + from;
	if (len <= 0)
		return;
	if (from & 1) {
		*dest++ = BYTE1(flash_read16(src));
                src++;
		--len;
	}
	while (len >= 2) {
		u16 data = flash_read16(src);
		*dest++ = BYTE0(data);
		*dest++ = BYTE1(data);
		src += 2;
		len -= 2;
        }
	if (len > 0)
		*dest++ = BYTE0(flash_read16(src));
}