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


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/s3c24xx
Files:
3 edited
3 moved

Legend:

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