Changeset 8d292011 in rtems


Ignore:
Timestamp:
Dec 5, 2013, 4:26:41 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
6eb1733
Parents:
5df9bf6
git-author:
Sebastian Huber <sebastian.huber@…> (12/05/13 16:26:41)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/16/13 14:15:42)
Message:

bsp/genmcf548x: Add initial values for INTC_ICRn

According to the manual the application must use unique and
non-overlapping level and priority definitions for enabled interrupts.

Location:
c/src/lib/libbsp/m68k/genmcf548x
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/genmcf548x/Makefile.am

    r5df9bf6 r8d292011  
    5656libbsp_a_SOURCES += ../../shared/src/irq-shell.c
    5757libbsp_a_SOURCES += irq/irq.c
     58libbsp_a_SOURCES += irq/intc-icr-init-values.c
    5859
    5960if HAS_NETWORKING
  • c/src/lib/libbsp/m68k/genmcf548x/clock/clock.c

    r5df9bf6 r8d292011  
    9191  do {                                                                  \
    9292    int level;                                                          \
    93     MCF548X_INTC_ICR54 =   MCF548X_INTC_ICRn_IL(SLT0_IRQ_LEVEL) |       \
    94       MCF548X_INTC_ICRn_IP(SLT0_IRQ_PRIORITY);                          \
    9593    rtems_interrupt_disable( level );                                   \
    9694    MCF548X_INTC_IMRH &= ~(MCF548X_INTC_IMRH_INT_MASK54);               \
  • c/src/lib/libbsp/m68k/genmcf548x/console/console.c

    r5df9bf6 r8d292011  
    488488        switch(chan) {
    489489        case 0:
    490             MCF548X_INTC_ICR35 =   MCF548X_INTC_ICRn_IL(PSC0_IRQ_LEVEL) |
    491                                MCF548X_INTC_ICRn_IP(PSC0_IRQ_PRIORITY);
    492490            MCF548X_INTC_IMRH &= ~(MCF548X_INTC_IMRH_INT_MASK35);
    493491            break;
    494492
    495493        case 1:
    496             MCF548X_INTC_ICR34 =   MCF548X_INTC_ICRn_IL(PSC1_IRQ_LEVEL) |
    497                                MCF548X_INTC_ICRn_IP(PSC1_IRQ_PRIORITY);
    498494            MCF548X_INTC_IMRH &= ~(MCF548X_INTC_IMRH_INT_MASK34);
    499495            break;
    500496
    501497        case 2:
    502             MCF548X_INTC_ICR33 =   MCF548X_INTC_ICRn_IL(PSC2_IRQ_LEVEL) |
    503                                MCF548X_INTC_ICRn_IP(PSC2_IRQ_PRIORITY);
    504498            MCF548X_INTC_IMRH &= ~(MCF548X_INTC_IMRH_INT_MASK33);
    505499            break;
    506500
    507501        case 3:
    508             MCF548X_INTC_ICR32 =   MCF548X_INTC_ICRn_IL(PSC3_IRQ_LEVEL) |
    509                                MCF548X_INTC_ICRn_IP(PSC3_IRQ_PRIORITY);
    510502            MCF548X_INTC_IMRH &= ~(MCF548X_INTC_IMRH_INT_MASK32);
    511503            break;
  • c/src/lib/libbsp/m68k/genmcf548x/include/bsp.h

    r5df9bf6 r8d292011  
    8787);
    8888
    89 /*
    90  * Interrupt assignments
    91  *  Highest-priority listed first
    92  */
    93 #define SLT0_IRQ_LEVEL      4
    94 #define SLT0_IRQ_PRIORITY   0
    95 
    96 #define PSC0_IRQ_LEVEL      3
    97 #define PSC0_IRQ_PRIORITY   7
    98 #define PSC1_IRQ_LEVEL      3
    99 #define PSC1_IRQ_PRIORITY   6
    100 #define PSC2_IRQ_LEVEL      3
    101 #define PSC2_IRQ_PRIORITY   5
    102 #define PSC3_IRQ_LEVEL      3
    103 #define PSC3_IRQ_PRIORITY   4
    104 
    105 #define FEC_IRQ_LEVEL       2
    106 #define FEC_IRQ_PRIORITY    3
     89/* Initial values for the interrupt level and priority registers (INTC_ICRn) */
     90extern const uint8_t mcf548x_intc_icr_init_values[64];
    10791
    10892/*
  • c/src/lib/libbsp/m68k/genmcf548x/network/network.c

    r5df9bf6 r8d292011  
    12891289      }
    12901290
    1291       MCF548X_INTC_ICRn(MCF548X_FEC_IRQ_VECTOR(chan) % 64) =
    1292         MCF548X_INTC_ICRn_IL(FEC_IRQ_LEVEL) |
    1293         MCF548X_INTC_ICRn_IP(FEC_IRQ_PRIORITY);
    1294 
    12951291      MCF548X_INTC_IMRH &= ~(1 << (MCF548X_FEC_IRQ_VECTOR(chan) % 32));
    12961292
  • c/src/lib/libbsp/m68k/genmcf548x/startup/init548x.c

    r5df9bf6 r8d292011  
    7878
    7979void mcf548x_init(void)
    80     {
     80{
     81    size_t i;
     82
    8183#if defined(HAS_LOW_LEVEL_INIT)
    8284    /* set XLB arbiter timeouts */
     
    109111    /* Zero uninitialized data */
    110112    memset(bsp_section_bss_begin, 0, (size_t) bsp_section_bss_size);
     113
     114    for (i = 8; i < RTEMS_ARRAY_SIZE(mcf548x_intc_icr_init_values); ++i) {
     115      volatile uint8_t *icr = &MCF548X_INTC_ICR0;
     116
     117      icr[i] = mcf548x_intc_icr_init_values[i];
     118    }
    111119}
    112120/********************************************************************/
Note: See TracChangeset for help on using the changeset viewer.