Instead of doing /* cpu_relax(); */ barrier(); on upstream uses of cpu_relax(), just use the new cpu_relax() #define directly. Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- arch/arm/mach-omap/omap4_rom_usb.c | 6 ++---- drivers/mtd/nand/nand_denali.c | 8 +++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-omap/omap4_rom_usb.c b/arch/arm/mach-omap/omap4_rom_usb.c index 31d93c34ee52..0b3124059021 100644 --- a/arch/arm/mach-omap/omap4_rom_usb.c +++ b/arch/arm/mach-omap/omap4_rom_usb.c @@ -111,8 +111,7 @@ int omap4_usbboot_wait_read(void) { int ret; while (omap4_usbboot_data.dread.status == STATUS_WAITING) - /* cpu_relax(); */ - barrier(); + cpu_relax(); ret = omap4_usbboot_data.dread.status; omap4_usbboot_data.dread.status = -1; return ret; @@ -153,8 +152,7 @@ int omap4_usbboot_wait_write(void) { int ret; while (omap4_usbboot_data.dwrite.status == STATUS_WAITING) - /* cpu_relax(); */ - barrier(); + cpu_relax(); ret = omap4_usbboot_data.dwrite.status; omap4_usbboot_data.dwrite.status = -1; return ret; diff --git a/drivers/mtd/nand/nand_denali.c b/drivers/mtd/nand/nand_denali.c index ddb03813fe78..89958456491d 100644 --- a/drivers/mtd/nand/nand_denali.c +++ b/drivers/mtd/nand/nand_denali.c @@ -171,7 +171,7 @@ static void reset_bank(struct denali_nand_info *denali) /* wait for completion */ while (ioread32(denali->flash_reg + DEVICE_RESET) & (1 << denali->flash_bank)) - barrier(); + cpu_relax(); } /* Reset the flash controller */ @@ -187,8 +187,7 @@ static uint16_t denali_nand_reset(struct denali_nand_info *denali) iowrite32(1 << i, denali->flash_reg + DEVICE_RESET); while (!(ioread32(denali->flash_reg + INTR_STATUS(i)) & (INTR_STATUS__RST_COMP | INTR_STATUS__TIME_OUT))) - /* cpu_relax(); */ - barrier(); + cpu_relax(); if (ioread32(denali->flash_reg + INTR_STATUS(i)) & INTR_STATUS__TIME_OUT) dev_dbg(denali->dev, @@ -953,8 +952,7 @@ static bool handle_ecc(struct denali_nand_info *denali, uint8_t *buf, */ while (!(read_interrupt_status(denali) & INTR_STATUS__ECC_TRANSACTION_DONE)) - /* cpu_relax(); */ - barrier(); + cpu_relax(); clear_interrupts(denali); denali_set_intr_modes(denali, true); } -- 2.26.0.rc2 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox