diff options
Diffstat (limited to 'cpu/mpc83xx/interrupts.c')
-rw-r--r-- | cpu/mpc83xx/interrupts.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cpu/mpc83xx/interrupts.c b/cpu/mpc83xx/interrupts.c index 53474f6..5a0babf 100644 --- a/cpu/mpc83xx/interrupts.c +++ b/cpu/mpc83xx/interrupts.c @@ -35,6 +35,8 @@ #include <mpc83xx.h> #include <asm/processor.h> +DECLARE_GLOBAL_DATA_PTR; + struct irq_action { interrupt_handler_t *handler; void *arg; @@ -43,6 +45,14 @@ struct irq_action { int interrupt_init_cpu (unsigned *decrementer_count) { + volatile immap_t *immr = (immap_t *) CFG_IMMRBAR; + + *decrementer_count = (gd->bus_clk / 4) / CFG_HZ; + + /* Enable e300 time base */ + + immr->sysconf.spcr |= 0x00400000; + return 0; } |