|
@@ -54,13 +54,16 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
|
|
|
{
|
|
|
struct nand_chip *chip = mtd_to_nand(mtd);
|
|
|
void __iomem *io_base = chip->IO_ADDR_R;
|
|
|
+#if __LINUX_ARM_ARCH__ >= 5
|
|
|
uint64_t *buf64;
|
|
|
+#endif
|
|
|
int i = 0;
|
|
|
|
|
|
while (len && (unsigned long)buf & 7) {
|
|
|
*buf++ = readb(io_base);
|
|
|
len--;
|
|
|
}
|
|
|
+#if __LINUX_ARM_ARCH__ >= 5
|
|
|
buf64 = (uint64_t *)buf;
|
|
|
while (i < len/8) {
|
|
|
/*
|
|
@@ -74,6 +77,10 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
|
|
|
buf64[i++] = x;
|
|
|
}
|
|
|
i *= 8;
|
|
|
+#else
|
|
|
+ readsl(io_base, buf, len/4);
|
|
|
+ i = len / 4 * 4;
|
|
|
+#endif
|
|
|
while (i < len)
|
|
|
buf[i++] = readb(io_base);
|
|
|
}
|