mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] MIPS: <asm/io.h>: use generic io accessors
Date: Mon, 29 Jul 2024 00:19:29 +0300	[thread overview]
Message-ID: <20240728211929.91608-1-antonynpavlov@gmail.com> (raw)

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 arch/mips/include/asm/io.h | 62 --------------------------------------
 1 file changed, 62 deletions(-)

diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
index 4584eec8ca0..bbd1c0199f8 100644
--- a/arch/mips/include/asm/io.h
+++ b/arch/mips/include/asm/io.h
@@ -52,68 +52,6 @@ static inline void *phys_to_virt(unsigned long address)
 
 #define	IO_SPACE_LIMIT	0
 
-/*****************************************************************************/
-/*
- * readX/writeX() are used to access memory mapped devices. On some
- * architectures the memory mapped IO stuff needs to be accessed
- * differently. On the simple architectures, we just read/write the
- * memory location directly.
- */
-#ifndef __raw_readb
-static inline u8 __raw_readb(const volatile void __iomem *addr)
-{
-	return *(const volatile u8 __force *) addr;
-}
-#endif
-
-#ifndef __raw_readw
-static inline u16 __raw_readw(const volatile void __iomem *addr)
-{
-	return *(const volatile u16 __force *) addr;
-}
-#endif
-
-#ifndef __raw_readl
-static inline u32 __raw_readl(const volatile void __iomem *addr)
-{
-	return *(const volatile u32 __force *) addr;
-}
-#endif
-
-#define readb __raw_readb
-#define readw(addr) __le16_to_cpu(__raw_readw(addr))
-#define readl(addr) __le32_to_cpu(__raw_readl(addr))
-
-#ifndef __raw_writeb
-static inline void __raw_writeb(u8 b, volatile void __iomem *addr)
-{
-	*(volatile u8 __force *) addr = b;
-}
-#endif
-
-#ifndef __raw_writew
-static inline void __raw_writew(u16 b, volatile void __iomem *addr)
-{
-	*(volatile u16 __force *) addr = b;
-}
-#endif
-
-#ifndef __raw_writel
-static inline void __raw_writel(u32 b, volatile void __iomem *addr)
-{
-	*(volatile u32 __force *) addr = b;
-}
-#endif
-
-#define writeb __raw_writeb
-#define writew(b,addr) __raw_writew(__cpu_to_le16(b),addr)
-#define writel(b,addr) __raw_writel(__cpu_to_le32(b),addr)
-
-#define in_be16(a)	__be16_to_cpu(__raw_readw(a))
-#define in_be32(a)	__be32_to_cpu(__raw_readl(a))
-#define out_be16(a, v)	__raw_writew(__cpu_to_be16(v), a)
-#define out_be32(a, v)	__raw_writel(__cpu_to_be32(v), a)
-
 #ifdef CONFIG_64BIT
 #define IOMEM(addr)	((void __force __iomem *)PHYS_TO_XKSEG_UNCACHED(addr))
 #else
-- 
2.39.0




             reply	other threads:[~2024-07-28 21:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-28 21:19 Antony Pavlov [this message]
2024-07-30  7:50 ` Sascha Hauer

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=20240728211929.91608-1-antonynpavlov@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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