Changeset b0b32b8 in rtems


Ignore:
Timestamp:
Apr 2, 2012, 11:37:31 AM (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
270fa1e
Parents:
c988f180
git-author:
Sebastian Huber <sebastian.huber@…> (04/02/12 11:37:31)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/02/12 11:40:16)
Message:

bsps: Fix for clock driver

Do not use the e300 core decrementer auto-reload feature. We have to
use the normal decrementer handler since otherwise it is impossible to
pass test sptests/spnsext01.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/shared/clock/clock.c

    rc988f180 rb0b32b8  
    117117        /* Acknowledge decrementer request */
    118118        PPC_SET_SPECIAL_PURPOSE_REGISTER( BOOKE_TSR, BOOKE_TSR_DIS);
    119 
    120         /* Increment clock ticks */
    121         Clock_driver_ticks += 1;
    122 
    123         /* Enable external exceptions */
    124         msr = ppc_external_exceptions_enable();
    125 
    126         /* Call clock ticker  */
    127         ppc_clock_tick();
    128 
    129         /* Restore machine state */
    130         ppc_external_exceptions_disable( msr);
    131 
    132         return 0;
    133 }
    134 
    135 static int ppc_clock_exception_handler_e300( BSP_Exception_frame *frame, unsigned number)
    136 {
    137         uint32_t msr;
    138119
    139120        /* Increment clock ticks */
     
    219200                /* Enable decrementer and auto-reload */
    220201                PPC_SET_SPECIAL_PURPOSE_REGISTER_BITS( BOOKE_TCR, BOOKE_TCR_DIE | BOOKE_TCR_ARE);
    221         } else if (cpu_type == PPC_e300c2 || cpu_type == PPC_e300c3) {
    222                 /* TODO: Not tested for e300c2 */
    223 
    224                 /* Enable auto-reload */
    225                 PPC_SET_SPECIAL_PURPOSE_REGISTER_BITS( HID0, 0x00000040);
    226 
    227                 /* Install exception handler */
    228                 ppc_exc_set_handler( ASM_DEC_VECTOR, ppc_clock_exception_handler_e300);
    229202        } else {
    230203                /* Here the decrementer value is actually the interval */
Note: See TracChangeset for help on using the changeset viewer.