]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sparc: Fix build warnings in serial.c
authorSimon Glass <sjg@chromium.org>
Tue, 5 Mar 2013 14:40:04 +0000 (14:40 +0000)
committerTom Rini <trini@ti.com>
Fri, 15 Mar 2013 20:14:02 +0000 (16:14 -0400)
These macros are already defined in io.h so should not be declared in
serial.c.

serial.c:38:0: warning: "READ_BYTE" redefined
/home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:36:0: note: this is the location of the previous definition
serial.c:39:0: warning: "READ_HWORD" redefined
/home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:37:0: note: this is the location of the previous definition
serial.c:40:0: warning: "READ_WORD" redefined
/home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:38:0: note: this is the location of the previous definition
serial.c:41:0: warning: "READ_DWORD" redefined
/home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:39:0: note: this is the location of the previous definition

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
arch/sparc/cpu/leon2/serial.c
arch/sparc/cpu/leon3/serial.c

index 40d5b01d2710af86750efd0d342ac0214fa7c6c1..b41ee01818ca0dcf5aef507958ca18d7cacecdc6 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
-/* Force cache miss each time a serial controller reg is read */
-#define CACHE_BYPASS 1
-
-#ifdef CACHE_BYPASS
-#define READ_BYTE(var)  SPARC_NOCACHE_READ_BYTE((unsigned int)&(var))
-#define READ_HWORD(var) SPARC_NOCACHE_READ_HWORD((unsigned int)&(var))
-#define READ_WORD(var)  SPARC_NOCACHE_READ((unsigned int)&(var))
-#define READ_DWORD(var) SPARC_NOCACHE_READ_DWORD((unsigned int)&(var))
-#endif
-
 static int leon2_serial_init(void)
 {
        LEON2_regs *leon2 = (LEON2_regs *) LEON2_PREGS;
index 838d4514eeb2ff4d794e2782468a522db688420f..af9ce55673820b0df3621d1ac3a08421726f9a44 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
-/* Force cache miss each time a serial controller reg is read */
-#define CACHE_BYPASS 1
-
-#ifdef CACHE_BYPASS
-#define READ_BYTE(var)  SPARC_NOCACHE_READ_BYTE((unsigned int)&(var))
-#define READ_HWORD(var) SPARC_NOCACHE_READ_HWORD((unsigned int)&(var))
-#define READ_WORD(var)  SPARC_NOCACHE_READ((unsigned int)&(var))
-#define READ_DWORD(var) SPARC_NOCACHE_READ_DWORD((unsigned int)&(var))
-#endif
-
 ambapp_dev_apbuart *leon3_apbuart = NULL;
 
 static int leon3_serial_init(void)