Changeset 90f44cd2 in rtems


Ignore:
Timestamp:
Sep 10, 2014, 8:41:35 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
0cd13bce
Parents:
f59e64f2
git-author:
Sebastian Huber <sebastian.huber@…> (09/10/14 08:41:35)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/10/14 08:43:41)
Message:

bsps/arm: Fix GIC tm27 support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/shared/include/arm-gic-tm27.h

    rf59e64f2 r90f44cd2  
    88
    99/*
    10  * Copyright (c) 2013 embedded brains GmbH.  All rights reserved.
     10 * Copyright (c) 2013-2014 embedded brains GmbH.  All rights reserved.
    1111 *
    1212 *  embedded brains GmbH
     
    3535#define MUST_WAIT_FOR_INTERRUPT 1
    3636
    37 #define ARM_GIC_TM27_IRQ ARM_GIC_IRQ_SGI_13
     37#define ARM_GIC_TM27_IRQ_LOW ARM_GIC_IRQ_SGI_12
    3838
    39 #define ARM_GIC_TM27_PRIO_LOW 0xfe
     39#define ARM_GIC_TM27_IRQ_HIGH ARM_GIC_IRQ_SGI_13
     40
     41#define ARM_GIC_TM27_PRIO_LOW 0x80
    4042
    4143#define ARM_GIC_TM27_PRIO_HIGH 0x00
     
    4446{
    4547  rtems_status_code sc = rtems_interrupt_handler_install(
    46     ARM_GIC_TM27_IRQ,
    47     "TM27",
     48    ARM_GIC_TM27_IRQ_LOW,
     49    "tm27 low",
    4850    RTEMS_INTERRUPT_UNIQUE,
    4951    (rtems_interrupt_handler) handler,
     
    5355
    5456  sc = arm_gic_irq_set_priority(
    55     ARM_GIC_TM27_IRQ,
     57    ARM_GIC_TM27_IRQ_LOW,
    5658    ARM_GIC_TM27_PRIO_LOW
     59  );
     60  assert(sc == RTEMS_SUCCESSFUL);
     61
     62  sc = rtems_interrupt_handler_install(
     63    ARM_GIC_TM27_IRQ_HIGH,
     64    "tm27 high",
     65    RTEMS_INTERRUPT_UNIQUE,
     66    (rtems_interrupt_handler) handler,
     67    NULL
     68  );
     69  assert(sc == RTEMS_SUCCESSFUL);
     70
     71  sc = arm_gic_irq_set_priority(
     72    ARM_GIC_TM27_IRQ_HIGH,
     73    ARM_GIC_TM27_PRIO_HIGH
    5774  );
    5875  assert(sc == RTEMS_SUCCESSFUL);
     
    6279{
    6380  rtems_status_code sc = arm_gic_irq_generate_software_irq(
    64     ARM_GIC_TM27_IRQ,
     81    ARM_GIC_TM27_IRQ_LOW,
    6582    ARM_GIC_IRQ_SOFTWARE_IRQ_TO_SELF,
    6683    0
     
    7188static inline void Clear_tm27_intr(void)
    7289{
    73   rtems_status_code sc = arm_gic_irq_set_priority(
    74     ARM_GIC_TM27_IRQ,
    75     ARM_GIC_TM27_PRIO_LOW
    76   );
    77   assert(sc == RTEMS_SUCCESSFUL);
     90  /* Nothing to do */
    7891}
    7992
    8093static inline void Lower_tm27_intr(void)
    8194{
    82   rtems_status_code sc = arm_gic_irq_set_priority(
    83     ARM_GIC_TM27_IRQ,
    84     ARM_GIC_TM27_PRIO_HIGH
     95  rtems_status_code sc = arm_gic_irq_generate_software_irq(
     96    ARM_GIC_TM27_IRQ_HIGH,
     97    ARM_GIC_IRQ_SOFTWARE_IRQ_TO_SELF,
     98    0
    8599  );
    86100  assert(sc == RTEMS_SUCCESSFUL);
Note: See TracChangeset for help on using the changeset viewer.