Changeset c193baad in rtems for c/src/lib/libcpu


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/libcpu/arm
Files:
8 deleted
19 edited
3 moved

Legend:

Unmodified
Added
Removed
  • 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.