aboutsummaryrefslogtreecommitdiff
path: root/drivers/memory
diff options
context:
space:
mode:
authorIgor Prusov <ivprusov@salutedevices.com>2023-11-09 20:10:04 +0300
committerTom Rini <trini@konsulko.com>2023-11-16 18:59:58 -0500
commit13248d66aeea02afc120ba83075e1af32cefd592 (patch)
tree3b74811fd4b0b28ed73e696af95965c97e162ce0 /drivers/memory
parent35425507b3253bb1e08110f67e130e7c9c272cf7 (diff)
downloadu-boot-13248d66aeea02afc120ba83075e1af32cefd592.zip
u-boot-13248d66aeea02afc120ba83075e1af32cefd592.tar.gz
u-boot-13248d66aeea02afc120ba83075e1af32cefd592.tar.bz2
treewide: use linux/time.h for time conversion defines
Now that we have time conversion defines from in time.h there is no need for each driver to define their own version. Signed-off-by: Igor Prusov <ivprusov@salutedevices.com> Reviewed-by: Svyatoslav Ryhel <clamor95@gmail.com> # tegra Reviewed-by: Eugen Hristev <eugen.hristev@collabora.com> #at91 Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> #qcom geni Reviewed-by: Stefan Bosch <stefan_b@posteo.net> #nanopi2 Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/stm32-fmc2-ebi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/memory/stm32-fmc2-ebi.c b/drivers/memory/stm32-fmc2-ebi.c
index 212bb4f..a722a38 100644
--- a/drivers/memory/stm32-fmc2-ebi.c
+++ b/drivers/memory/stm32-fmc2-ebi.c
@@ -14,6 +14,7 @@
#include <linux/err.h>
#include <linux/iopoll.h>
#include <linux/ioport.h>
+#include <linux/time.h>
/* FMC2 Controller Registers */
#define FMC2_BCR1 0x0
@@ -90,8 +91,6 @@
#define FMC2_BTR_DATLAT_MAX 0xf
#define FMC2_PCSCNTR_CSCOUNT_MAX 0xff
-#define FMC2_NSEC_PER_SEC 1000000000L
-
enum stm32_fmc2_ebi_bank {
FMC2_EBI1 = 0,
FMC2_EBI2,
@@ -279,7 +278,7 @@ static u32 stm32_fmc2_ebi_ns_to_clock_cycles(struct stm32_fmc2_ebi *ebi,
int cs, u32 setup)
{
unsigned long hclk = clk_get_rate(&ebi->clk);
- unsigned long hclkp = FMC2_NSEC_PER_SEC / (hclk / 1000);
+ unsigned long hclkp = NSEC_PER_SEC / (hclk / 1000);
return DIV_ROUND_UP(setup * 1000, hclkp);
}