diff options
| author | Andy Fleming <[email protected]> | 2007-10-19 11:24:22 -0500 |
|---|---|---|
| committer | Andrew Fleming-AFLEMING <[email protected]> | 2007-10-19 11:24:22 -0500 |
| commit | d4d1e9bee7c45ea8c513d3af697c864107f1c4d1 (patch) | |
| tree | 3cd7eba359e6729454f4fac5b96209eb959ecf72 /cpu/microblaze | |
| parent | 1487adbdcf9594bb2eb686325a6f9540dad1b70a (diff) | |
| parent | 27d2b1ed216b457a66c17d38ce5ffdf3c2c32d1e (diff) | |
Merge branch 'denx'
Diffstat (limited to 'cpu/microblaze')
| -rw-r--r-- | cpu/microblaze/cache.c | 2 | ||||
| -rw-r--r-- | cpu/microblaze/start.S | 6 | ||||
| -rw-r--r-- | cpu/microblaze/timer.c | 7 |
3 files changed, 10 insertions, 5 deletions
diff --git a/cpu/microblaze/cache.c b/cpu/microblaze/cache.c index 6ce0b55b243..4b7866fae50 100644 --- a/cpu/microblaze/cache.c +++ b/cpu/microblaze/cache.c @@ -1,7 +1,7 @@ /* * (C) Copyright 2007 Michal Simek * - * Michal SIMEK <[email protected]> + * Michal SIMEK <[email protected]> * * See file CREDITS for list of people who contributed to this * project. diff --git a/cpu/microblaze/start.S b/cpu/microblaze/start.S index 3c027ff9bb1..8740284ad84 100644 --- a/cpu/microblaze/start.S +++ b/cpu/microblaze/start.S @@ -33,15 +33,13 @@ _start: addi r1, r0, CFG_INIT_SP_OFFSET addi r1, r1, -4 /* Decrement SP to top of memory */ /* add opcode instruction for 32bit jump - 2 instruction imm & brai*/ - addi r6, r0, 0xb000 /* hex b000 opcode imm */ - bslli r6, r6, 16 /* shift */ + addi r6, r0, 0xb0000000 /* hex b000 opcode imm */ swi r6, r0, 0x0 /* reset address */ swi r6, r0, 0x8 /* user vector exception */ swi r6, r0, 0x10 /* interrupt */ swi r6, r0, 0x20 /* hardware exception */ - addi r6, r0, 0xb808 /* hew b808 opcode brai*/ - bslli r6, r6, 16 + addi r6, r0, 0xb8080000 /* hew b808 opcode brai*/ swi r6, r0, 0x4 /* reset address */ swi r6, r0, 0xC /* user vector exception */ swi r6, r0, 0x14 /* interrupt */ diff --git a/cpu/microblaze/timer.c b/cpu/microblaze/timer.c index ab1cb127492..b350453443e 100644 --- a/cpu/microblaze/timer.c +++ b/cpu/microblaze/timer.c @@ -33,10 +33,17 @@ void reset_timer (void) timestamp = 0; } +#ifdef CFG_TIMER_0 ulong get_timer (ulong base) { return (timestamp - base); } +#else +ulong get_timer (ulong base) +{ + return (timestamp++ - base); +} +#endif void set_timer (ulong t) { |
