Changeset c8a5c8c in mainline


Ignore:
Timestamp:
2013-01-20T11:45:20Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4a79e6f
Parents:
7a38962
Message:

arm32: Start performance counters only if we can't use timer extensions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/cpu/cpu.c

    r7a38962 rc8a5c8c  
    175175
    176176#ifdef PROCESSOR_ARCH_armv7_a
    177         PMCR_write(PMCR_read() | PMCR_E_FLAG | PMCR_D_FLAG);
    178         PMCNTENSET_write(PMCNTENSET_CYCLE_COUNTER_EN_FLAG);
     177        if ((ID_PFR1_read() & ID_PFR1_GEN_TIMER_EXT_MASK) !=
     178            ID_PFR1_GEN_TIMER_EXT) {
     179                PMCR_write(PMCR_read() | PMCR_E_FLAG | PMCR_D_FLAG);
     180                PMCNTENSET_write(PMCNTENSET_CYCLE_COUNTER_EN_FLAG);
     181        }
    179182#endif
    180183}
Note: See TracChangeset for help on using the changeset viewer.