Changeset cc7c922 in rtems


Ignore:
Timestamp:
Oct 9, 2014, 6:38:59 PM (6 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 5, master
Children:
e160e41
Parents:
20cb691
git-author:
Joel Sherrill <joel.sherrill@…> (10/09/14 18:38:59)
git-committer:
Joel Sherrill <joel.sherrill@…> (10/10/14 15:17:17)
Message:

powerpc/ep1a: Fix multiple warnings

Location:
c/src/lib/libbsp/powerpc/ep1a
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/ep1a/console/alloc360.c

    r20cb691 rcc7c922  
    2626#define DEBUG_PRINT 1
    2727
    28 void M360SetupMemory( M68360_t ptr ){
     28void M360SetupMemory( M68360_t ptr )
     29{
    2930  volatile m360_t  *m360;
    3031
     
    3536       (unsigned int)&(m360->mcr), ((unsigned int)m360+Q1_360_SIM_MCR));
    3637#endif
    37   ptr->bdregions[0].base = (char *)&m360->dpram1[0];
     38  ptr->bdregions[0].base = &m360->dpram1[0];
    3839  ptr->bdregions[0].size = sizeof m360->dpram1;
    3940  ptr->bdregions[0].used = 0;
    4041
    41   ptr->bdregions[1].base = (char *)&m360->dpram3[0];
     42  ptr->bdregions[1].base = &m360->dpram3[0];
    4243  ptr->bdregions[1].size = sizeof m360->dpram3;
    4344  ptr->bdregions[1].used = 0;
    4445
    45   ptr->bdregions[2].base = (char *)&m360->dpram0[0];
     46  ptr->bdregions[2].base = &m360->dpram0[0];
    4647  ptr->bdregions[2].size = sizeof m360->dpram0;
    4748  ptr->bdregions[2].used = 0;
    4849
    49   ptr->bdregions[3].base = (char *)&m360->dpram2[0];
     50  ptr->bdregions[3].base = &m360->dpram2[0];
    5051  ptr->bdregions[3].size = sizeof m360->dpram2;
    5152  ptr->bdregions[3].used = 0;
     
    6061{
    6162  unsigned int i;
    62   ISR_Level    level;
    63   void        *bdp  = NULL;
    64   unsigned int want  = count * sizeof(m360BufferDescriptor_t);
    65   int          have;
     63  rtems_interrupt_level   level;
     64  volatile unsigned char *bdp  = NULL;
     65  unsigned int            want  = count * sizeof(m360BufferDescriptor_t);
     66  int                     have;
    6667
    6768  /*
     
    7071   * initialization sequence so the effect shouldn't be too severe.
    7172   */
    72   _ISR_Disable (level);
     73  rtems_interrupt_disable(level);
    7374
    7475  for (i = 0 ; i < M360_NUM_DPRAM_REAGONS ; i++) {
     
    101102    }
    102103  }
    103   _ISR_Enable (level);
     104  rtems_interrupt_enable(level);
    104105  if (bdp == NULL){
    105106    printk("rtems_panic can't allocate %d buffer descriptor(s).\n");
    106107    rtems_panic ("Can't allocate %d buffer descriptor(s).\n", count);
    107108  }
    108   return bdp;
     109  return (void *)bdp;
    109110}
  • c/src/lib/libbsp/powerpc/ep1a/console/m68360.h

    r20cb691 rcc7c922  
    934934
    935935struct bdregions_t {
    936   char            *base;
    937   unsigned int    size;
    938   unsigned int    used;
     936  volatile unsigned char  *base;
     937  unsigned int             size;
     938  unsigned int             used;
    939939};
    940940
  • c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c

    r20cb691 rcc7c922  
    11/*  This file contains the termios TTY driver for the
    22 *  Motorola MC68360 SCC ports.
    3  *
     3 */
     4
     5/*
    46 *  COPYRIGHT (c) 1989-2008.
    57 *  On-Line Applications Research Corporation (OAR).
     
    3537int mc68360_length_count=0;
    3638
    37 void mc68360_Show_length_array(void) {
     39#if 0
     40/*
     41 * This is a debug method which is not currently used.
     42 */
     43static void mc68360_Show_length_array(void)
     44{
    3845  int i;
    3946  for (i=0; i<MC68360_LENGTH_SIZE; i++)
     
    4249}
    4350#endif
     51#endif
    4452
    4553
     
    4755
    4856#define SYNC     eieio
    49 #define mc68360_scc_Is_422( _minor ) (Console_Port_Tbl[minor]->sDeviceName[7] == '4' )
    50 
    51 
    52 void mc68360_scc_nullFunc(void) {}
    53 
    54 uint8_t scc_read8(
     57#define mc68360_scc_Is_422( _minor ) \
     58  (Console_Port_Tbl[minor]->sDeviceName[7] == '4' )
     59
     60#if 0
     61/*
     62 * This method is included for completeness but not currently used.
     63 */
     64static uint8_t scc_read8(
    5565  const char       *name,
    5666  volatile uint8_t *address
     
    6979  return value;
    7080}
    71 
    72 void scc_write8(
     81#endif
     82
     83static void scc_write8(
    7384  const char       *name,
    7485  volatile uint8_t *address,
     
    8293}
    8394
    84 
    85 uint16_t scc_read16(
     95static uint16_t scc_read16(
    8696  const char        *name,
    8797  volatile uint16_t *address
     
    101111}
    102112
    103 void scc_write16(
     113static void scc_write16(
    104114  const char        *name,
    105115  volatile uint16_t *address,
     
    113123}
    114124
    115 
    116 uint32_t scc_read32(
     125static uint32_t scc_read32(
    117126  const char        *name,
    118127  volatile uint32_t *address
     
    132141}
    133142
    134 void scc_write32(
     143static void scc_write32(
    135144  const char        *name,
    136145  volatile uint32_t *address,
     
    144153}
    145154
    146 void mc68360_sccShow_Regs(int minor){
     155#if 0
     156/*
     157 * This is a debug method which is not currently used.
     158 */
     159static void mc68360_sccShow_Regs(int minor)
     160{
    147161  M68360_serial_ports_t  ptr;
    148162  ptr   = Console_Port_Tbl[minor]->pDeviceParams;
     
    152166
    153167}
     168#endif
    154169
    155170#define TX_BUFFER_ADDRESS( _ptr ) \
     
    326341 *  Default state is 9600 baud, 8 bits, No parity, and 1 stop bit.
    327342 */
    328 
    329 int mc68360_scc_open(
     343static int mc68360_scc_open(
    330344  int      major,
    331345  int      minor,
     
    654668 */
    655669
    656 int mc68360_scc_write_support_int(
     670ssize_t mc68360_scc_write_support_int(
    657671  int         minor,
    658672  const char *buf,
    659   int         len
     673  size_t      len
    660674)
    661675{
     
    954968    chip->board_data->funcNo,
    955969    &mc68360_sccInterruptHandler,
    956     chip
     970    (uintptr_t) chip
    957971  );
    958972
  • c/src/lib/libbsp/powerpc/ep1a/console/ns16550cfg.c

    r20cb691 rcc7c922  
    11/*
    2  *  This include file contains all console driver definations for the nc16550
    3  *
     2 *  This include file contains all console driver definitions for the ns16550.
     3 */
     4
     5/*
    46 *  COPYRIGHT (c) 1989-2008.
    57 *  On-Line Applications Research Corporation (OAR).
     
    1012 */
    1113
    12 #include <rtems.h>
     14#include <bsp.h>
    1315#include <libchip/serial.h>
    1416#include <libchip/ns16550.h>
    15 #include <bsp.h>
     17
     18#include "ns16550cfg.h"
    1619
    1720typedef struct uart_reg
     
    2225
    2326uint8_t Read_ns16550_register(
    24   uint32_t  ulCtrlPort,
    25   uint8_t   ucRegNum
     27  uintptr_t  ulCtrlPort,
     28  uint8_t    ucRegNum
    2629)
    2730{
    28 volatile struct uart_reg *p = (volatile struct uart_reg *)ulCtrlPort;
     31  volatile struct uart_reg *p = (volatile struct uart_reg *)ulCtrlPort;
    2932  uint8_t  ucData;
     33
    3034  ucData = p[ucRegNum].reg;
    3135  __asm__ volatile("sync");
     
    3438
    3539void  Write_ns16550_register(
    36   uint32_t  ulCtrlPort,
    37   uint8_t   ucRegNum,
    38   uint8_t   ucData
     40  uintptr_t  ulCtrlPort,
     41  uint8_t    ucRegNum,
     42  uint8_t    ucData
    3943)
    4044{
  • c/src/lib/libbsp/powerpc/ep1a/console/ns16550cfg.h

    r20cb691 rcc7c922  
    11/*
    2  *  This include file contains all console driver definations for the nc16550
    3  *
     2 *  This include file contains all console driver definitions for the ns16550.
     3 */
     4
     5/*
    46 * COPYRIGHT (c) 1989-2008.
    57 * On-Line Applications Research Corporation (OAR).
     
    2224
    2325uint8_t Read_ns16550_register(
    24   uint32_t  ulCtrlPort,
    25   uint8_t   ucRegNum
     26  uintptr_t  ulCtrlPort,
     27  uint8_t    ucRegNum
    2628);
    2729
    2830void  Write_ns16550_register(
    29   uint32_t  ulCtrlPort,
    30   uint8_t   ucRegNum,
    31   uint8_t   ucData
     31  uintptr_t  ulCtrlPort,
     32  uint8_t    ucRegNum,
     33  uint8_t    ucData
    3234);
    3335
  • c/src/lib/libbsp/powerpc/ep1a/console/rsPMCQ1.c

    r20cb691 rcc7c922  
    5353/* forward declarations */
    5454
     55#if 0
    5556/* local Qspan II serial eeprom table */
    5657static unsigned char rsPMCQ1eeprom[] =
     
    8081    0x00        /* Byte 22 - PCI_BST */
    8182};
    82 
    83 void MsDelay(void)
     83#endif
     84
     85static void MsDelay(void)
    8486{
    8587  printk(".");
    8688}
    8789
    88 void write8( int addr, int data ){
     90static void write8( int addr, int data ){
    8991  out_8((void *)addr, (unsigned char)data);
    9092}
    9193
    92 void write16( int addr, int data ) {
     94static void write16( int addr, int data ) {
    9395  out_be16((void *)addr, (short)data );
    9496}
    9597
    96 void write32( int addr, int data ) {
     98static void write32( int addr, int data ) {
    9799  out_be32((unsigned int *)addr, data );
    98100}
    99101
    100 int read32( int addr){
     102#if 0
     103static int read32( int addr){
    101104  return in_be32((unsigned int *)addr);
    102105}
    103 
    104 
    105 void rsPMCQ1_scc_nullFunc(void) {}
     106#endif
     107
     108
     109static void rsPMCQ1_scc_nullFunc(void) {}
    106110
    107111/*******************************************************************************
     
    114118*/
    115119
    116 void rsPMCQ1Int( void *ptr )
     120static void rsPMCQ1Int( void *ptr )
    117121{
    118122  unsigned long   status;
     
    157161  /* read back the status register to ensure that the pci write has completed */
    158162  status1 = *(volatile unsigned long *)(boardData->bridgeaddr + 0x600);
     163  (void) status1;  /* avoid set but not used warning */
    159164  RTEMS_COMPILER_MEMORY_BARRIER();
    160165
     
    176181    unsigned long       slotNo, /* Pci Slot number of PMCQ1 */
    177182    unsigned long       funcNo, /* Pci Function number of PMCQ1 */
    178     FUNCION_PTR routine,/* interrupt routine */
    179     int         arg     /* argument to pass to interrupt routine */
     183    FUNCTION_PTR        routine,/* interrupt routine */
     184    uintptr_t           arg     /* argument to pass to interrupt routine */
    180185)
    181186{
     
    208213}
    209214
     215#if 0
     216/* This method is apparently unused. --joel 9 Oct 2014 */
    210217/*******************************************************************************
    211218*
     
    217224* RETURNS: OK if PMCQ1 found, ERROR if not.
    218225*/
    219 
    220 unsigned int rsPMCQ1MaIntDisconnect(
     226static unsigned int rsPMCQ1MaIntDisconnect(
    221227    unsigned long       busNo,  /* Pci Bus number of PMCQ1 */
    222228    unsigned long       slotNo, /* Pci Slot number of PMCQ1 */
     
    240246  return (status);
    241247}
     248#endif
    242249
    243250/*******************************************************************************
     
    250257* RETURNS: OK if PMCQ1 found, ERROR if not.
    251258*/
    252 
    253259unsigned int rsPMCQ1QuiccIntConnect(
    254260    unsigned long       busNo,  /* Pci Bus number of PMCQ1 */
    255261    unsigned long       slotNo, /* Pci Slot number of PMCQ1 */
    256262    unsigned long       funcNo, /* Pci Function number of PMCQ1 */
    257     FUNCION_PTR routine,/* interrupt routine */
    258     int         arg     /* argument to pass to interrupt routine */
     263    FUNCTION_PTR        routine,/* interrupt routine */
     264    uintptr_t           arg     /* argument to pass to interrupt routine */
    259265)
    260266{
     
    276282}
    277283
     284#if 0
     285/* This method is apparently unused. --joel 9 Oct 2014 */
    278286/*******************************************************************************
    279287*
     
    285293* RETURNS: OK if PMCQ1 found, ERROR if not.
    286294*/
    287 
    288 unsigned int rsPMCQ1QuiccIntDisconnect(
     295static unsigned int rsPMCQ1QuiccIntDisconnect(
    289296    unsigned long       busNo,  /* Pci Bus number of PMCQ1 */
    290297    unsigned long       slotNo, /* Pci Slot number of PMCQ1 */
     
    309316  return (status);
    310317}
     318#endif
     319/* This method is apparently unused. --joel 9 Oct 2014 */
    311320
    312321
     
    324333  int busNo;
    325334  int slotNo;
    326   unsigned int baseaddr = 0;
    327   unsigned int bridgeaddr = 0;
     335  uint32_t baseaddr = 0;
     336  uint32_t bridgeaddr = 0;
    328337  unsigned long pbti0_ctl;
    329338  int i;
    330339  unsigned char int_vector;
    331340  int fun;
    332   int temp;
     341  uint32_t temp;
    333342  PPMCQ1BoardData       boardData;
    334   rtems_irq_connect_data IrqData = {0,
    335                                     rsPMCQ1Int,
    336                                     rsPMCQ1_scc_nullFunc,
    337                                     rsPMCQ1_scc_nullFunc,
    338                                     rsPMCQ1_scc_nullFunc,
    339                                     NULL};
     343  rtems_irq_connect_data IrqData = {
     344    .name   = 0,
     345    .hdl    = rsPMCQ1Int,
     346    .handle = NULL,
     347    .on     = (rtems_irq_enable) rsPMCQ1_scc_nullFunc,
     348    .off    = (rtems_irq_disable) rsPMCQ1_scc_nullFunc,
     349    .isOn   = (rtems_irq_is_enabled) rsPMCQ1_scc_nullFunc,
     350  };
    340351
    341352  if (rsPMCQ1Initialized)
     
    481492}
    482493
     494#if 0
     495/* This method is apparently unused. --joel 9 Oct 2014 */
    483496/*******************************************************************************
    484497*
     
    490503* EEPROM modifications to be performed).
    491504*/
    492 
    493 unsigned int rsPMCQ1Commission( unsigned long busNo, unsigned long slotNo )
     505static unsigned int rsPMCQ1Commission(
     506  unsigned long busNo,
     507  unsigned long slotNo
     508)
    494509{
    495510  unsigned int status = RTEMS_IO_ERROR;
     
    556571  return(status);
    557572}
     573#endif
    558574
    559575uint32_t PMCQ1_Read_EPLD( uint32_t base, uint32_t reg )
  • c/src/lib/libbsp/powerpc/ep1a/console/rsPMCQ1.h

    r20cb691 rcc7c922  
    109109#define QSPAN2_INT_STATUS       0x00000600
    110110
    111 typedef void (*FUNCION_PTR) (int);
     111typedef void (*FUNCTION_PTR) (int);
    112112
    113113#define PCI_ID(v, d) ((d << 16) | v)
     
    132132    unsigned long                       baseaddr;
    133133    unsigned long                       bridgeaddr;
    134     FUNCION_PTR                         quiccInt;
    135     int                                 quiccArg;
    136     FUNCION_PTR                         maInt;
    137     int                                 maArg;
     134    FUNCTION_PTR                        quiccInt;
     135    uintptr_t                           quiccArg;
     136    FUNCTION_PTR                        maInt;
     137    uintptr_t                           maArg;
    138138} PMCQ1BoardData, *PPMCQ1BoardData;
    139139
     
    147147  unsigned long         slotNo,
    148148  unsigned long         funcNo,
    149   FUNCION_PTR           routine,
    150   int                   arg
     149  FUNCTION_PTR          routine,
     150  uintptr_t             arg
    151151);
     152
    152153unsigned int rsPMCQ1Init(void);
     154
    153155unsigned int rsPMCQ1MaIntConnect (
    154156    unsigned long       busNo,  /* Pci Bus number of PMCQ1 */
    155157    unsigned long       slotNo, /* Pci Slot number of PMCQ1 */
    156158    unsigned long       funcNo, /* Pci Function number of PMCQ1 */
    157     FUNCION_PTR         routine,/* interrupt routine */
    158     int                 arg     /* argument to pass to interrupt routine */
     159    FUNCTION_PTR        routine,/* interrupt routine */
     160    uintptr_t           arg     /* argument to pass to interrupt routine */
    159161);
    160162
  • c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c

    r20cb691 rcc7c922  
    44
    55/*
    6  *  COPYRIGHT (c) 1989-2007.
     6 *  COPYRIGHT (c) 1989-2014.
    77 *  On-Line Applications Research Corporation (OAR).
    88 *
     
    5252unsigned int BSP_mem_size = (unsigned int)&RAM_END;
    5353
    54 void BSP_Increment_Light(void){
     54static void BSP_Increment_Light(void)
     55{
    5556  uint8_t data;
     57
    5658  data = *GENERAL_REGISTER1;
    5759  data &= 0xf0;
     
    6062}
    6163
    62 void BSP_Fatal_Fault_Light(void) {
     64#if 0
     65static void BSP_Fatal_Fault_Light(void)
     66{
    6367  uint8_t data;
     68
    6469  data = *GENERAL_REGISTER1;
    6570  data &= 0xf0;
     
    6873    *GENERAL_REGISTER1 = data;
    6974}
    70 
    71 void write_to_Q2ram(int offset, unsigned int data )
    72 {
    73 printk("0x%x ==> %d\n", offset, data );
    74 #if 0
    75   unsigned int *ptr = 0x82000000;
    76   ptr += offset;
    77   *ptr = data;
    78 #endif
    79 }
     75#endif
    8076
    8177/*
    8278 * Vital Board data Start using DATA RESIDUAL
    8379 */
    84 
    8580uint32_t VME_Slot1 = FALSE;
    8681
     
    161156}
    162157
    163 void zero_bss(void)
    164 {
    165   memset(__SBSS_START__, 0, ((unsigned) __SBSS_END__) - ((unsigned)__SBSS_START__));
    166   memset(__SBSS2_START__, 0, ((unsigned) __SBSS2_END__) - ((unsigned)__SBSS2_START__));
    167   memset(__bss_start, 0, ((unsigned) __rtems_end) - ((unsigned)__bss_start));
    168 }
    169 
    170 char * save_boot_params(RESIDUAL* r3, void *r4, void* r5, char *additional_boot_options)
    171 {
    172 #if 0
    173   residualCopy = *r3;
    174   strncpy(loaderParam, additional_boot_options, MAX_LOADER_ADD_PARM);
    175   loaderParam[MAX_LOADER_ADD_PARM - 1] ='\0';
    176   return loaderParam;
    177 #endif
    178   return 0;
    179 }
    180 
    181158unsigned int EUMBBAR;
    182159
    183 unsigned int get_eumbbar(void) {
     160static unsigned int get_eumbbar(void)
     161{
    184162  register int a, e;
    185163
     
    199177}
    200178
    201 void Read_ep1a_config_registers( ppc_cpu_id_t myCpu ) {
     179static void Read_ep1a_config_registers( ppc_cpu_id_t myCpu ) {
    202180  unsigned char value;
    203181
     
    274252 *  This routine does the bulk of the system initialization.
    275253 */
    276 
    277254void bsp_start( void )
    278255{
     
    291268  myCpu         = get_ppc_cpu_type();
    292269  myCpuRevision = get_ppc_cpu_revision();
     270  (void) myCpuRevision; /* avoid set but not used warning */
    293271
    294272  EUMBBAR = get_eumbbar();
Note: See TracChangeset for help on using the changeset viewer.