summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabrizio Castro <fabrizio.castro.jz@renesas.com>2023-07-15 03:03:59 +0200
committerMark Brown <broonie@kernel.org>2023-07-17 13:41:41 +0200
commit74e27ce8d23c3aeb1a9fdcaf6261462506bbbfc3 (patch)
tree2866bb024cb4c8889f42a2784612de0d6ae38642
parentspi: rzv2m-csi: Add missing include (diff)
downloadlinux-74e27ce8d23c3aeb1a9fdcaf6261462506bbbfc3.tar.xz
linux-74e27ce8d23c3aeb1a9fdcaf6261462506bbbfc3.zip
spi: rzv2m-csi: Adopt HZ_PER_MHZ for max spi clock
Make use of HZ_PER_MHZ for CSI_MAX_SPI_SCKO to make it clear what its value means. Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20230715010407.1751715-3-fabrizio.castro.jz@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/spi/spi-rzv2m-csi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/spi-rzv2m-csi.c b/drivers/spi/spi-rzv2m-csi.c
index b595f3b7294d..3931045a85eb 100644
--- a/drivers/spi/spi-rzv2m-csi.c
+++ b/drivers/spi/spi-rzv2m-csi.c
@@ -13,6 +13,7 @@
#include <linux/platform_device.h>
#include <linux/reset.h>
#include <linux/spi/spi.h>
+#include <linux/units.h>
/* Registers */
#define CSI_MODE 0x00 /* CSI mode control */
@@ -71,7 +72,7 @@
#define TX_TIMEOUT_ERROR BIT(2)
#define RX_TIMEOUT_ERROR BIT(3)
-#define CSI_MAX_SPI_SCKO 8000000
+#define CSI_MAX_SPI_SCKO (8 * HZ_PER_MHZ)
struct rzv2m_csi_priv {
void __iomem *base;