]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spi: meson_spifc_a1: Use define for time interval
authorIgor Prusov <ivprusov@salutedevices.com>
Thu, 9 Nov 2023 17:10:03 +0000 (20:10 +0300)
committerTom Rini <trini@konsulko.com>
Thu, 16 Nov 2023 23:59:58 +0000 (18:59 -0500)
Use USEC_PER_MSEC define for timeout to sync code with Linux version.

Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
drivers/spi/meson_spifc_a1.c

index 099c4c037dd28a4b111f1e9ad240a7b31bc2c03c..418d4d5e10144c0f52003081410d05ca21dafb0f 100644 (file)
@@ -16,6 +16,7 @@
 #include <spi-mem.h>
 #include <asm/io.h>
 #include <linux/log2.h>
+#include <linux/time.h>
 #include <linux/iopoll.h>
 #include <linux/bitfield.h>
 
@@ -117,7 +118,7 @@ static int amlogic_spifc_a1_request(struct amlogic_spifc_a1 *spifc, bool read)
 
        return readl_poll_timeout(spifc->base + SPIFC_A1_USER_CTRL0_REG,
                                  val, (val & mask) == mask,
-                                 200 * 1000);
+                                 200 * USEC_PER_MSEC);
 }
 
 static void amlogic_spifc_a1_drain_buffer(struct amlogic_spifc_a1 *spifc,