Barrelfish
Functions
sp804.h File Reference

ARM sp804 dual timer module kernel interface. More...

Functions

void sp804_configure (size_t n, uint32_t hz, const lpaddr_t pit_addrs[], const uint32_t irqs[])
 Configure the SP804 modules. More...
 

Detailed Description

ARM sp804 dual timer module kernel interface.

Function Documentation

void sp804_configure ( size_t  n,
uint32_t  hz,
const lpaddr_t  pit_addrs[],
const uint32_t  irqs[] 
)

Configure the SP804 modules.

We expose the timers individually, and simply trust that the rest of the CPU driver knows that each pair of timers shares a single interrupt line. We also require that the MMU is turned on at this point.

Parameters
nthe number of modules (half the number of timers)
hzthe clock frequency of the timers in Hertz
addrsan array of n physical addresses of sp804 devices
irqsan array of n irq numbers for the devices

Each SP804 has two timers. We number timers sequentially; the number supplied to this function is the number of SP804s (i.e. half the number of timers).