[MTD] XIP: Use generic xip_iprefetch() instead of asm volatile (...)
Untested, but shouldn't break anything... Makes MTD_XIP arch independent. I guess this is why xip_iprefetch() was made for. Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
parent
fe69af002e
commit
ca5c23c3b8
@ -1071,10 +1071,10 @@ static int __xipram xip_wait_for_operation(
|
|||||||
chip->state = newstate;
|
chip->state = newstate;
|
||||||
map_write(map, CMD(0xff), adr);
|
map_write(map, CMD(0xff), adr);
|
||||||
(void) map_read(map, adr);
|
(void) map_read(map, adr);
|
||||||
asm volatile (".rep 8; nop; .endr");
|
xip_iprefetch();
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
spin_unlock(chip->mutex);
|
spin_unlock(chip->mutex);
|
||||||
asm volatile (".rep 8; nop; .endr");
|
xip_iprefetch();
|
||||||
cond_resched();
|
cond_resched();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -723,10 +723,10 @@ static void __xipram xip_udelay(struct map_info *map, struct flchip *chip,
|
|||||||
chip->erase_suspended = 1;
|
chip->erase_suspended = 1;
|
||||||
map_write(map, CMD(0xf0), adr);
|
map_write(map, CMD(0xf0), adr);
|
||||||
(void) map_read(map, adr);
|
(void) map_read(map, adr);
|
||||||
asm volatile (".rep 8; nop; .endr");
|
xip_iprefetch();
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
spin_unlock(chip->mutex);
|
spin_unlock(chip->mutex);
|
||||||
asm volatile (".rep 8; nop; .endr");
|
xip_iprefetch();
|
||||||
cond_resched();
|
cond_resched();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -39,7 +39,7 @@ struct mtd_info *cfi_probe(struct map_info *map);
|
|||||||
#define xip_allowed(base, map) \
|
#define xip_allowed(base, map) \
|
||||||
do { \
|
do { \
|
||||||
(void) map_read(map, base); \
|
(void) map_read(map, base); \
|
||||||
asm volatile (".rep 8; nop; .endr"); \
|
xip_iprefetch(); \
|
||||||
local_irq_enable(); \
|
local_irq_enable(); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ __xipram cfi_read_pri(struct map_info *map, __u16 adr, __u16 size, const char* n
|
|||||||
|
|
||||||
#ifdef CONFIG_MTD_XIP
|
#ifdef CONFIG_MTD_XIP
|
||||||
(void) map_read(map, base);
|
(void) map_read(map, base);
|
||||||
asm volatile (".rep 8; nop; .endr");
|
xip_iprefetch();
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user