summaryrefslogtreecommitdiff
path: root/include/linux/goldfish.h
diff options
context:
space:
mode:
authorLaurent Vivier <laurent@vivier.eu>2020-10-10 02:47:49 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-28 13:44:43 +0100
commitda31de35cd2fb78f75788873e0b61e56d4bb1a90 (patch)
tree547308707e47c8804de220fee15fb224cd7fdea9 /include/linux/goldfish.h
parent1a460c36078e1c7c979ce2ead581ec9e40f2aac8 (diff)
tty: goldfish: use __raw_writel()/__raw_readl()
gf_early_console_putchar() uses __raw_writel() but the standard driver uses writel()/readl(). This means we can't use both on the same machine as the device is either big-endian, little-endian or native-endian. As android implementation defines the endianness of the device is the one of the architecture replace all writel()/readl() by __raw_writel()/__raw_readl() https://android.googlesource.com/platform/external/qemu/+/refs/heads/emu-master-dev/hw/char/goldfish_tty.c#222 Signed-off-by: Laurent Vivier <laurent@vivier.eu> Link: https://lore.kernel.org/r/20201010004749.1201695-1-laurent@vivier.eu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/goldfish.h')
-rw-r--r--include/linux/goldfish.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/goldfish.h b/include/linux/goldfish.h
index 265a099cd3b8..12be1601fd84 100644
--- a/include/linux/goldfish.h
+++ b/include/linux/goldfish.h
@@ -13,9 +13,9 @@ static inline void gf_write_ptr(const void *ptr, void __iomem *portl,
{
const unsigned long addr = (unsigned long)ptr;
- writel(lower_32_bits(addr), portl);
+ __raw_writel(lower_32_bits(addr), portl);
#ifdef CONFIG_64BIT
- writel(upper_32_bits(addr), porth);
+ __raw_writel(upper_32_bits(addr), porth);
#endif
}
@@ -23,9 +23,9 @@ static inline void gf_write_dma_addr(const dma_addr_t addr,
void __iomem *portl,
void __iomem *porth)
{
- writel(lower_32_bits(addr), portl);
+ __raw_writel(lower_32_bits(addr), portl);
#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
- writel(upper_32_bits(addr), porth);
+ __raw_writel(upper_32_bits(addr), porth);
#endif
}