[PATCH 23/42] mips/malta: Fix warnings

Joel Sherrill joel.sherrill at oarcorp.com
Fri Oct 17 15:23:39 UTC 2014


---
 c/src/lib/libbsp/mips/malta/console/conscfg.c | 16 ++++++++--------
 c/src/lib/libbsp/mips/malta/include/bsp.h     | 10 ++++++++++
 c/src/lib/libbsp/mips/malta/start/start.S     |  2 ++
 c/src/lib/libbsp/mips/malta/startup/inittlb.c |  1 +
 4 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/c/src/lib/libbsp/mips/malta/console/conscfg.c b/c/src/lib/libbsp/mips/malta/console/conscfg.c
index cefeb19..8d84c93 100644
--- a/c/src/lib/libbsp/mips/malta/console/conscfg.c
+++ b/c/src/lib/libbsp/mips/malta/console/conscfg.c
@@ -39,13 +39,13 @@
 
 #define COM_IO_BASE_ADDRESS   (0xa0000000UL | 0x18000000UL)
 
-uint8_t com_get_register(uint32_t addr, uint8_t i);
-void com_set_register(uint32_t addr, uint8_t i, uint8_t val);
-uint8_t tty2_get_register(uint32_t addr, uint8_t i);
-void tty2_set_register(uint32_t addr, uint8_t i, uint8_t val);
+static uint8_t com_get_register(uintptr_t addr, uint8_t i);
+static void com_set_register(uintptr_t addr, uint8_t i, uint8_t val);
+static uint8_t tty2_get_register(uintptr_t addr, uint8_t i);
+static void tty2_set_register(uintptr_t addr, uint8_t i, uint8_t val);
 
 
-uint8_t com_get_register(uint32_t addr, uint8_t i)
+uint8_t com_get_register(uintptr_t addr, uint8_t i)
 {
   uint8_t val;
   volatile uint8_t *ptr;
@@ -57,7 +57,7 @@ uint8_t com_get_register(uint32_t addr, uint8_t i)
   return val;
 }
 
-void com_set_register(uint32_t addr, uint8_t i, uint8_t val)
+void com_set_register(uintptr_t addr, uint8_t i, uint8_t val)
 {
   volatile uint8_t *ptr;
 
@@ -67,7 +67,7 @@ void com_set_register(uint32_t addr, uint8_t i, uint8_t val)
   *ptr = val;
 }
 
-uint8_t tty2_get_register(uint32_t addr, uint8_t i)
+uint8_t tty2_get_register(uintptr_t addr, uint8_t i)
 {
   uint8_t val;
   volatile uint8_t *ptr;
@@ -80,7 +80,7 @@ uint8_t tty2_get_register(uint32_t addr, uint8_t i)
   return val;
 }
 
-void tty2_set_register(uint32_t addr, uint8_t i, uint8_t val)
+void tty2_set_register(uintptr_t addr, uint8_t i, uint8_t val)
 {
   volatile uint8_t *ptr;
 
diff --git a/c/src/lib/libbsp/mips/malta/include/bsp.h b/c/src/lib/libbsp/mips/malta/include/bsp.h
index 12a2b4b..0d5b015 100644
--- a/c/src/lib/libbsp/mips/malta/include/bsp.h
+++ b/c/src/lib/libbsp/mips/malta/include/bsp.h
@@ -17,6 +17,8 @@
 #ifndef _BSP_H
 #define _BSP_H
 
+#ifndef ASM
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -99,8 +101,16 @@ uint32_t simple_in_32( uint32_t base, uint32_t addr );
 void simple_out_le16( uint32_t base, uint32_t addr, uint16_t val );
 void simple_out_16( uint32_t base, uint32_t addr, uint16_t val );
 
+/*
+ * Prototypes for methods called from .S for dependency tracking
+ */
+void init_tlb(void);
+void resettlb(int i);
+
 #ifdef __cplusplus
 }
 #endif
 
+#endif /* !ASM */
+
 #endif
diff --git a/c/src/lib/libbsp/mips/malta/start/start.S b/c/src/lib/libbsp/mips/malta/start/start.S
index 468a43b..0c185b5 100644
--- a/c/src/lib/libbsp/mips/malta/start/start.S
+++ b/c/src/lib/libbsp/mips/malta/start/start.S
@@ -20,6 +20,8 @@
 #include <rtems/asm.h>
 #include <bsp/regs.h>
 
+#include <bsp.h>
+
 #ifdef __mips16
 /* This file contains 32 bit assembly code.  */
 	.set nomips16
diff --git a/c/src/lib/libbsp/mips/malta/startup/inittlb.c b/c/src/lib/libbsp/mips/malta/startup/inittlb.c
index 37176b2..0088b98 100644
--- a/c/src/lib/libbsp/mips/malta/startup/inittlb.c
+++ b/c/src/lib/libbsp/mips/malta/startup/inittlb.c
@@ -11,6 +11,7 @@
  *  http://www.rtems.org/license/LICENSE.
  */
 
+#include <bsp.h>
 #include <rtems/mips/idtcpu.h>
 
 extern void resettlb( int i );
-- 
1.9.3




More information about the devel mailing list