arm: vt8500: Fix build warning in uncompress.h [for 3.7]
Subsystems (3)
PATCH v2 1/1 arm: vt8500: Fix build warning in uncompress.h [for 3.7]
This removes a build-time warning in uncompress.h due to incorrectly cast values being passed to readb/writeb.
Removed arm/io.h and readb/writeb. Read/write directly to the serial port with a volatile pointer.
--- arch/arm/mach-vt8500/include/mach/uncompress.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/mach-vt8500/include/mach/uncompress.h +4 -4
@@ -15,15 +15,15 @@* */ -#define UART0_PHYS 0xd8200000 -#include <asm/io.h> +#define UART0_PHYS 0xf8200000 +#define UART0_ADDR (x) *(volatile unsigned char *)(UART0_PHYS + x)static void putc (const char c) { -while (readb (UART0_PHYS +0x1c ) &0x2 ) +while (UART0_ADDR (0x1c ) &0x2 )/* Tx busy, wait and poll */ ; -writeb (c,UART0_PHYS ); +UART0_ADDR (0 ) = c; }static void flush (void )
Signature · 1 line
1.7.9.5
PATCH v2 1/1 arm: vt8500: Fix build warning in uncompress.h [for 3.7]
Quoted 25 lines · Tony Prisk
This removes a build-time warning in
uncompress.hdue to incorrectly cast values being passed to readb/writeb.Removed
arm/io.hand readb/writeb. Read/write directly to the serial port with a volatile pointer.Signed-off-by Tony Prisk <[email protected]>--- arch/arm/mach-vt8500/include/mach/uncompress.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)arch/arm/mach-vt8500/include/mach/uncompress.h +2
-2@@ -15,15 +15,15 @@* */ -#define UART0_PHYS 0xd8200000 -#include <asm/io.h> +#define UART0_PHYS 0xf8200000 +#define UART0_ADDR (x) *(volatile unsigned char *)(UART0_PHYS + x)static void putc (const char c)
arch/arm/mach-vt8500/include/mach/uncompress.h line 29
Quoted 10 lines
arch/arm/mach-vt8500/include/mach/uncompress.h +2
-2{ -while (readb (UART0_PHYS +0x1c ) &0x2 ) +while (UART0_ADDR (0x1c ) &0x2 )/* Tx busy, wait and poll */ ; -writeb (c,UART0_PHYS ); +UART0_ADDR (0 ) = c; }static void flush (void )
Blah - had a senior moment. Don't know why I changed the address because I believe this is called before paging is set up so it should be the actual physical address of the UART.
Regards
Tony P