From 7ccd2ffce0d4a180172c984ca7266d056d6d4b11 Mon Sep 17 00:00:00 2001 From: Markus Mayer Date: Mon, 11 Feb 2019 17:24:41 -0800 Subject: memory: brcmstb: dpfe: use msleep() over udelay() To be more "scheduler friendly", we use msleep() rather than udelay() while we wait for the DCPU to respond. Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli --- drivers/memory/brcmstb_dpfe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/memory/brcmstb_dpfe.c b/drivers/memory/brcmstb_dpfe.c index 04599eccd604..8e1ccdb0e59d 100644 --- a/drivers/memory/brcmstb_dpfe.c +++ b/drivers/memory/brcmstb_dpfe.c @@ -111,7 +111,7 @@ #define DPFE_MSG_TYPE_COMMAND 1 #define DPFE_MSG_TYPE_RESPONSE 2 -#define DELAY_LOOP_MAX 200000 +#define DELAY_LOOP_MAX 1000 enum dpfe_msg_fields { MSG_HEADER, @@ -323,7 +323,7 @@ static int __send_command(struct private_data *priv, unsigned int cmd, resp = readl_relaxed(regs + REG_TO_HOST_MBOX); if (resp > 0) break; - udelay(5); + msleep(1); } if (i == DELAY_LOOP_MAX) { -- cgit v1.2.3