Ignore:
Timestamp:
May 6, 2013, 8:59:07 AM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
12d182c4
Parents:
33c98fd
git-author:
Sebastian Huber <sebastian.huber@…> (05/06/13 08:59:07)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/06/13 13:06:52)
Message:

bsps/arm: Add shared GIC tmtests/tm27 support

Location:
c/src/lib/libbsp/arm/realview-pbx-a9
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/realview-pbx-a9/Makefile.am

    r33c98fd re37d57bc  
    4040include_bsp_HEADERS += ../shared/include/arm-gic-irq.h
    4141include_bsp_HEADERS += ../shared/include/arm-gic-regs.h
     42include_bsp_HEADERS += ../shared/include/arm-gic-tm27.h
    4243include_bsp_HEADERS += ../shared/include/arm-pl011.h
    4344include_bsp_HEADERS += ../shared/include/arm-pl011-regs.h
  • c/src/lib/libbsp/arm/realview-pbx-a9/include/tm27.h

    r33c98fd re37d57bc  
    2020#define __tm27_h
    2121
    22 #include <assert.h>
    23 
    24 #include <bsp.h>
    25 #include <bsp/irq.h>
    26 
    27 #define MUST_WAIT_FOR_INTERRUPT 1
    28 
    29 #define RVPBXA9_TM27_IRQ ARM_GIC_IRQ_SGI_13
    30 
    31 #define RVPBXA9_TM27_PRIO_LOW 0xfe
    32 
    33 #define RVPBXA9_TM27_PRIO_HIGH 0x00
    34 
    35 static void Install_tm27_vector(void (*handler)(rtems_vector_number))
    36 {
    37   rtems_status_code sc = rtems_interrupt_handler_install(
    38     RVPBXA9_TM27_IRQ,
    39     "TM27",
    40     RTEMS_INTERRUPT_UNIQUE,
    41     (rtems_interrupt_handler) handler,
    42     NULL
    43   );
    44   assert(sc == RTEMS_SUCCESSFUL);
    45 
    46   sc = arm_gic_irq_set_priority(
    47     RVPBXA9_TM27_IRQ,
    48     RVPBXA9_TM27_PRIO_LOW
    49   );
    50   assert(sc == RTEMS_SUCCESSFUL);
    51 }
    52 
    53 static void Cause_tm27_intr(void)
    54 {
    55   rtems_status_code sc = arm_gic_irq_generate_software_irq(
    56     RVPBXA9_TM27_IRQ,
    57     ARM_GIC_IRQ_SOFTWARE_IRQ_TO_SELF,
    58     0
    59   );
    60   assert(sc == RTEMS_SUCCESSFUL);
    61 }
    62 
    63 static void Clear_tm27_intr(void)
    64 {
    65   rtems_status_code sc = arm_gic_irq_set_priority(
    66     RVPBXA9_TM27_IRQ,
    67     RVPBXA9_TM27_PRIO_LOW
    68   );
    69   assert(sc == RTEMS_SUCCESSFUL);
    70 }
    71 
    72 static void Lower_tm27_intr(void)
    73 {
    74   rtems_status_code sc = arm_gic_irq_set_priority(
    75     RVPBXA9_TM27_IRQ,
    76     RVPBXA9_TM27_PRIO_HIGH
    77   );
    78   assert(sc == RTEMS_SUCCESSFUL);
    79 }
     22#include <bsp/arm-gic-tm27.h>
    8023
    8124#endif /* __tm27_h */
  • c/src/lib/libbsp/arm/realview-pbx-a9/preinstall.am

    r33c98fd re37d57bc  
    111111PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/arm-gic-regs.h
    112112
     113$(PROJECT_INCLUDE)/bsp/arm-gic-tm27.h: ../shared/include/arm-gic-tm27.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     114        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/arm-gic-tm27.h
     115PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/arm-gic-tm27.h
     116
    113117$(PROJECT_INCLUDE)/bsp/arm-pl011.h: ../shared/include/arm-pl011.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
    114118        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/arm-pl011.h
Note: See TracChangeset for help on using the changeset viewer.