Changeset 3cd3a260 in rtems


Ignore:
Timestamp:
Dec 12, 2014, 3:32:58 PM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
3acc619
Parents:
e4e66d4
git-author:
Sebastian Huber <sebastian.huber@…> (12/12/14 15:32:58)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/12/14 15:36:39)
Message:

bsp/mpc8xx: Fix warnings

close #2211

Location:
c/src/lib
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/mbx8xx/include/bsp.h

    re4e66d4 r3cd3a260  
    8686void _InitMBX8xx(void);
    8787
     88int BSP_disconnect_clock_handler(void);
     89
     90int BSP_connect_clock_handler (rtems_irq_hdl);
     91
    8892#ifdef __cplusplus
    8993}
  • c/src/lib/libbsp/powerpc/tqm8xx/configure.ac

    re4e66d4 r3cd3a260  
    7878 interrupt driven (spooled) operation. Set it to CONS_MODE_UNUSED, if not used])
    7979
    80 RTEMS_BSPOPTS_SET([SPI_BOARD_INIT_FNC],[pghplus],[bsp_pghplus_spi_init])
    81 RTEMS_BSPOPTS_SET([SPI_BOARD_INIT_FNC],[*],[bsp_dummy_spi_init])
    82 RTEMS_BSPOPTS_HELP([SPI_BOARD_INIT_FNC],
    83 [(BSP--SPI board init function) Specify the function that inits the board
    84  port lines and further devices.])
    85 
    86 RTEMS_BSPOPTS_SET([SPI_SEND_STOP_FNC],[pghplus],[bsp_pghplus_spi_send_stop])
    87 RTEMS_BSPOPTS_SET([SPI_SEND_STOP_FNC],[*],[bsp_dummy_spi_send_stop])
    88 RTEMS_BSPOPTS_HELP([SPI_SEND_STOP_FNC],
    89 [(BSP--SPI send stop function) Specify the function that deaddresses SPI
    90  devices. Set to bsp_dummy_spi_send_stop for dummy implementation])
    91 
    92 RTEMS_BSPOPTS_SET([SPI_SEND_ADDR_FNC],[pghplus],[bsp_pghplus_spi_sel_addr])
    93 RTEMS_BSPOPTS_SET([SPI_SEND_ADDR_FNC],[*],[bsp_dummy_spi_sel_addr])
    94 RTEMS_BSPOPTS_HELP([SPI_SEND_ADDR_FNC],
    95 [(BSP--SPI send address function) Specify the function that addresses SPI
    96  devices. Set to bsp_dummy_spi_sel_addr for dummy implementation])
    97 
    9880# add selection of primary network interface
    9981RTEMS_BSPOPTS_SET([BSP_USE_NETWORK_FEC],[pghplus],[1])
  • c/src/lib/libbsp/powerpc/tqm8xx/include/bsp.h

    re4e66d4 r3cd3a260  
    6767#include <rtems/console.h>
    6868#include <rtems/clockdrv.h>
     69#include <rtems/irq.h>
    6970#include <mpc8xx.h>
    7071#include <mpc8xx/cpm.h>
     
    145146int BSP_connect_clock_handler (rtems_irq_hdl);
    146147
     148extern uint32_t bsp_clock_speed;
     149
     150char serial_getc(void);
     151
     152int serial_tstc(void);
     153
     154void serial_init(void);
     155
     156int mbx8xx_console_get_configuration(void);
     157
     158void _InitTQM8xx (void);
     159
     160rtems_status_code bsp_register_spi(void);
     161
     162void *bsp_idle_thread( uintptr_t ignored );
     163
     164void cpu_init(void);
     165
    147166#ifdef __cplusplus
    148167}
  • c/src/lib/libbsp/powerpc/tqm8xx/include/irq.h

    re4e66d4 r3cd3a260  
    151151#define BSP_INTERRUPT_VECTOR_MAX BSP_MAX_OFFSET
    152152
     153extern int BSP_irq_enabled_at_cpm(const rtems_irq_number irqLine);
     154
    153155#ifdef __cplusplus
    154156}
  • c/src/lib/libbsp/powerpc/tqm8xx/irq/irq.c

    re4e66d4 r3cd3a260  
    3636 */
    3737
    38 rtems_status_code bsp_irq_disable_at_SIU(rtems_vector_number irqnum)
     38static rtems_status_code bsp_irq_disable_at_SIU(rtems_vector_number irqnum)
    3939{
    4040  rtems_vector_number vecnum = irqnum - BSP_SIU_IRQ_LOWEST_OFFSET;
     
    4343}
    4444
    45 rtems_status_code bsp_irq_enable_at_SIU(rtems_vector_number irqnum)
     45static rtems_status_code bsp_irq_enable_at_SIU(rtems_vector_number irqnum)
    4646{
    4747  rtems_vector_number vecnum = irqnum - BSP_SIU_IRQ_LOWEST_OFFSET;
     
    5050}
    5151
    52 rtems_status_code bsp_irq_disable_at_CPM(rtems_vector_number irqnum)
     52static rtems_status_code bsp_irq_disable_at_CPM(rtems_vector_number irqnum)
    5353{
    5454  rtems_vector_number vecnum = irqnum - BSP_CPM_IRQ_LOWEST_OFFSET;
     
    5757}
    5858
    59 rtems_status_code bsp_irq_enable_at_CPM(rtems_vector_number irqnum)
     59static rtems_status_code bsp_irq_enable_at_CPM(rtems_vector_number irqnum)
    6060{
    6161  rtems_vector_number vecnum = irqnum - BSP_CPM_IRQ_LOWEST_OFFSET;
     
    185185 * Activate the CPIC
    186186 */
    187 rtems_status_code mpc8xx_cpic_initialize( void)
     187static rtems_status_code mpc8xx_cpic_initialize( void)
    188188{
    189189  /*
     
    205205 * Activate the SIU interrupt controller
    206206 */
    207 rtems_status_code mpc8xx_siu_int_initialize( void)
     207static rtems_status_code mpc8xx_siu_int_initialize( void)
    208208{
    209209  /*
     
    215215}
    216216
    217 int mpc8xx_exception_handler(BSP_Exception_frame *frame,
     217static int mpc8xx_exception_handler(BSP_Exception_frame *frame,
    218218                             unsigned exception_number)
    219219{
  • c/src/lib/libbsp/powerpc/tqm8xx/spi/spi.c

    re4e66d4 r3cd3a260  
    627627| Function:                                                                 |
    628628\*-------------------------------------------------------------------------*/
    629 static rtems_status_code bsp_dummy_spi_sel_addr
    630 (
    631 /*-------------------------------------------------------------------------*\
    632 | Purpose:                                                                  |
    633 |   address a slave device on the bus                                       |
    634 +---------------------------------------------------------------------------+
    635 | Input Parameters:                                                         |
    636 \*-------------------------------------------------------------------------*/
    637  rtems_libi2c_bus_t *bh,                 /* bus specifier structure        */
    638  uint32_t addr,                          /* address to send on bus         */
    639  int rw                                  /* 0=write,1=read                 */
    640 )
    641 /*-------------------------------------------------------------------------*\
    642 | Return Value:                                                             |
    643 |    rtems_status_code                                                      |
    644 \*=========================================================================*/
    645 {                           
    646   return  RTEMS_SUCCESSFUL;
    647 }
    648 
    649 /*=========================================================================*\
    650 | Function:                                                                 |
    651 \*-------------------------------------------------------------------------*/
    652 static rtems_status_code bsp_dummy_spi_send_start
     629static rtems_status_code bsp_spi_send_start
    653630(
    654631/*-------------------------------------------------------------------------*\
     
    671648| Function:                                                                 |
    672649\*-------------------------------------------------------------------------*/
    673 static rtems_status_code bsp_dummy_spi_send_stop
    674 (
    675 /*-------------------------------------------------------------------------*\
    676 | Purpose:                                                                  |
    677 |   deselect SPI                                                            |
    678 +---------------------------------------------------------------------------+
    679 | Input Parameters:                                                         |
    680 \*-------------------------------------------------------------------------*/
    681  rtems_libi2c_bus_t *bh                  /* bus specifier structure        */
    682 )
    683 /*-------------------------------------------------------------------------*\
    684 | Return Value:                                                             |
    685 |    o = ok or error code                                                   |
    686 \*=========================================================================*/
    687 {
    688   return RTEMS_SUCCESSFUL;
    689 }
    690 
    691 /*=========================================================================*\
    692 | Function:                                                                 |
    693 \*-------------------------------------------------------------------------*/
    694 static rtems_status_code bsp_pghplus_spi_sel_addr
     650static rtems_status_code bsp_spi_sel_addr
    695651(
    696652/*-------------------------------------------------------------------------*\
     
    741697| Function:                                                                 |
    742698\*-------------------------------------------------------------------------*/
    743 static rtems_status_code bsp_pghplus_spi_send_stop
     699static rtems_status_code bsp_spi_send_stop
    744700(
    745701/*-------------------------------------------------------------------------*\
     
    757713{
    758714#if defined(DEBUG)
    759   printk("bsp_pghplus_spi_send_stop called... ");
     715  printk("bsp_spi_send_stop called... ");
    760716#endif
    761717    m8xx.pbdat = (m8xx.pbdat
     
    771727| Function:                                                                 |
    772728\*-------------------------------------------------------------------------*/
    773 static rtems_status_code bsp_pghplus_spi_init
     729static rtems_status_code bsp_spi_init
    774730(
    775731/*-------------------------------------------------------------------------*\
     
    791747
    792748#if defined(DEBUG)
    793   printk("bsp_pghplus_spi_init called... ");
     749  printk("bsp_spi_init called... ");
    794750#endif
    795751
     
    844800
    845801/*=========================================================================*\
    846 | Function:                                                                 |
    847 \*-------------------------------------------------------------------------*/
    848 static rtems_status_code bsp_dummy_spi_init
    849 (
    850 /*-------------------------------------------------------------------------*\
    851 | Purpose:                                                                  |
    852 |   do board specific init:                                                 |
    853 |   - initialize pins for addressing                                        |
    854 |   - register further drivers                                              |
    855 +---------------------------------------------------------------------------+
    856 | Input Parameters:                                                         |
    857 \*-------------------------------------------------------------------------*/
    858  int spi_busno
    859 )
    860 /*-------------------------------------------------------------------------*\
    861 | Return Value:                                                             |
    862 |    o = ok or error code                                                   |
    863 \*=========================================================================*/
    864 {
    865 #if defined(DEBUG)
    866   printk("bsp_dummy_spi_init called... ");
    867 #endif
    868 
    869 #if defined(DEBUG)
    870   printk("... exit OK\r\n");
    871 #endif
    872   return RTEMS_SUCCESSFUL;
    873 }
    874 
    875 /*=========================================================================*\
    876802| list of handlers                                                          |
    877803\*=========================================================================*/
     
    879805rtems_libi2c_bus_ops_t bsp_spi_ops = {
    880806  init:             m8xx_spi_init,
    881   send_start:       bsp_dummy_spi_send_start,
    882   send_stop:        SPI_SEND_STOP_FNC,
    883   send_addr:        SPI_SEND_ADDR_FNC,
     807  send_start:       bsp_spi_send_start,
     808  send_stop:        bsp_spi_send_stop,
     809  send_addr:        bsp_spi_sel_addr,
    884810  read_bytes:       m8xx_spi_read_bytes,
    885811  write_bytes:      m8xx_spi_write_bytes,
     
    938864  spi_busno = ret_code;
    939865
    940   SPI_BOARD_INIT_FNC(spi_busno);
     866  bsp_spi_init(spi_busno);
    941867  /*
    942868   * FIXME: further drivers, when available
  • c/src/lib/libbsp/powerpc/tqm8xx/startup/bspstart.c

    re4e66d4 r3cd3a260  
    5151uint32_t   bsp_timer_least_valid;      /* Least valid number from timer      */
    5252bool       bsp_timer_internal_clock;   /* TRUE, when timer runs with CPU clk */
    53 /*
    54  *  Use the shared implementations of the following routines.
    55  *  Look in rtems/c/src/lib/libbsp/shared/bsplibc.c.
    56  */
    57 extern void cpu_init( void);
    5853
    5954void BSP_panic( char *s)
     
    7671
    7772  rtems_interrupt_disable( level);
     73  (void) level;
    7874
    7975  printk( "%s PANIC ERROR %u\n", _RTEMS_version, n);
     
    8480}
    8581
    86 const char *bsp_tqm_get_cib_string( const char *cib_id)
     82static const char *bsp_tqm_get_cib_string( const char *cib_id)
    8783{
    8884  char srch_pattern[10] = "";
     
    114110}
    115111
    116 rtems_status_code  bsp_tqm_get_cib_uint32( const char *cib_id,
     112static rtems_status_code  bsp_tqm_get_cib_uint32( const char *cib_id,
    117113                                           uint32_t   *result)
    118114{
  • c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c

    re4e66d4 r3cd3a260  
    4848extern volatile m8xx_t m8xx;
    4949extern int BSP_get_clock_irq_level(void);
    50 extern int BSP_connect_clock_handler(rtems_isr_entry);
    51 extern int BSP_disconnect_clock_handler(void);
    5250extern uint32_t bsp_clicks_per_usec;
    5351
Note: See TracChangeset for help on using the changeset viewer.