summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/nand_denali.c
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-04-13 09:51:49 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-04-15 11:22:26 +0200
commitb2e6ed0aa03cbedcbeb3a47aa27b5d1f4913e03a (patch)
tree49dfcd109c976b0f17eb8949d8f54a466069f251 /drivers/mtd/nand/nand_denali.c
parent473a81aab446682bbc45ef4054bf1c83034bf403 (diff)
downloadbarebox-b2e6ed0aa03cbedcbeb3a47aa27b5d1f4913e03a.tar.gz
barebox-b2e6ed0aa03cbedcbeb3a47aa27b5d1f4913e03a.tar.xz
treewide: use cpu_relax() where appropriate
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@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/nand/nand_denali.c')
-rw-r--r--drivers/mtd/nand/nand_denali.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/mtd/nand/nand_denali.c b/drivers/mtd/nand/nand_denali.c
index ddb03813fe..8995845649 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);
}