Xilinx Timer updates
cover Xilinx Timer updates
Patch 1 is trival, just deleted a redundant include that shouldn't be there. Patch 2 is a major bugfix for Microblaze platforms - the timer was deadlocking the system.
Peter A. G. Crosthwaite (2):
xilinx_timer: Removed include of qemu-timer
xilinx_timer: Fixed deadlock issue
hw/xilinx_timer.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.3.2
PATCH 1/2 xilinx_timer: Removed include of qemu-timer
The Xilinx timer does not interact with the qemu_timer API, so dont include it.
--- hw/xilinx_timer.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
hw/xilinx_timer.c +0 -1
@@ -23,7 +23,6 @@*/ #include "sysbus.h" -#include "qemu-timer.h" #include "ptimer.h" #define D (x)
Signature · 1 line
1.7.3.2
PATCH 2/2 xilinx_timer: Fixed deadlock issue
In reply to Peter A. G. CrosthwaiteThe timer was deadlocking when the interval was set too low. It would cause a flood of timer events and the CPU would halt indefinately. This is a known issue and theres a generic workaround in place in ptimer on ptimer_set_limit(), however the Xilinx timer uses ptimer_set_count() instead of set_limit. Changed the call to set_count() to an equivalent call of set_limit() instead, which brings the workaround into play.
--- hw/xilinx_timer.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
hw/xilinx_timer.c +1 -1
@@ -136,7 +136,7 @@ static void timer_enable(struct xlx_timer *xt) count = xt->regs[R_TLR ]; else count = ~0 - xt->regs[R_TLR ]; -ptimer_set_count (xt->ptimer, count); +ptimer_set_limit (xt->ptimer, count,1 );ptimer_run (xt->ptimer,1 ); }
Signature · 1 line
1.7.3.2
Edgar E. Iglesias
AppliedQuoted 7 lines · Peter A. G. Crosthwaite
Patch 1 is trival, just deleted a redundant include that shouldn't be there. Patch 2 is a major bugfix for Microblaze platforms - the timer was deadlocking the system.
Peter A. G. Crosthwaite (2):
xilinx_timer: Removed include of qemu-timer
xilinx_timer: Fixed deadlock issue
Applied, thanks Peter
Quoted 7 lines
hw/xilinx_timer.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)Signature · 1 line
1.7.3.2