summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-amd.c
diff options
context:
space:
mode:
authorRaju Rangoju <Raju.Rangoju@amd.com>2024-09-25 19:06:39 +0530
committerMark Brown <broonie@kernel.org>2024-09-30 01:11:52 +0200
commitefd9834b86a65f9229e90727fd61a5576c08389c (patch)
tree4d7b9408662f46e7ea6476dce03186b96f4e861e /drivers/spi/spi-amd.c
parent769c16fa86f135542e08610e94015ed0f10afae4 (diff)
downloadlwn-efd9834b86a65f9229e90727fd61a5576c08389c.tar.gz
lwn-efd9834b86a65f9229e90727fd61a5576c08389c.zip
spi: spi_amd: Replace ioread/iowrite calls
All `ioread*` and `iowrite*` functions are better suited for architecture independent code to ensure portability across different architectures. Since AMD SoCs support only the x86 architecture, replacing all `ioread*` and `iowrite*` calls with `read*` and `write*` calls can reduce the overhead of ensuring portability and increase the speed of I/O operations. Co-developed-by: Krishnamoorthi M <krishnamoorthi.m@amd.com> Signed-off-by: Krishnamoorthi M <krishnamoorthi.m@amd.com> Co-developed-by: Akshata MukundShetty <akshata.mukundshetty@amd.com> Signed-off-by: Akshata MukundShetty <akshata.mukundshetty@amd.com> Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com> Link: https://patch.msgid.link/20240925133644.2922359-4-Raju.Rangoju@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-amd.c')
-rw-r--r--drivers/spi/spi-amd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/spi/spi-amd.c b/drivers/spi/spi-amd.c
index 17a8401216e4..1d1a18ee0bb5 100644
--- a/drivers/spi/spi-amd.c
+++ b/drivers/spi/spi-amd.c
@@ -114,12 +114,12 @@ struct amd_spi {
static inline u8 amd_spi_readreg8(struct amd_spi *amd_spi, int idx)
{
- return ioread8((u8 __iomem *)amd_spi->io_remap_addr + idx);
+ return readb((u8 __iomem *)amd_spi->io_remap_addr + idx);
}
static inline void amd_spi_writereg8(struct amd_spi *amd_spi, int idx, u8 val)
{
- iowrite8(val, ((u8 __iomem *)amd_spi->io_remap_addr + idx));
+ writeb(val, ((u8 __iomem *)amd_spi->io_remap_addr + idx));
}
static void amd_spi_setclear_reg8(struct amd_spi *amd_spi, int idx, u8 set, u8 clear)
@@ -132,12 +132,12 @@ static void amd_spi_setclear_reg8(struct amd_spi *amd_spi, int idx, u8 set, u8 c
static inline u32 amd_spi_readreg32(struct amd_spi *amd_spi, int idx)
{
- return ioread32((u8 __iomem *)amd_spi->io_remap_addr + idx);
+ return readl((u8 __iomem *)amd_spi->io_remap_addr + idx);
}
static inline void amd_spi_writereg32(struct amd_spi *amd_spi, int idx, u32 val)
{
- iowrite32(val, ((u8 __iomem *)amd_spi->io_remap_addr + idx));
+ writel(val, ((u8 __iomem *)amd_spi->io_remap_addr + idx));
}
static inline void amd_spi_setclear_reg32(struct amd_spi *amd_spi, int idx, u32 set, u32 clear)