static int this_init(void) { clock_source_register(&this_clock_source); return irq_attach(PTIMER_IRQ, clock_handler, 0, &this_clock_source, "Cortex A9 systick timer"); }
static int pit_clock_init(void) { pit_clock_setup(NULL); clock_source_register(&pit_clock_source); if (ENOERR != irq_attach(IRQ_NR, clock_handler, 0, &pit_clock_source, "PIT")) { panic("pit timer irq_attach failed"); } return ENOERR; }
static int omap_clk_init(void) { /* Map one vmem page to handle this device if mmu is used */ mmap_device_memory( (void*) ((uintptr_t) GPTIMER1_BASE & ~MMU_PAGE_MASK), PROT_READ | PROT_WRITE | PROT_NOCACHE, binalign_bound(sizeof(struct gptimerxx_x), MMU_PAGE_SIZE), VMEM_PAGE_WRITABLE, ((uintptr_t) GPTIMER1_BASE & ~MMU_PAGE_MASK) ); clock_source_register(&omap3_clk_clock_source); return irq_attach(GPTIMER1_IRQ, clock_handler, 0, &omap3_clk_clock_source, "omap3_clk"); }
static int this_init(void) { /* Map one vmem page to handle this device if mmu is used */ mmap_device_memory( (void*) ((uintptr_t) BCM2835_SYSTEM_TIMER_BASE & ~MMU_PAGE_MASK), PROT_READ | PROT_WRITE | PROT_NOCACHE, binalign_bound(sizeof(struct raspi_timer_regs), MMU_PAGE_SIZE), MAP_FIXED, ((uintptr_t) BCM2835_SYSTEM_TIMER_BASE & ~MMU_PAGE_MASK) ); clock_source_register(&this_clock_source); irq_attach(SYSTICK_IRQ, clock_handler, 0, &this_clock_source, "Raspberry PI systick timer"); return 0; }
static int lapic_clock_init(void) { ipl_t ipl = ipl_save(); clock_source_register(&lapic_clock_source); if (ENOERR != irq_attach(IRQ0, clock_handler, 0, &lapic_clock_source, "lapic")) { panic("lapic timer irq_attach failed"); } lapic_clock_setup(NULL); ipl_restore(ipl); return ENOERR; }
static int ppc_clk_init(void) { clock_source_register(&ppc_clk_clock_source); return irq_attach(PPCCLK_IRQ, clock_handler, 0, &ppc_clk_clock_source, "ppc_clk"); }
static int this_init(void) { clock_source_register(&this_clock_source); return irq_attach(SYSTICK_IRQ, clock_handler, 0, &this_clock_source, "stm32 systick timer"); }