[PATCH 06/54] powerpc/mvme5500: Fix warnings

Joel Sherrill joel.sherrill at oarcorp.com
Mon Oct 13 15:36:50 UTC 2014


---
 .../libbsp/powerpc/mvme5500/GT64260/MVME5500I2C.c  |  5 ++--
 c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c   | 30 ++++++++++------------
 .../lib/libbsp/powerpc/mvme5500/startup/bspstart.c | 10 +++-----
 .../powerpc/mvme5500/vectors/exceptionhandler.c    |  1 +
 c/src/lib/libbsp/powerpc/mvme5500/vme/VMEConfig.h  |  7 +++++
 5 files changed, 29 insertions(+), 24 deletions(-)

diff --git a/c/src/lib/libbsp/powerpc/mvme5500/GT64260/MVME5500I2C.c b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/MVME5500I2C.c
index 14d1444..382425e 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/GT64260/MVME5500I2C.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/MVME5500I2C.c
@@ -16,11 +16,12 @@
 
 /* #define I2C_DEBUG*/
 
-unsigned char I2cAddrPack(unsigned char busAddr,uint32_t offset)
+static unsigned char I2cAddrPack(unsigned char busAddr,uint32_t offset)
 {
   return(busAddr | ((offset & 0x700) >> 7));
 }
-unsigned char I2cDevByteAddr(uint32_t devA2A1A0, unsigned char byteNum)
+
+static unsigned char I2cDevByteAddr(uint32_t devA2A1A0, unsigned char byteNum)
 {
   return(( devA2A1A0 >>(byteNum*8)) & 0xff);
 }
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c b/c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c
index 7eaf82d..5bfe08d 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c
@@ -29,27 +29,23 @@ static void nop_func(void){}
  * default isOn function
  */
 static int not_connected(void) {return 0;}
-/*
- * default possible isOn function
- */
-static int connected(void) {return 1;}
 
 static rtems_irq_connect_data     	rtemsIrq[BSP_IRQ_NUMBER];
 static rtems_irq_global_settings     	initial_config;
 
-#ifdef BSP_SHARED_HANDLER_SUPPORT
-static rtems_irq_connect_data     	defaultIrq = {
-  /* vectorIdex,  hdl	    ,handle  , on	, off	   , isOn      ,next_handler, */
-  0, 		  nop_func  , NULL   , nop_func	, nop_func , not_connected, 0
-};
-#else
 static rtems_irq_connect_data     	defaultIrq = {
-  /* vectorIdex,	 hdl	  , handle	, on		, off		, isOn */
-  0, 			 nop_func  , NULL	, nop_func	, nop_func	, not_connected
-};
+  .name   = 0,
+  .hdl    = NULL,
+  .handle = NULL,
+  .on     = (rtems_irq_enable) nop_func,
+  .off    = (rtems_irq_disable) nop_func,
+  .isOn   = (rtems_irq_is_enabled) not_connected,
+#ifdef BSP_SHARED_HANDLER_SUPPORT
+  .next_handler = NULL
 #endif
+};
 
-rtems_irq_prio BSPirqPrioTable[BSP_PIC_IRQ_NUMBER]={
+rtems_irq_prio BSPirqPrioTable[BSP_PIC_IRQ_NUMBER] = {
   /*
    * This table is where the developers can change the levels of priority
    * based on the need of their applications.
@@ -97,7 +93,7 @@ rtems_irq_prio BSPirqPrioTable[BSP_PIC_IRQ_NUMBER]={
 void BSP_rtems_irq_mng_init(unsigned cpuId)
 {
   int                   i;
-  rtems_interrupt_level l;
+  rtems_interrupt_level level;
 
   /*
    * First initialize the Interrupt management hardware
@@ -133,7 +129,9 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
   printk("Going to setup irq mngt configuration\n");
 #endif
 
-  rtems_interrupt_disable(l);
+  rtems_interrupt_disable(level);
+  (void) level; /* avoid set but not used warning */
+
   if (!BSP_rtems_irq_mngt_set(&initial_config)) {
       /*
        * put something here that will show the failure...
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c
index 18ad2b8..e921b71 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c
@@ -196,8 +196,6 @@ void bsp_start( void )
 #endif
   uintptr_t intrStackStart;
   uintptr_t intrStackSize;
-  ppc_cpu_id_t myCpu;
-  ppc_cpu_revision_t myCpuRevision;
   Triv121PgTbl  pt=0;
 
   /* Till Straumann: 4/2005
@@ -219,11 +217,11 @@ void bsp_start( void )
 
 
   /*
-   * Get CPU identification dynamically. Note that the get_ppc_cpu_type() function
-   * store the result in global variables so that it can be used latter...
+   * Get CPU identification dynamically. Note that the get_ppc_cpu_type()
+   * function store the result in global variables so that it can be used later.
    */
-  myCpu   = get_ppc_cpu_type();
-  myCpuRevision = get_ppc_cpu_revision();
+  get_ppc_cpu_type();
+  get_ppc_cpu_revision();
 
 #ifdef SHOW_LCR1_REGISTER
   l1cr = get_L1CR();
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c b/c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c
index 2e6a9bf..216b4a9 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c
@@ -48,6 +48,7 @@
 
 #include <bsp.h>
 #include <bsp/vectors.h>
+#include <bsp/bootcard.h>
 #include <libcpu/spr.h>
 #include <bsp/pci.h>
 #include <rtems/bspIo.h>
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/vme/VMEConfig.h b/c/src/lib/libbsp/powerpc/mvme5500/vme/VMEConfig.h
index 19a7021..ecc5789 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/vme/VMEConfig.h
+++ b/c/src/lib/libbsp/powerpc/mvme5500/vme/VMEConfig.h
@@ -16,6 +16,13 @@
  * is enabled again. 
  * 
  */
+
+/*
+ *  Prototypes
+ */
+int BSP_VMEInit(void);
+int BSP_VMEIrqMgrInstall(void);
+
 /* BSP specific address space configuration parameters */
 
 /* 
-- 
1.9.3




More information about the devel mailing list