Changeset c193baad in rtems


Ignore:
Timestamp:
Apr 9, 2010, 8:24:57 PM (10 years ago)
Author:
Thomas Doerfler <Thomas.Doerfler@…>
Branches:
4.10, 4.11, master
Children:
3ed964f9
Parents:
a0bdb9b
Message:

unify irq data types and code, merge s3c2400/s3c2410 support

Location:
c/src/lib
Files:
9 deleted
63 edited
3 moved

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/ChangeLog

    ra0bdb9b rc193baad  
     12010-04-09      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * shared/irq/irq_init.c, shared/lpc/clock/lpc-clock-config.c,
     4        shared/lpc/network/lpc-ethernet.c, shared/start/start.S: make
     5        irq data types consistent
     6
    172010-04-09      Sebastian Huber <sebastian.huber@embedded-brains.de>
    28
  • c/src/lib/libbsp/arm/csb336/ChangeLog

    ra0bdb9b rc193baad  
     12010-04-09      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * startup/bspstart.c, network/network.c: make irq data types
     4        consistent
     5
    162010-04-07      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • c/src/lib/libbsp/arm/csb336/network/network.c

    ra0bdb9b rc193baad  
    5050rtems_irq_connect_data mc9328mxl_enet_isr_data = {
    5151    .name    = BSP_INT_GPIO_PORTA,
    52     .hdl     = (rtems_irq_hdl)enet_isr,
     52    .hdl     = enet_isr,
    5353    .handle  = (void *)BSP_INT_GPIO_PORTA,
    5454    .on      = enet_isr_on,
  • c/src/lib/libbsp/arm/csb336/startup/bspstart.c

    ra0bdb9b rc193baad  
    1717
    1818extern void rtems_irq_mngt_init(void);
     19extern void rtems_exception_init_mngt(void);
     20
    1921extern void mmu_set_cpu_async_mode(void);
    2022
  • c/src/lib/libbsp/arm/csb337/ChangeLog

    ra0bdb9b rc193baad  
     12010-04-09      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * startup/bspstart.c, network/network.c: make irq data types
     4        consistent
     5
    162009-12-08      Fernando Nicodemos <fgnicodemos@terra.com.br>
    27
  • c/src/lib/libbsp/arm/csb337/network/network.c

    ra0bdb9b rc193baad  
    8585  #define START_TRANSMIT_EVENT    RTEMS_EVENT_2
    8686
    87 rtems_isr at91rm9200_emac_isr(rtems_vector_number vector);
     87static void at91rm9200_emac_isr (rtems_irq_hdl_param unused);
    8888static void at91rm9200_emac_isr_on(const rtems_irq_connect_data *unused);
    8989static void at91rm9200_emac_isr_off(const rtems_irq_connect_data *unused);
     
    9393rtems_irq_connect_data at91rm9200_emac_isr_data = {
    9494    AT91RM9200_INT_EMAC,
    95     (rtems_irq_hdl)at91rm9200_emac_isr,
     95    at91rm9200_emac_isr,
     96    NULL,
    9697    at91rm9200_emac_isr_on,
    9798    at91rm9200_emac_isr_off,
    98     at91rm9200_emac_isr_is_on,
    99     3,    /* unused for ARM */
    100     0 };  /* unused for ARM */
     99    at91rm9200_emac_isr_is_on
     100};
    101101
    102102
     
    848848
    849849/* interrupt handler */
    850 rtems_isr at91rm9200_emac_isr (rtems_vector_number v)
     850static void at91rm9200_emac_isr (rtems_irq_hdl_param unused)
    851851{
    852852    unsigned long status32;
  • c/src/lib/libbsp/arm/csb337/startup/bspstart.c

    ra0bdb9b rc193baad  
    2626/* Function prototypes */
    2727extern void rtems_irq_mngt_init(void);
     28extern void rtems_exception_init_mngt(void);
    2829void bsp_libc_init( void *, uint32_t, int );
    2930static void fix_mac_addr(void);
  • c/src/lib/libbsp/arm/edb7312/ChangeLog

    ra0bdb9b rc193baad  
     12010-04-09      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * clock/clockdrv.c, irq/bsp_irq_init.c, irq/irq.h
     4        startup/bspstart.c, network/network.c: make irq data types
     5        consistent
     6
    172010-04-07      Joel Sherrill <joel.sherrill@oarcorp.com>
    28
  • c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c

    ra0bdb9b rc193baad  
    2828rtems_irq_connect_data clock_isr_data = {BSP_TC1OI,
    2929                                         (rtems_irq_hdl)Clock_isr,
     30                                         NULL,
    3031                                         clock_isr_on,
    3132                                         clock_isr_off,
    32                                          clock_isr_is_on,
    33                                          3,
    34                                          0 };
     33                                         clock_isr_is_on};
    3534
    3635#define CLOCK_VECTOR 0
  • c/src/lib/libbsp/arm/edb7312/irq/bsp_irq_init.c

    ra0bdb9b rc193baad  
    1717#include <bsp.h>
    1818#include <ep7312.h>
    19 
    20 extern void default_int_handler(void);
    2119
    2220void BSP_rtems_irq_mngt_init(void)
  • c/src/lib/libbsp/arm/edb7312/irq/irq.h

    ra0bdb9b rc193baad  
    3131 */
    3232
     33#include <rtems/irq.h>
    3334#include <rtems.h>
    3435
    35 extern void default_int_handler();
     36extern void default_int_handler(rtems_irq_hdl_param unused);
    3637/*-------------------------------------------------------------------------+
    3738| Constants
     
    6768#define BSP_MAX_INT   22
    6869
    69 /*
    70  * Type definition for RTEMS managed interrupts
    71  */
    72 typedef unsigned char  rtems_irq_level;
    73 typedef unsigned char  rtems_irq_trigger;
    74 
    75 struct  __rtems_irq_connect_data__;     /* forward declaratiuon */
    76 
    77 typedef void (*rtems_irq_hdl)           (void);
    78 typedef void (*rtems_irq_enable) (const struct __rtems_irq_connect_data__*);
    79 typedef void (*rtems_irq_disable) (const struct __rtems_irq_connect_data__*);
    80 typedef int  (*rtems_irq_is_enabled)(const struct __rtems_irq_connect_data__*);
    81 
    82 typedef struct __rtems_irq_connect_data__ {
    83   /*
    84    * IRQ line
    85    */
    86   rtems_irq_number              name;
    87   /*
    88    * handler. See comment on handler properties below in function prototype.
    89    */
    90   rtems_irq_hdl                 hdl;
    91   /*
    92    * function for enabling interrupts at device level (ONLY!).
    93    * The BSP code will automatically enable it at i8259s level.
    94    * RATIONALE : anyway such code has to exist in current driver code.
    95    * It is usually called immediately AFTER connecting the interrupt handler.
    96    * RTEMS may well need such a function when restoring normal interrupt
    97    * processing after a debug session.
    98    *
    99    */
    100     rtems_irq_enable            on;
    101   /*
    102    * function for disabling interrupts at device level (ONLY!).
    103    * The code will disable it at i8259s level. RATIONALE : anyway
    104    * such code has to exist for clean shutdown. It is usually called
    105    * BEFORE disconnecting the interrupt. RTEMS may well need such
    106    * a function when disabling normal interrupt processing for
    107    * a debug session. May well be a NOP function.
    108    */
    109   rtems_irq_disable             off;
    110   /*
    111    * function enabling to know what interrupt may currently occur
    112    * if someone manipulates the i8259s interrupt mask without care...
    113    */
    114     rtems_irq_is_enabled        isOn;
    115   /*
    116    * priority level at the vplus level
    117    */
    118   rtems_irq_level               irqLevel;
    119   /*
    120    * Trigger way : Rising or falling edge or High or low level
    121    */
    122   rtems_irq_trigger             irqTrigger;
    123 } rtems_irq_connect_data;
    124 
    12570/*-------------------------------------------------------------------------+
    12671| Function Prototypes.
     
    13580void BSP_rtems_irq_mngt_init();
    13681
    137 /*
    138  * function to connect a particular irq handler. This hanlder will NOT be called
    139  * directly as the result of the corresponding interrupt. Instead, a RTEMS
    140  * irq prologue will be called that will :
    141  *
    142  *      1) save the C scratch registers,
    143  *      2) switch to a interrupt stack if the interrupt is not nested,
    144  *      3) store the current i8259s' interrupt masks
    145  *      4) modify them to disable the current interrupt at 8259 level (and may
    146  *      be others depending on software priorities)
    147  *      5) aknowledge the i8259s',
    148  *      6) demask the processor,
    149  *      7) call the application handler
    150  *
    151  * As a result the hdl function provided
    152  *
    153  *      a) can perfectly be written is C,
    154  *      b) may also well directly call the part of the RTEMS API that can be used
    155  *      from interrupt level,
    156  *      c) It only responsible for handling the jobs that need to be done at
    157  *      the device level including (aknowledging/re-enabling the interrupt at device,
    158  *      level, getting the data,...)
    159  *
    160  *      When returning from the function, the following will be performed by
    161  *      the RTEMS irq epilogue :
    162  *
    163  *      1) masks the interrupts again,
    164  *      2) restore the original i8259s' interrupt masks
    165  *      3) switch back on the orinal stack if needed,
    166  *      4) perform rescheduling when necessary,
    167  *      5) restore the C scratch registers...
    168  *      6) restore initial execution flow
    169  *
    170  */
    171 
    172 int BSP_install_rtems_irq_handler       (const rtems_irq_connect_data*);
    173 /*
    174  * function to get the current RTEMS irq handler for ptr->name. It enables to
    175  * define hanlder chain...
    176  */
    177 int BSP_get_current_rtems_irq_handler   (rtems_irq_connect_data* ptr);
    178 /*
    179  * function to get disconnect the RTEMS irq handler for ptr->name.
    180  * This function checks that the value given is the current one for safety reason.
    181  * The user can use the previous function to get it.
    182  */
    183 int BSP_remove_rtems_irq_handler        (const rtems_irq_connect_data*);
    18482
    18583#endif /* __asm__ */
  • c/src/lib/libbsp/arm/edb7312/network/network.c

    ra0bdb9b rc193baad  
    88unsigned int bsp_cs8900_memory_base = 0;
    99cs8900_device *g_cs;
    10 rtems_isr cs8900_isr(rtems_vector_number v);
     10void cs8900_isr(rtems_irq_hdl_param unused);
    1111rtems_irq_connect_data cs8900_isr_data = {BSP_EINT3,
    12                                          (rtems_irq_hdl)cs8900_isr,
    13                                          NULL,
    14                                          NULL,
    15                                          NULL,
    16                                          0,
    17                                          0 };
     12                                          cs8900_isr,
     13                                          NULL,
     14                                          NULL,
     15                                          NULL,
     16                                          NULL};
    1817
    1918char g_enetbuf[1520];
    2019
    21 rtems_isr cs8900_isr(rtems_vector_number v)
     20void cs8900_isr(rtems_irq_hdl_param unused)
    2221{
    23     cs8900_interrupt(v, g_cs);
     22    cs8900_interrupt(BSP_EINT3, g_cs);
    2423}
    2524
  • c/src/lib/libbsp/arm/edb7312/startup/bspstart.c

    ra0bdb9b rc193baad  
    1919 */
    2020extern void rtems_irq_mngt_init(void);
     21extern void rtems_exception_init_mngt(void);
    2122
    2223/*
  • c/src/lib/libbsp/arm/gba/ChangeLog

    ra0bdb9b rc193baad  
     12010-04-09      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * clock/clockdrv.c, console/console.c, irq/irq.c, irq/irq.h,
     4        irq/irq_init.c: make irq data types consistent
     5
    162010-04-07      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • c/src/lib/libbsp/arm/gba/clock/clockdrv.c

    ra0bdb9b rc193baad  
    3232rtems_irq_connect_data clock_isr_data = {BSP_IRQ_TIMER3,
    3333                                        (rtems_irq_hdl)Clock_isr,
     34                                         NULL,
    3435                                         clock_isr_on,
    3536                                         clock_isr_off,
    36                                          clock_isr_is_on,
    37                                          0,
    38                                          0 };
     37                                         clock_isr_is_on};
    3938
    4039#define CLOCK_VECTOR  0
     
    4544  do {                                                  \
    4645        BSP_install_rtems_irq_handler(&clock_isr_data); \
     46        _old = NULL;                                    \
    4747     } while(0)
    4848
  • c/src/lib/libbsp/arm/gba/console/console.c

    ra0bdb9b rc193baad  
    5050 *
    5151 */
    52 static int gba_write(int minor, const char *buf, int len)
     52static ssize_t gba_write(int minor, const char *buf, size_t len)
    5353{
    5454  int i;
  • c/src/lib/libbsp/arm/gba/irq/irq.h

    ra0bdb9b rc193baad  
    3232
    3333#include <stdint.h>
     34#include <rtems/irq.h>
    3435#include <rtems.h>
    3536
    36 extern void default_int_handler();
     37extern void default_int_handler(rtems_irq_hdl_param unused);
    3738
    3839/*---------------------------------------------------------------------------*
     
    6869} rtems_irq_symbolic_name;
    6970
    70 /*
    71  * Type definition for RTEMS managed interrupts
    72  */
    73 typedef unsigned char  rtems_irq_level;
    74 typedef unsigned char  rtems_irq_trigger;
    7571
    7672extern void        _irq_max_vector;               /**< defined in lincmds    */
    7773extern uint32_t    irq_vector_table[BSP_MAX_INT]; /**< allocated in linkcmds */
    78 
    79 
    80 struct  __rtems_irq_connect_data__;     /* forward declaratiuon */
    81 
    82 typedef void (*rtems_irq_hdl)           (void);
    83 typedef void (*rtems_irq_enable)        (const struct __rtems_irq_connect_data__*);
    84 typedef void (*rtems_irq_disable)       (const struct __rtems_irq_connect_data__*);
    85 typedef int  (*rtems_irq_is_enabled)    (const struct __rtems_irq_connect_data__*);
    86 
    87 /** irq connection data structure */
    88 typedef struct __rtems_irq_connect_data__ {
    89   /**
    90    * IRQ line
    91    */
    92   rtems_irq_symbolic_name       name;
    93   /**
    94    * handler. See comment on handler properties below in function prototype.
    95    */
    96   rtems_irq_hdl                 hdl;
    97   /**
    98    * function for enabling interrupts at device level (ONLY!).
    99    * The BSP code will automatically enable it at PIC level.
    100    * RATIONALE : anyway such code has to exist in current driver code.
    101    * It is usually called immediately AFTER connecting the interrupt handler.
    102    * RTEMS may well need such a function when restoring normal interrupt
    103    * processing after a debug session.
    104    *
    105    */
    106     rtems_irq_enable            on;
    107   /**
    108    * function for disabling interrupts at device level (ONLY!).
    109    * The code will disable it at PIC level. RATIONALE : anyway
    110    * such code has to exist for clean shutdown. It is usually called
    111    * BEFORE disconnecting the interrupt. RTEMS may well need such
    112    * a function when disabling normal interrupt processing for
    113    * a debug session. May well be a NOP function.
    114    */
    115   rtems_irq_disable             off;
    116   /**
    117    * function enabling to know what interrupt may currently occur
    118    * if someone manipulates the PIC interrupt mask without care...
    119    */
    120     rtems_irq_is_enabled        isOn;
    121   /**
    122    * irq priority level
    123    */
    124   rtems_irq_level               irqLevel;
    125   /**
    126    * Trigger way : Rising or falling edge or High or low level
    127    */
    128   rtems_irq_trigger             irqTrigger;
    129 } rtems_irq_connect_data;
    13074
    13175/*-------------------------------------------------------------------------+
     
    14185void BSP_rtems_irq_mngt_init();
    14286
    143 
    144 /**
    145  * @brief function to connect a particular irq handler.
    146  * This hanlder will NOT be called directly as the result of the corresponding interrupt.
    147  * Instead, a RTEMS irq prologue will be called that will :
    148  *      1) save the C scratch registers,
    149  *      2) switch to a interrupt stack if the interrupt is not nested,
    150  *      3) store the current i8259s' interrupt masks
    151  *      4) modify them to disable the current interrupt at 8259 level (and may
    152  *      be others depending on software priorities)
    153  *      5) aknowledge the i8259s',
    154  *      6) demask the processor,
    155  *      7) call the application handler
    156  *
    157  * As a result the hdl function provided
    158  *      a) can perfectly be written is C,
    159  *      b) may also well directly call the part of the RTEMS API that can be used
    160  *      from interrupt level,
    161  *      c) It only responsible for handling the jobs that need to be done at
    162  *      the device level including (aknowledging/re-enabling the interrupt at device,
    163  *      level, getting the data,...)
    164  *
    165  *      When returning from the function, the following will be performed by
    166  *      the RTEMS irq epilogue :
    167  *
    168  *      1) masks the interrupts again,
    169  *      2) restore the original i8259s' interrupt masks
    170  *      3) switch back on the orinal stack if needed,
    171  *      4) perform rescheduling when necessary,
    172  *      5) restore the C scratch registers...
    173  *      6) restore initial execution flow
    174  *
    175  */
    176 int BSP_install_rtems_irq_handler       (const rtems_irq_connect_data*);
    177 
    178 /**
    179  * function to get the current RTEMS irq handler for ptr->name. It enables to
    180  * define hanlder chain...
    181  */
    182 int BSP_get_current_rtems_irq_handler   (rtems_irq_connect_data* ptr);
    183 
    184 /**
    185  * @brief function to get disconnect the RTEMS irq handler for ptr->name.
    186  * This function checks that the value given is the current one for safety reason.
    187  * The user can use the previous function to get it.
    188  */
    189 int BSP_remove_rtems_irq_handler        (const rtems_irq_connect_data*);
    190 
    191 
    19287#ifdef __cplusplus
    19388}
  • c/src/lib/libbsp/arm/gba/irq/irq_init.c

    ra0bdb9b rc193baad  
    3636 *  @return None
    3737 */
    38 void default_int_handler(void)
     38void default_int_handler(rtems_irq_hdl_param unused)
    3939{
    4040    printk("raw_idt_notify has been called \n");
  • c/src/lib/libbsp/arm/gp32/ChangeLog

    ra0bdb9b rc193baad  
     12010-04-09      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * Makefile.am, startup/bspstart.c: make irq data types consistent,
     4        use common code for s3c24xx
     5
    162010-04-07      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • c/src/lib/libbsp/arm/gp32/Makefile.am

    ra0bdb9b rc193baad  
    4545
    4646libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/shared/arm920.rel \
    47     ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/clock.rel \
    48     ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/timer.rel \
    49     ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/irq.rel
     47    ../../../libcpu/@RTEMS_CPU@/s3c24xx/clock.rel \
     48    ../../../libcpu/@RTEMS_CPU@/s3c24xx/timer.rel \
     49    ../../../libcpu/@RTEMS_CPU@/s3c24xx/irq.rel
    5050
    5151include $(srcdir)/preinstall.am
  • c/src/lib/libbsp/arm/gp32/startup/bspstart.c

    ra0bdb9b rc193baad  
    2323 */
    2424extern void rtems_irq_mngt_init(void);
     25extern void rtems_exception_init_mngt(void);
    2526
    2627/*
  • c/src/lib/libbsp/arm/gumstix/ChangeLog

    ra0bdb9b rc193baad  
     12010-04-09      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * rtl8019/rtl8019.c: make irq data types consistent
     4
    152010-04-07      Joel Sherrill <joel.sherrill@oarcorp.com>
    26
  • c/src/lib/libbsp/arm/gumstix/rtl8019/rtl8019.c

    ra0bdb9b rc193baad  
    353353
    354354static void
    355 ne_interrupt_handler (uint32_t cdata)
    356 {
    357   rtems_vector_number v = (rtems_vector_number) cdata;
    358   struct ne_softc *sc;
    359 
    360   sc = ne_device_for_irno (v);
     355ne_interrupt_handler (rtems_irq_hdl_param handle)
     356{
     357  struct ne_softc *sc = handle;
     358
    361359  if (sc == NULL)
    362360    return;
     
    503501*/
    504502static void
    505 ne_init_irq_handler(int irno)
     503ne_init_irq_handler(ne_softc *sc)
    506504{
    507505  rtems_irq_connect_data irq;
     
    510508  printk("ne_init_irq_handler(%d)\n", irno);
    511509#endif
    512   irq.name = irno;
     510  irq.name = sc->irno;
    513511  irq.hdl = ne_interrupt_handler;
     512  irq.handle = sc;
    514513  irq.on = ne_interrupt_on;
    515514  irq.off = ne_interrupt_off;
     
    977976
    978977    /* install rtems irq handler */
    979     ne_init_irq_handler(sc->irno);
     978    ne_init_irq_handler(sc);
    980979  }
    981980
  • c/src/lib/libbsp/arm/nds/ChangeLog

    ra0bdb9b rc193baad  
     12010-04-09      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * Makefile.am, clock/clock.c, fb/fb.c, irq/irq.c, sound/sound.c,
     4        startup/bspstart.c, touchscreen/touchscreen.c, wifi/wifi.c: make
     5        irq data types consistent
     6
    172010-04-07      Joel Sherrill <joel.sherrill@oarcorp.com>
    28
  • c/src/lib/libbsp/arm/nds/Makefile.am

    ra0bdb9b rc193baad  
    8888block_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include -DNDS -I$(srcdir)/libfat/source/disc_io
    8989block_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
    90 
    91 include_HEADERS += irq/irq.h
    9290
    9391noinst_PROGRAMS += irq.rel
  • c/src/lib/libbsp/arm/nds/clock/clock.c

    ra0bdb9b rc193baad  
    1414#include <rtems.h>
    1515#include <bsp.h>
    16 #include "../irq/irq.h"
     16#include <rtems/irq.h>
    1717#include <nds.h>
    1818
     
    3535  NULL,
    3636  NULL,
    37   0,
    38   0
     37  NULL
    3938};
    4039
     
    5352 */
    5453
    55 void
    56 Clock_driver_support_install_isr (rtems_isr_entry new, rtems_isr_entry old)
    57 {
    58   BSP_install_rtems_irq_handler (&clock_isr_data);
    59 }
    60 
     54#define Clock_driver_support_install_isr( _new, _old ) \
     55  do {                                                 \
     56    _old = NULL;                                       \
     57    BSP_install_rtems_irq_handler(&clock_isr_data);    \
     58  } while (0)
    6159/*
    6260 * disable clock.
  • c/src/lib/libbsp/arm/nds/fb/fb.c

    ra0bdb9b rc193baad  
    1818
    1919#include <bsp.h>
    20 #include "../irq/irq.h"
     20#include <rtems/irq.h>
    2121#include <rtems/libio.h>
    2222#include <nds.h>
  • c/src/lib/libbsp/arm/nds/irq/irq.c

    ra0bdb9b rc193baad  
    1313
    1414#include <bsp.h>
    15 #include "irq.h"
     15#include <rtems/irq.h>
    1616#include <nds.h>
    1717
     
    5656  rtems_interrupt_disable (level);
    5757
    58   irqSet (irq->name, irq->hdl);
     58  /*
     59   * FIXME: irq_hdl will probably not be called with its parameter
     60   */
     61  irqSet (irq->name, (VoidFunctionPointer)irq->hdl);
    5962
    6063  if (irq->on != NULL)
  • c/src/lib/libbsp/arm/nds/preinstall.am

    ra0bdb9b rc193baad  
    7979PREINSTALL_FILES += $(PROJECT_INCLUDE)/nds/sound.h
    8080
    81 $(PROJECT_INCLUDE)/irq.h: irq/irq.h $(PROJECT_INCLUDE)/$(dirstamp)
    82         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/irq.h
    83 PREINSTALL_FILES += $(PROJECT_INCLUDE)/irq.h
    84 
    8581$(PROJECT_INCLUDE)/libnds/$(dirstamp):
    8682        @$(MKDIR_P) $(PROJECT_INCLUDE)/libnds
  • c/src/lib/libbsp/arm/nds/sound/sound.c

    ra0bdb9b rc193baad  
    1818
    1919#include <bsp.h>
    20 #include "../irq/irq.h"
     20#include <rtems/irq.h>
    2121#include <rtems/libio.h>
    2222#include <nds.h>
  • c/src/lib/libbsp/arm/nds/startup/bspstart.c

    ra0bdb9b rc193baad  
    1616#include <nds.h>
    1717
     18extern void BSP_rtems_irq_mngt_init (void);
    1819/*
    1920 * start the platform.
  • c/src/lib/libbsp/arm/nds/touchscreen/touchscreen.c

    ra0bdb9b rc193baad  
    1818
    1919#include <bsp.h>
    20 #include "../irq/irq.h"
     20#include <rtems/irq.h>
    2121#include <rtems/libio.h>
    2222#include <nds.h>
  • c/src/lib/libbsp/arm/nds/wifi/wifi.c

    ra0bdb9b rc193baad  
    3232#include <netinet/if_ether.h>
    3333
    34 #include <irq.h>
     34#include <rtems/irq.h>
    3535
    3636#include <nds.h>
  • c/src/lib/libbsp/arm/rtl22xx/ChangeLog

    ra0bdb9b rc193baad  
     12010-04-09      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * network/network.c, startup/bspstart.c: make
     4        irq data types consistent
     5
    162010-04-07      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • c/src/lib/libbsp/arm/rtl22xx/network/network.c

    ra0bdb9b rc193baad  
    99unsigned int bsp_cs8900_memory_base = 0;
    1010cs8900_device *g_cs;
    11 rtems_isr cs8900_isr(rtems_vector_number v);
     11void cs8900_isr(rtems_irq_hdl_param unused);
    1212rtems_irq_connect_data cs8900_isr_data = {LPC22xx_INTERRUPT_EINT2,
    1313                                         (rtems_irq_hdl)cs8900_isr,
    14                                          NULL,
    15                                          NULL,
    16                                          NULL,
    17                                          0,
    18                                          0 };
     14                                          NULL,
     15                                          NULL,
     16                                          NULL,
     17                                          NULL};
    1918
    2019char g_enetbuf[1520];
    2120
    22 rtems_isr cs8900_isr(rtems_vector_number v)
     21void cs8900_isr(rtems_irq_hdl_param unused)
    2322{
    24     cs8900_interrupt(v, g_cs);
     23    cs8900_interrupt(LPC22xx_INTERRUPT_EINT2, g_cs);
    2524}
    2625
  • c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c

    ra0bdb9b rc193baad  
    1818 */
    1919extern void rtems_irq_mngt_init(void);
     20extern void rtems_exception_init_mngt(void);
    2021extern void  UART0_Ini(void);
    2122extern void printi(unsigned long);
  • c/src/lib/libbsp/arm/shared/irq/irq_init.c

    ra0bdb9b rc193baad  
    1818#include <rtems/bspIo.h>
    1919
    20 void default_int_handler(void)
     20void default_int_handler(rtems_irq_hdl_param unused)
    2121{
    2222  printk("raw_idt_notify has been called \n");
  • c/src/lib/libbsp/arm/shared/lpc/clock/lpc-clock-config.c

    ra0bdb9b rc193baad  
    113113#define Clock_driver_support_initialize_hardware() lpc_clock_initialize()
    114114#define Clock_driver_support_install_isr(isr, old_isr) \
    115   lpc_clock_handler_install()
     115  do {                                                 \
     116    lpc_clock_handler_install();                       \
     117    old_isr = NULL;                                    \
     118  } while (0)
     119
    116120#define Clock_driver_support_shutdown_hardware() lpc_clock_cleanup()
    117121#define Clock_driver_nanoseconds_since_last_tick \
  • c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c

    ra0bdb9b rc193baad  
    468468
    469469    /* Cache flush of descriptor  */
    470     rtems_cache_flush_multiple_data_lines(&desc [i], sizeof(desc [0]));
     470    rtems_cache_flush_multiple_data_lines((void *)&desc [i],
     471                                          sizeof(desc [0]));
    471472
    472473    /* Add mbuf to table */
     
    581582
    582583        /* Fragment status */
    583         rtems_cache_invalidate_multiple_data_lines(
    584           &status [receive_index],
    585           sizeof(status [0])
    586         );
     584        rtems_cache_invalidate_multiple_data_lines
     585          ((void *)&status [receive_index],
     586           sizeof(status [0])
     587           );
    587588        stat = status [receive_index].info;
    588589
     
    909910          desc [produce_index].start = mtod(m, uint32_t);
    910911          desc [produce_index].control = ctrl;
    911           rtems_cache_flush_multiple_data_lines(
    912             &desc [produce_index],
    913             sizeof(desc [0])
    914           );
     912          rtems_cache_flush_multiple_data_lines
     913            ((void *)&desc [produce_index],
     914             sizeof(desc [0])
     915             );
    915916          mbufs [produce_index] = m;
    916917
     
    967968          if ((ctrl & ETH_TX_CTRL_LAST) != 0) {
    968969            /* Finalize descriptor */
    969             desc [produce_index].control = ctrl & ~ETH_TX_CTRL_SIZE_MASK
     970            desc [produce_index].control = (ctrl & ~ETH_TX_CTRL_SIZE_MASK)
    970971              | (new_frame_length - 1);
    971972
     
    983984
    984985            /* Cache flush of descriptor  */
    985             rtems_cache_flush_multiple_data_lines(
    986               &desc [produce_index],
    987               sizeof(desc [0])
    988             );
     986            rtems_cache_flush_multiple_data_lines
     987              ((void *)&desc [produce_index],
     988               sizeof(desc [0])
     989               );
    989990
    990991            /* Next produce index */
  • c/src/lib/libbsp/arm/shared/start/start.S

    ra0bdb9b rc193baad  
    1818
    1919#include <rtems/asm.h>
     20#include <rtems/system.h>       
    2021#include <rtems/score/cpu.h>
    21 
     22       
    2223#include <bspopts.h>
    2324#include <bsp/linker-symbols.h>
  • c/src/lib/libbsp/arm/smdk2410/ChangeLog

    ra0bdb9b rc193baad  
     12010-04-09      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * Makefile.am: use common code for s3c24xx
     4
    152009-10-21      Ralf Corsépius <ralf.corsepius@rtems.org>
    26
  • c/src/lib/libbsp/arm/smdk2410/Makefile.am

    ra0bdb9b rc193baad  
    4545
    4646libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/shared/arm920.rel \
    47     ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/clock.rel \
    48     ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/timer.rel \
    49     ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/irq.rel
     47    ../../../libcpu/@RTEMS_CPU@/s3c24xx/clock.rel \
     48    ../../../libcpu/@RTEMS_CPU@/s3c24xx/timer.rel \
     49    ../../../libcpu/@RTEMS_CPU@/s3c24xx/irq.rel
    5050
    5151include $(srcdir)/preinstall.am
  • c/src/lib/libbsp/shared/ChangeLog

    ra0bdb9b rc193baad  
     12010-04-09      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * umon/umonrtemsglue.c: change type to avoid warning
     4
    152010-03-25      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
    26
  • c/src/lib/libbsp/shared/umon/umonrtemsglue.c

    ra0bdb9b rc193baad  
    2121void rtems_umon_connect(void)
    2222{
    23   void *moncomptr;
     23  int(*moncomptr)(int,void *,void *,void *);
    2424
    2525  if ( rtems_umon_connected )
     
    3030  moncomptr = rtems_bsp_get_umon_monptr();
    3131  monConnect(
    32     (int(*)())(*(unsigned long *)moncomptr),      /* monitor base */
     32    moncomptr,                                    /* monitor base */
    3333    (void *)0,                                    /* lock */
    3434    (void *)0                                     /* unlock */
  • c/src/lib/libcpu/arm/ChangeLog

    ra0bdb9b rc193baad  
     12010-04-09      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * configure.ac, Makefile.am, at91rm9200/clock/clock.c,
     4        at91rm9200/irq/bsp_irq_init.c,
     5        at91rm9200/irq/irq.h, at91rm9200/usart/usart.c,
     6        lpc22xx/clock/clockdrv.c, lpc22xx/irq/bsp_irq_init.c,
     7        lpc22xx/irq/irq.h, mc9328mxl/irq/bsp_irq_init.c,
     8        mc9328mxl/irq/irq.h libcpu/arm/pxa255/clock/clock.c,
     9        pxa255/irq/bsp_irq_init.c, pxa255/irq/irq.h,
     10        s3c24xx/clock/clockdrv.c, s3c24xx/irq/bsp_irq_init.c,
     11        s3c24xx/irq/irq.h: changes to consolidate s3c24xx support and to
     12        make irq system warning-free
     13        * s3c2400/clock/clockdrv.c, s3c2400/clock/support.c,
     14        s3c2400/include/s3c2400.h, s3c2400/irq/bsp_irq_asm.S,
     15        s3c2400/irq/bsp_irq_init.c, s3c2400/irq/irq.c
     16        libcpu/arm/s3c2400/irq/irq.h, s3c2400/timer/timer.c,
     17        s3c2410/include/s3c2410.h, s3c2410/irq/bsp_irq_asm.S,
     18        s3c2410/irq/irq.h: removed after merge into s3c24xx
     19
     20        * s3c24xx/include/s3c2400.h, s3c24xx/include/s3c2410.h,
     21        s3c24xx/rq/bsp_irq_asm.S: moved from s3c2400 or s3c2410 tree
     22
    1232010-04-08      Sebastian Huber <sebastian.huber@embedded-brains.de>
    224
  • c/src/lib/libcpu/arm/Makefile.am

    ra0bdb9b rc193baad  
    135135endif
    136136
    137 if s3c2400
    138 include_HEADERS = s3c24xx/include/s3c24xx.h s3c2400/include/s3c2400.h
     137if s3c24xx
     138include_HEADERS = s3c24xx/include/s3c24xx.h s3c24xx/include/s3c2400.h s3c24xx/include/s3c2410.h
    139139
    140 ## s3c2400/clock
    141 noinst_PROGRAMS += s3c2400/clock.rel
    142 s3c2400_clock_rel_SOURCES = s3c2400/clock/clockdrv.c s3c2400/clock/support.c
    143 s3c2400_clock_rel_CPPFLAGS = $(AM_CPPFLAGS)
    144 s3c2400_clock_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
     140## s3c24xx/clock
     141noinst_PROGRAMS += s3c24xx/clock.rel
     142s3c24xx_clock_rel_SOURCES = s3c24xx/clock/clockdrv.c s3c24xx/clock/support.c
     143s3c24xx_clock_rel_CPPFLAGS = $(AM_CPPFLAGS)
     144s3c24xx_clock_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
    145145
    146 ## s3c2400/timer
    147 noinst_PROGRAMS += s3c2400/timer.rel
    148 s3c2400_timer_rel_SOURCES = s3c2400/timer/timer.c
    149 s3c2400_timer_rel_CPPFLAGS = $(AM_CPPFLAGS)
    150 s3c2400_timer_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
     146## s3c24xx/timer
     147noinst_PROGRAMS += s3c24xx/timer.rel
     148s3c24xx_timer_rel_SOURCES = s3c24xx/timer/timer.c
     149s3c24xx_timer_rel_CPPFLAGS = $(AM_CPPFLAGS)
     150s3c24xx_timer_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
    151151
    152 ## s3c2400/interrupt
    153 include_HEADERS += s3c2400/irq/irq.h
     152## s3c24xx/interrupt
     153include_HEADERS += s3c24xx/irq/irq.h
    154154
    155 noinst_PROGRAMS += s3c2400/irq.rel
    156 s3c2400_irq_rel_SOURCES = s3c24xx/irq/irq.c s3c24xx/irq/bsp_irq_init.c \
    157     ../../libbsp/arm/shared/irq/irq_init.c s3c2400/irq/bsp_irq_asm.S \
    158     s3c2400/irq/irq.h
    159 s3c2400_irq_rel_CPPFLAGS = $(AM_CPPFLAGS)
    160 s3c2400_irq_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
    161 endif
    162 
    163 if s3c2410
    164 include_HEADERS = s3c24xx/include/s3c24xx.h s3c2410/include/s3c2410.h
    165 
    166 ## s3c2410/clock
    167 noinst_PROGRAMS += s3c2410/clock.rel
    168 s3c2410_clock_rel_SOURCES = s3c24xx/clock/clockdrv.c s3c24xx/clock/support.c
    169 s3c2410_clock_rel_CPPFLAGS = $(AM_CPPFLAGS)
    170 s3c2410_clock_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
    171 
    172 ## s3c2410/timer
    173 noinst_PROGRAMS += s3c2410/timer.rel
    174 s3c2410_timer_rel_SOURCES = s3c24xx/timer/timer.c
    175 s3c2410_timer_rel_CPPFLAGS = $(AM_CPPFLAGS)
    176 s3c2410_timer_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
    177 
    178 ## s3c2410/interrupt
    179 include_HEADERS += s3c2410/irq/irq.h
    180 
    181 noinst_PROGRAMS += s3c2410/irq.rel
    182 s3c2410_irq_rel_SOURCES = s3c24xx/irq/irq.c s3c24xx/irq/bsp_irq_init.c \
    183     ../../libbsp/arm/shared/irq/irq_init.c s3c2410/irq/bsp_irq_asm.S \
    184     s3c2410/irq/irq.h
    185 s3c2410_irq_rel_CPPFLAGS = $(AM_CPPFLAGS)
    186 s3c2410_irq_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
     155noinst_PROGRAMS += s3c24xx/irq.rel
     156s3c24xx_irq_rel_SOURCES = s3c24xx/irq/irq.c s3c24xx/irq/bsp_irq_init.c \
     157    ../../libbsp/arm/shared/irq/irq_init.c s3c24xx/irq/bsp_irq_asm.S \
     158    s3c24xx/irq/irq.h
     159s3c24xx_irq_rel_CPPFLAGS = $(AM_CPPFLAGS)
     160s3c24xx_irq_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
    187161endif
    188162
  • c/src/lib/libcpu/arm/at91rm9200/clock/clock.c

    ra0bdb9b rc193baad  
    6767rtems_irq_connect_data clock_isr_data = {AT91RM9200_INT_SYSIRQ,
    6868                                         (rtems_irq_hdl)Clock_isr,
     69                                         NULL,
    6970                                         clock_isr_on,
    7071                                         clock_isr_off,
    71                                          clock_isr_is_on,
    72                                          3,     /* unused for ARM cpus */
    73                                          0 };   /* unused for ARM cpus */
     72                                         clock_isr_is_on};
    7473
    7574
    7675#define Clock_driver_support_install_isr( _new, _old ) \
    77   BSP_install_rtems_irq_handler(&clock_isr_data)
     76  do {                                                 \
     77      (_old) = NULL;                                   \
     78      BSP_install_rtems_irq_handler(&clock_isr_data);  \
     79  } while(0)
    7880
    7981uint16_t st_pimr_value;
  • c/src/lib/libcpu/arm/at91rm9200/irq/bsp_irq_init.c

    ra0bdb9b rc193baad  
    1515#include <bsp.h>
    1616#include <at91rm9200.h>
    17 
    18 extern void default_int_handler(void);
    1917
    2018/*
  • c/src/lib/libcpu/arm/at91rm9200/irq/irq.h

    ra0bdb9b rc193baad  
    2626 */
    2727
     28#include <rtems/irq.h>
    2829#include <rtems.h>
    2930#include <at91rm9200.h>
    3031
    31 extern void default_int_handler();
     32extern void default_int_handler(rtems_irq_hdl_param unused);
    3233/***********************************************************************
    3334 * Constants
     
    7374#define VECTOR_TABLE AIC_SVR_BASE
    7475
    75 typedef unsigned char  rtems_irq_level;
    76 typedef unsigned char  rtems_irq_trigger;
    77 
    78 struct  __rtems_irq_connect_data__;     /* forward declaratiuon */
    79 typedef unsigned int rtems_irq_number;
    80 typedef void (*rtems_irq_hdl)       (uint32_t vector);
    81 typedef void (*rtems_irq_enable)    (const struct __rtems_irq_connect_data__*);
    82 typedef void (*rtems_irq_disable)   (const struct __rtems_irq_connect_data__*);
    83 typedef int  (*rtems_irq_is_enabled)(const struct __rtems_irq_connect_data__*);
    84 
    85 typedef struct __rtems_irq_connect_data__ {
    86     /* IRQ line */
    87     rtems_irq_number             name;
    88 
    89     /* Handler */
    90     rtems_irq_hdl                 hdl;
    91 
    92     /* function for enabling interrupts at device level. */
    93     rtems_irq_enable              on;
    94 
    95     /* function for disabling interrupts at device level. */
    96     rtems_irq_disable             off;
    97 
    98     /* Function to test if interrupt is enabled */
    99     rtems_irq_is_enabled        isOn;
    100 
    101     /* priority level of interrupt */
    102     rtems_irq_level               irqLevel;
    103 
    104     /* Trigger method (rising/falling edge or high/low level) */
    105     rtems_irq_trigger             irqTrigger;
    106 } rtems_irq_connect_data;
    107 
    10876/*
    10977 * function to initialize the interrupt for a specific BSP
    11078 */
    11179void BSP_rtems_irq_mngt_init();
    112 
    113 
    114 /*
    115  * function to connect a particular irq handler.
    116  */
    117 int BSP_install_rtems_irq_handler       (const rtems_irq_connect_data*);
    118 
    119 /*
    120  * function to get the current RTEMS irq handler for ptr->name.
    121  */
    122 int BSP_get_current_rtems_irq_handler   (rtems_irq_connect_data* ptr);
    123 
    124 /*
    125  * function to disconnect the RTEMS irq handler for ptr->name.
    126  */
    127 int BSP_remove_rtems_irq_handler        (const rtems_irq_connect_data*);
    12880
    12981#endif /* __asm__ */
  • c/src/lib/libcpu/arm/at91rm9200/usart/usart.c

    ra0bdb9b rc193baad  
    258258  usart->mr = mode;
    259259  usart->brgr = brgr;
     260  return 0;
    260261}
    261262
  • c/src/lib/libcpu/arm/configure.ac

    ra0bdb9b rc193baad  
    3030AM_CONDITIONAL(at91rm9200, test "$RTEMS_CPU_MODEL" = "at91rm9200")
    3131AM_CONDITIONAL(mc9328mxl, test "$RTEMS_CPU_MODEL" = "mc9328mxl")
    32 AM_CONDITIONAL(s3c2400, test "$RTEMS_CPU_MODEL" = "s3c2400")
    33 AM_CONDITIONAL(s3c2410, test "$RTEMS_CPU_MODEL" = "s3c2410")
    3432AM_CONDITIONAL(lpc22xx, test "$RTEMS_CPU_MODEL" = "lpc22xx")
    3533AM_CONDITIONAL(pxa255, test "$RTEMS_CPU_MODEL" = "pxa255")
     34AM_CONDITIONAL(s3c24xx, test "$RTEMS_CPU_MODEL" = "s3c2400" ||\
     35                        test "$RTEMS_CPU_MODEL" = "s3c2410")
    3636
    3737RTEMS_AMPOLISH3
  • c/src/lib/libcpu/arm/lpc22xx/clock/clockdrv.c

    ra0bdb9b rc193baad  
    3030rtems_irq_connect_data clock_isr_data = {LPC22xx_INTERRUPT_TIMER0,
    3131                                         (rtems_irq_hdl)Clock_isr,
     32                                         NULL,
    3233                                         clock_isr_on,
    3334                                         clock_isr_off,
    34                                          clock_isr_is_on,
    35                                          3,     /* unused for ARM cpus */
    36                                          0 };   /* unused for ARM cpus */
     35                                         clock_isr_is_on};
    3736
    3837/* If you follow the code, this is never used, so any value
  • c/src/lib/libcpu/arm/lpc22xx/irq/bsp_irq_init.c

    ra0bdb9b rc193baad  
    1414#include <lpc22xx.h>
    1515
    16 
    17 extern void default_int_handler(void);
    1816
    1917/*
  • c/src/lib/libcpu/arm/lpc22xx/irq/irq.h

    ra0bdb9b rc193baad  
    2626 * Include some preprocessor value also used by assember code
    2727 */
    28 
     28#include <rtems/irq.h>
    2929#include <rtems.h>
    3030#include <lpc22xx.h>
    3131
    32 extern void default_int_handler();
     32extern void default_int_handler(rtems_irq_hdl_param unused);
     33
    3334/***********************************************************************
    3435 * Constants
     
    7980
    8081
    81 typedef unsigned char  rtems_irq_level;
    82 typedef unsigned char  rtems_irq_trigger;
    83 
    84 typedef unsigned int rtems_irq_number;
    85 struct  __rtems_irq_connect_data__;     /* forward declaratiuon */
    86 
    87 typedef void (*rtems_irq_hdl)       (void);
    88 typedef void (*rtems_irq_enable)    (const struct __rtems_irq_connect_data__*);
    89 typedef void (*rtems_irq_disable)   (const struct __rtems_irq_connect_data__*);
    90 typedef int  (*rtems_irq_is_enabled)(const struct __rtems_irq_connect_data__*);
    91 
    9282//extern rtems_irq_hdl bsp_vector_table[BSP_MAX_INT];
    9383#define VECTOR_TABLE VICVectAddrBase
    9484
    95 typedef struct __rtems_irq_connect_data__ {
    96     /* IRQ line */
    97     rtems_irq_number              name;
    98 
    99     /* Handler */
    100     rtems_irq_hdl                 hdl;
    101 
    102     /* function for enabling interrupts at device level. */
    103     rtems_irq_enable              on;
    104 
    105     /* function for disabling interrupts at device level. */
    106     rtems_irq_disable             off;
    107 
    108     /* Function to test if interrupt is enabled */
    109     rtems_irq_is_enabled        isOn;
    110 
    111     /* priority level of interrupt */
    112     rtems_irq_level               irqLevel;
    113 
    114     /* Trigger method (rising/falling edge or high/low level) */
    115     rtems_irq_trigger             irqTrigger;
    116 } rtems_irq_connect_data;
    11785
    11886/*
    11987 * function to initialize the interrupt for a specific BSP
    12088 */
    121 void BSP_rtems_irq_mngt_init();
    122 
    123 
    124 /*
    125  * function to connect a particular irq handler.
    126  */
    127 int BSP_install_rtems_irq_handler       (const rtems_irq_connect_data*);
    128 
    129 /*
    130  * function to get the current RTEMS irq handler for ptr->name.
    131  */
    132 int BSP_get_current_rtems_irq_handler   (rtems_irq_connect_data* ptr);
    133 
    134 /*
    135  * function to disconnect the RTEMS irq handler for ptr->name.
    136  */
    137 int BSP_remove_rtems_irq_handler        (const rtems_irq_connect_data*);
     89void BSP_rtems_irq_mngt_init(void);
    13890
    13991#endif /* __asm__ */
  • c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_init.c

    ra0bdb9b rc193baad  
    1414#include <irq.h>
    1515#include <bsp.h>
    16 #include <mc9328mxl.h>
    17 
    18 extern void default_int_handler(void);
    1916
    2017/*
  • c/src/lib/libcpu/arm/mc9328mxl/irq/irq.h

    ra0bdb9b rc193baad  
    3232#include <mc9328mxl.h>
    3333
    34 extern void default_int_handler();
     34extern void default_int_handler(rtems_irq_hdl_param);
    3535/***********************************************************************
    3636 * Constants
     
    116116 * function to initialize the interrupt for a specific BSP
    117117 */
    118 void BSP_rtems_irq_mngt_init();
    119 
     118void BSP_rtems_irq_mngt_init(void);
    120119
    121120#endif /* __asm__ */
  • c/src/lib/libcpu/arm/preinstall.am

    ra0bdb9b rc193baad  
    9292PREINSTALL_FILES += $(PROJECT_INCLUDE)/irq.h
    9393endif
    94 if s3c2400
     94if s3c24xx
    9595$(PROJECT_INCLUDE)/s3c24xx.h: s3c24xx/include/s3c24xx.h $(PROJECT_INCLUDE)/$(dirstamp)
    9696        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/s3c24xx.h
    9797PREINSTALL_FILES += $(PROJECT_INCLUDE)/s3c24xx.h
    9898
    99 $(PROJECT_INCLUDE)/s3c2400.h: s3c2400/include/s3c2400.h $(PROJECT_INCLUDE)/$(dirstamp)
     99$(PROJECT_INCLUDE)/s3c2400.h: s3c24xx/include/s3c2400.h $(PROJECT_INCLUDE)/$(dirstamp)
    100100        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/s3c2400.h
    101101PREINSTALL_FILES += $(PROJECT_INCLUDE)/s3c2400.h
    102102
    103 $(PROJECT_INCLUDE)/irq.h: s3c2400/irq/irq.h $(PROJECT_INCLUDE)/$(dirstamp)
    104         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/irq.h
    105 PREINSTALL_FILES += $(PROJECT_INCLUDE)/irq.h
    106 endif
    107 if s3c2410
    108 $(PROJECT_INCLUDE)/s3c24xx.h: s3c24xx/include/s3c24xx.h $(PROJECT_INCLUDE)/$(dirstamp)
    109         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/s3c24xx.h
    110 PREINSTALL_FILES += $(PROJECT_INCLUDE)/s3c24xx.h
    111 
    112 $(PROJECT_INCLUDE)/s3c2410.h: s3c2410/include/s3c2410.h $(PROJECT_INCLUDE)/$(dirstamp)
     103$(PROJECT_INCLUDE)/s3c2410.h: s3c24xx/include/s3c2410.h $(PROJECT_INCLUDE)/$(dirstamp)
    113104        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/s3c2410.h
    114105PREINSTALL_FILES += $(PROJECT_INCLUDE)/s3c2410.h
    115106
    116 $(PROJECT_INCLUDE)/irq.h: s3c2410/irq/irq.h $(PROJECT_INCLUDE)/$(dirstamp)
     107$(PROJECT_INCLUDE)/irq.h: s3c24xx/irq/irq.h $(PROJECT_INCLUDE)/$(dirstamp)
    117108        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/irq.h
    118109PREINSTALL_FILES += $(PROJECT_INCLUDE)/irq.h
  • c/src/lib/libcpu/arm/pxa255/clock/clock.c

    ra0bdb9b rc193baad  
    9393  XSCALE_IRQ_OS_TIMER,
    9494  (rtems_irq_hdl)Clock_isr,
     95  NULL,
    9596  clock_isr_on,
    9697  clock_isr_off,
    97   clock_isr_is_on,
    98   3,     /* unused for ARM cpus */
    99   0      /* unused for ARM cpus */
     98  clock_isr_is_on
    10099};
    101100
    102101
    103102#define Clock_driver_support_install_isr( _new, _old ) \
    104   BSP_install_rtems_irq_handler(&clock_isr_data)
     103  do {                                                 \
     104    _old = NULL;                                       \
     105    BSP_install_rtems_irq_handler(&clock_isr_data);    \
     106  } while (0)
    105107
    106108void Clock_driver_support_initialize_hardware(void)
  • c/src/lib/libcpu/arm/pxa255/irq/bsp_irq_init.c

    ra0bdb9b rc193baad  
    1414#include <pxa255.h>
    1515
    16 void dummy_handler(uint32_t vector)
     16void dummy_handler(rtems_irq_hdl_param unused)
    1717{
    1818  printk("I am dummy handler\n");
    1919}
    2020
    21 void (*IRQ_table[PRIMARY_IRQS])(uint32_t vector);
     21void (*IRQ_table[PRIMARY_IRQS])(rtems_irq_hdl_param param);
    2222
    2323/*
  • c/src/lib/libcpu/arm/pxa255/irq/irq.h

    ra0bdb9b rc193baad  
    2323 */
    2424
     25#include <rtems/irq.h>
    2526#include <rtems.h>
    2627#include <pxa255.h>
    2728
    28 extern void default_int_handler();
    29 extern void (*IRQ_table[PRIMARY_IRQS])(uint32_t vector);
    30 extern void dummy_handler(uint32_t vector);
     29extern void default_int_handler(rtems_irq_hdl_param unused);
     30extern void (*IRQ_table[PRIMARY_IRQS])(rtems_irq_hdl_param param);
     31extern void dummy_handler(rtems_irq_hdl_param unused);
    3132
    32 
    33 
    34 /* vector table used by shared/irq_init.c */
    35 
    36 typedef unsigned char  rtems_irq_level;
    37 typedef unsigned char  rtems_irq_trigger;
    38 struct  __rtems_irq_connect_data__;     /* forward declaratiuon */
    39 typedef unsigned int rtems_irq_number;
    40 typedef void (*rtems_irq_hdl)       (uint32_t vector);
    41 typedef void (*rtems_irq_enable)    (const struct __rtems_irq_connect_data__*);
    42 typedef void (*rtems_irq_disable)   (const struct __rtems_irq_connect_data__*);
    43 typedef int  (*rtems_irq_is_enabled)(const struct __rtems_irq_connect_data__*);
    44 
    45 typedef struct __rtems_irq_connect_data__ {
    46     /* IRQ line */
    47     rtems_irq_number             name;
    48 
    49     /* Handler */
    50     rtems_irq_hdl                 hdl;
    51 
    52     /* function for enabling interrupts at device level. */
    53     rtems_irq_enable              on;
    54 
    55     /* function for disabling interrupts at device level. */
    56     rtems_irq_disable             off;
    57 
    58     /* Function to test if interrupt is enabled */
    59     rtems_irq_is_enabled        isOn;
    60 
    61     /* priority level of interrupt */
    62     rtems_irq_level               irqLevel;
    63 
    64     /* Trigger method (rising/falling edge or high/low level) */
    65     rtems_irq_trigger             irqTrigger;
    66 } rtems_irq_connect_data;
    67 
    68 /*
    69  * function to initialize the interrupt for a specific BSP
    70  */
    71 void BSP_rtems_irq_mngt_init();
    72 
    73 
    74 /*
    75  * function to connect a particular irq handler.
    76  */
    77 int BSP_install_rtems_irq_handler       (const rtems_irq_connect_data*);
    78 
    79 /*
    80  * function to get the current RTEMS irq handler for ptr->name.
    81  */
    82 int BSP_get_current_rtems_irq_handler   (rtems_irq_connect_data* ptr);
    83 
    84 /*
    85  * function to disconnect the RTEMS irq handler for ptr->name.
    86  */
    87 int BSP_remove_rtems_irq_handler        (const rtems_irq_connect_data*);
     33extern void BSP_rtems_irq_mngt_init(void);
    8834
    8935#endif /* __asm__ */
  • c/src/lib/libcpu/arm/s3c24xx/clock/clockdrv.c

    ra0bdb9b rc193baad  
    2727rtems_irq_connect_data clock_isr_data = {BSP_INT_TIMER4,
    2828                                         (rtems_irq_hdl)Clock_isr,
     29                                         NULL,
    2930                                         clock_isr_on,
    3031                                         clock_isr_off,
    31                                          clock_isr_is_on,
    32                                          3,     /* unused for ARM cpus */
    33                                          0 };   /* unused for ARM cpus */
     32                                         clock_isr_is_on
     33};
    3434
    3535/* If you follow the code, this is never used, so any value
  • c/src/lib/libcpu/arm/s3c24xx/include/s3c2400.h

    ra0bdb9b rc193baad  
    99#define S3C2400_H_
    1010
     11/* to be used in assembly code */
     12#define rINTOFFSET_ADDR 0x14400014
    1113/* Memory control */
    1214#define rBWSCON         (*(volatile unsigned *)0x14000000)
     
    428430/* Wait until rINTPND is changed for the case that the ISR is very short. */
    429431
    430 #ifndef __asm__
     432#ifndef ASM
    431433/* Typedefs */
    432434typedef union {
     
    655657  unsigned long all;
    656658} IISSFIF;
    657 #endif //__asm__
     659#endif //ASM
    658660
    659661#define LCD_WIDTH 240
  • c/src/lib/libcpu/arm/s3c24xx/include/s3c2410.h

    ra0bdb9b rc193baad  
    88#ifndef S3C2410_H_
    99#define S3C2410_H_
     10
     11/* to be used in assembly code */
     12#define rINTOFFSET_ADDR 0x4A000014
    1013/* Memory control */
    1114#define rBWSCON         (*(volatile unsigned *)0x48000000)
     
    577580                 }
    578581/* Wait until rINTPND is changed for the case that the ISR is very short. */
    579 #ifndef __asm__
     582#ifndef ASM
    580583/* Typedefs */
    581584typedef union {
     
    803806  unsigned long all;
    804807} IISSFIF;
    805 #endif //__asm__
     808#endif //ASM
    806809
    807810#define LCD_WIDTH 240
  • c/src/lib/libcpu/arm/s3c24xx/irq/bsp_irq_asm.S

    ra0bdb9b rc193baad  
    77 *  Emmanuel Raguet,  mailto:raguet@crf.canon.fr
    88 *
     9 * merged to common file for s32400 and s32410 by Thomas Doerfler, embedded brains
     10 *
    911 *  The license and distribution terms for this file may be
    1012 *  found in found in the file LICENSE in this distribution or at
     
    1416 */
    1517
    16 #define __asm__
     18#include <s3c24xx.h>
    1719
    1820/*
     
    2426bsp_interrupt_dispatch :
    2527
    26         ldr     r0, =0x4A000014 /* Read rINTOFFSET */
     28        ldr     r0, =rINTOFFSET_ADDR /* Read rINTOFFSET */
    2729        ldr     r1, [r0]
    2830
  • c/src/lib/libcpu/arm/s3c24xx/irq/bsp_irq_init.c

    ra0bdb9b rc193baad  
    1717#include <s3c24xx.h>
    1818
    19 extern void default_int_handler(void);
    20 
    2119void BSP_rtems_irq_mngt_init(void)
    2220{
  • c/src/lib/libcpu/arm/s3c24xx/irq/irq.h

    ra0bdb9b rc193baad  
    11/* irq.h
    22 *
    3  *  Note: This file will not be compiled, it just a place holder by now
     3 *  Common file, merged from s3c2400/irq/irq.h and s3c2410/irq/irq.h
    44 */
    55
    66#ifndef _IRQ_H_
    77#define _IRQ_H_
     8#ifdef __cplusplus
     9extern "C" {
     10#endif
    811
    9 // This file is a place holder
    10 // The real irq.h preinstalled is s3c2410/irq/irq.h and s3c2410/irq/irq.h
    11 // change/refer to this files
    12 // TODO: clean irq.h in ARM BSP. there is lots of duplicated codes in cpu_name/irq/irq.h with cpukit/include/rtems/irq.h
    13 //
     12/*
     13 * Include some preprocessor value also used by assember code
     14 */
     15
     16#include <rtems/irq.h>
     17#include <rtems.h>
     18#include <s3c24xx.h>
     19
     20extern void default_int_handler(rtems_irq_hdl_param unused);
     21/*-------------------------------------------------------------------------+
     22| Constants
     23+--------------------------------------------------------------------------*/
     24
     25#ifdef CPU_S3C2400
     26  /* possible interrupt sources */
     27#define BSP_EINT0             0
     28#define BSP_EINT1             1
     29#define BSP_EINT2             2
     30#define BSP_EINT3             3
     31#define BSP_EINT4             4
     32#define BSP_EINT5             5
     33#define BSP_EINT6             6
     34#define BSP_EINT7             7
     35#define BSP_INT_TICK          8
     36#define BSP_INT_WDT           9
     37#define BSP_INT_TIMER0       10
     38#define BSP_INT_TIMER1       11
     39#define BSP_INT_TIMER2       12
     40#define BSP_INT_TIMER3       13
     41#define BSP_INT_TIMER4       14
     42#define BSP_INT_UERR01       15
     43#define _res0                16
     44#define BSP_INT_DMA0         17
     45#define BSP_INT_DMA1         18
     46#define BSP_INT_DMA2         19
     47#define BSP_INT_DMA3         20
     48#define BSP_INT_MMC          21
     49#define BSP_INT_SPI          22
     50#define BSP_INT_URXD0        23
     51#define BSP_INT_URXD1        24
     52#define BSP_INT_USBD         25
     53#define BSP_INT_USBH         26
     54#define BSP_INT_IIC          27
     55#define BSP_INT_UTXD0        28
     56#define BSP_INT_UTXD1        29
     57#define BSP_INT_RTC          30
     58#define BSP_INT_ADC          31
     59#define BSP_MAX_INT          32
     60
     61#elif defined CPU_S3C2410
     62  /* possible interrupt sources */
     63#define BSP_EINT0             0
     64#define BSP_EINT1             1
     65#define BSP_EINT2             2
     66#define BSP_EINT3             3
     67#define BSP_EINT4_7           4
     68#define BSP_EINT8_23          5
     69#define BSP_nBATT_FLT         7
     70#define BSP_INT_TICK          8
     71#define BSP_INT_WDT           9
     72#define BSP_INT_TIMER0       10
     73#define BSP_INT_TIMER1       11
     74#define BSP_INT_TIMER2       12
     75#define BSP_INT_TIMER3       13
     76#define BSP_INT_TIMER4       14
     77#define BSP_INT_UART2        15
     78#define BSP_INT_LCD          16
     79#define BSP_INT_DMA0         17
     80#define BSP_INT_DMA1         18
     81#define BSP_INT_DMA2         19
     82#define BSP_INT_DMA3         20
     83#define BSP_INT_SDI          21
     84#define BSP_INT_SPI0         22
     85#define BSP_INT_UART1        23
     86#define BSP_INT_USBD         25
     87#define BSP_INT_USBH         26
     88#define BSP_INT_IIC          27
     89#define BSP_INT_UART0        28
     90#define BSP_INT_SPI1         29
     91#define BSP_INT_RTC          30
     92#define BSP_INT_ADC          31
     93#define BSP_MAX_INT          32
     94#endif
     95
     96extern void *bsp_vector_table;
     97#define VECTOR_TABLE &bsp_vector_table
     98
     99/*-------------------------------------------------------------------------+
     100| Function Prototypes.
     101+--------------------------------------------------------------------------*/
     102/*
     103 * ------------------ RTEMS Single Irq Handler Mngt Routines ----------------
     104 */
     105
     106/*
     107 * function to initialize the interrupt for a specific BSP
     108 */
     109void BSP_rtems_irq_mngt_init();
     110
     111
     112#ifdef __cplusplus
     113}
     114#endif
    14115
    15116#endif /* _IRQ_H_ */
Note: See TracChangeset for help on using the changeset viewer.