u-boot-amlogic.groups.io archive mirror
 help / color / mirror / Atom feed
From: Igor Prusov <ivprusov@salutedevices.com>
To: <u-boot@lists.denx.de>
Cc: <kernel@sberdevices.ru>, <prusovigor@gmail.com>,
	Igor Prusov <ivprusov@salutedevices.com>,
	Jagan Teki <jagan@amarulasolutions.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	<u-boot-amlogic@groups.io>
Subject: [PATCH 2/3] spi: meson_spifc_a1: Use define for time interval
Date: Thu, 9 Nov 2023 20:10:03 +0300	[thread overview]
Message-ID: <20231109200943.2.I02c5c81c1a5a06b51600672691f448909af473ea@changeid> (raw)
In-Reply-To: <20231109171004.193521-1-ivprusov@salutedevices.com>

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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/meson_spifc_a1.c b/drivers/spi/meson_spifc_a1.c
index 099c4c037d..418d4d5e10 100644
--- a/drivers/spi/meson_spifc_a1.c
+++ b/drivers/spi/meson_spifc_a1.c
@@ -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,
-- 
2.34.1



  reply	other threads:[~2023-11-09 17:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-09 17:10 [PATCH 0/3] Add time conversion defines from Linux Igor Prusov
2023-11-09 17:10 ` Igor Prusov [this message]
2023-11-17 13:42   ` [PATCH 2/3] spi: meson_spifc_a1: Use define for time interval Tom Rini
2023-11-09 17:10 ` [PATCH 3/3] treewide: use linux/time.h for time conversion defines Igor Prusov
2023-11-10  8:54   ` Svyatoslav Ryhel
2023-11-10 11:04   ` Eugen Hristev
2023-11-10 12:42   ` Caleb Connolly
2023-11-10 18:26   ` Stefan Bosch
2023-11-13  8:00   ` Patrice CHOTARD
2023-11-17 13:42   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231109200943.2.I02c5c81c1a5a06b51600672691f448909af473ea@changeid \
    --to=ivprusov@salutedevices.com \
    --cc=jagan@amarulasolutions.com \
    --cc=kernel@sberdevices.ru \
    --cc=neil.armstrong@linaro.org \
    --cc=prusovigor@gmail.com \
    --cc=u-boot-amlogic@groups.io \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).