Re: [PATCH v9 04/12] MIPS: add common MIPS stuff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> index e37b6c5..2b3227a 100644
> --- a/arch/mips/include/asm/common.h
> +++ b/arch/mips/include/asm/common.h
> @@ -24,6 +24,17 @@
>  #ifndef _ASM_MIPS_COMMON_H_
>  #define _ASM_MIPS_COMMON_H_
>  
> -/* nothing special yet */
> +#define NS16550_READ_WRITE_UART_FUNC(pfx, shift, offset) \
> +static unsigned int pfx ##_uart_read(unsigned long base, \
> +		unsigned char reg_idx) \
> +{									\
> +	return __raw_readb((char *)base + (reg_idx << shift) + offset);	\
> +}									\
> +									\
> +static void pfx ##_uart_write(unsigned int val, unsigned long base, \
> +		unsigned char reg_idx) \
> +{									\
> +	__raw_writeb(val, (char *)base + (reg_idx << shift) + offset);	\
> +}									\
you can drop this

add the following patch instead as will need readb/w/l and writeb/w/l for
cfi support anyway

otherwise lokks very good

Best Regards,
J.
>From b2f4074620cc8965457c2461860363c1800bf424 Mon Sep 17 00:00:00 2001
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx>
Date: Sun, 17 Jul 2011 13:57:44 +0800
Subject: [PATCH] mips: add readb/w/l and writeb/w/l support

needed by cfi driver as example

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx>
---
 arch/mips/include/asm/io.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
index 97ea231..51a5340 100644
--- a/arch/mips/include/asm/io.h
+++ b/arch/mips/include/asm/io.h
@@ -62,4 +62,12 @@ static inline void __raw_writel(u32 b, volatile void __iomem *addr)
 }
 #endif
 
+#define writeb(v,a) __raw_writeb(v,a)
+#define writew(v,a) __raw_writew(v,a)
+#define writel(v,a) __raw_writel(v,a)
+
+#define readb(a) __raw_readb(a)
+#define readw(a) __raw_readw(a)
+#define readl(a) __raw_readl(a)
+
 #endif	/* __ASM_MIPS_IO_H */
-- 
1.7.5.4

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox

[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux