Skip to content
  • Rob Herring's avatar
    Introduce common timer functions · 8dfafdde
    Rob Herring authored
    
    
    Many platforms duplicate pretty much the same timer code yet they all have
    a 32-bit freerunning counter register. Create a common implementation that
    minimally requires 2 or 3 defines to add timer support:
    
    CONFIG_SYS_TIMER_RATE - Clock rate of the timer counter
    CONFIG_SYS_TIMER_COUNTER - Address of 32-bit counter
    CONFIG_SYS_TIMER_COUNTS_DOWN - Define if counter counts down
    
    All functions are weak or ifdef'ed so they can still be overriden by any
    platform.
    
    Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
    8dfafdde