diff options
author | Graeme Russ <graeme.russ@gmail.com> | 2009-11-24 20:04:17 +1100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-12-05 01:02:58 +0100 |
commit | 27f13075a659da046372dfe249d808f2f6ddb432 (patch) | |
tree | 4405359b63b270687590f9d4b2709c07b022daf2 /cpu/i386/sc520 | |
parent | 141a62cc12bfbab49f0f44a394518a360dcddad8 (diff) | |
download | u-boot-imx-27f13075a659da046372dfe249d808f2f6ddb432.zip u-boot-imx-27f13075a659da046372dfe249d808f2f6ddb432.tar.gz u-boot-imx-27f13075a659da046372dfe249d808f2f6ddb432.tar.bz2 |
i386: Fix race condition when using SC520 timers
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
Diffstat (limited to 'cpu/i386/sc520')
-rw-r--r-- | cpu/i386/sc520/sc520_timer.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cpu/i386/sc520/sc520_timer.c b/cpu/i386/sc520/sc520_timer.c index 23de14b..25c9a24 100644 --- a/cpu/i386/sc520/sc520_timer.c +++ b/cpu/i386/sc520/sc520_timer.c @@ -35,6 +35,12 @@ void sc520_timer_isr(void) int timer_init(void) { + /* Register the SC520 specific timer interrupt handler */ + register_timer_isr (sc520_timer_isr); + + /* Install interrupt handler for GP Timer 1 */ + irq_install_handler (0, timer_isr, NULL); + /* Map GP Timer 1 to Master PIC IR0 */ sc520_mmcr->gp_tmr_int_map[1] = 0x01; @@ -54,11 +60,6 @@ int timer_init(void) sc520_mmcr->gptmr1maxcmpa = 100; sc520_mmcr->gptmr1ctl = 0xe009; - /* Register the SC520 specific timer interrupt handler */ - register_timer_isr (sc520_timer_isr); - - /* Install interrupt handler for GP Timer 1 */ - irq_install_handler (0, timer_isr, NULL); unmask_irq (0); /* Clear the GP Timer 1 status register to get the show rolling*/ |