From c0a1dcb9f0baf9269f8baeb02cbcca8dad75454c Mon Sep 17 00:00:00 2001 From: "Peter A. G. Crosthwaite" Date: Thu, 28 Jun 2012 12:52:23 +1000 Subject: xilinx_timer: Removed comma in device name Fixes an error in a61e4b07a30c062260d2d01771773f14820d1eb7 Signed-off-by: Peter A. G. Crosthwaite --- hw/xilinx_timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/xilinx_timer.c') diff --git a/hw/xilinx_timer.c b/hw/xilinx_timer.c index b562bd0..053ba02 100644 --- a/hw/xilinx_timer.c +++ b/hw/xilinx_timer.c @@ -217,7 +217,7 @@ static int xilinx_timer_init(SysBusDevice *dev) ptimer_set_freq(xt->ptimer, t->freq_hz); } - memory_region_init_io(&t->mmio, &timer_ops, t, "xlnx,xps-timer", + memory_region_init_io(&t->mmio, &timer_ops, t, "xlnx.xps-timer", R_MAX * 4 * num_timers(t)); sysbus_init_mmio(dev, &t->mmio); return 0; @@ -239,7 +239,7 @@ static void xilinx_timer_class_init(ObjectClass *klass, void *data) } static TypeInfo xilinx_timer_info = { - .name = "xlnx,xps-timer", + .name = "xlnx.xps-timer", .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(struct timerblock), .class_init = xilinx_timer_class_init, -- cgit v1.1 From e03377ae75808d33d0a7afc803b37bcda9f796b3 Mon Sep 17 00:00:00 2001 From: "Peter A. G. Crosthwaite" Date: Thu, 28 Jun 2012 16:28:03 +1000 Subject: xilinx_timer: Send dbg msgs to stderr not stdout Signed-off-by: Peter A. G. Crosthwaite --- hw/xilinx_timer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hw/xilinx_timer.c') diff --git a/hw/xilinx_timer.c b/hw/xilinx_timer.c index 053ba02..c02e6ca 100644 --- a/hw/xilinx_timer.c +++ b/hw/xilinx_timer.c @@ -119,7 +119,7 @@ timer_read(void *opaque, target_phys_addr_t addr, unsigned int size) break; } - D(printf("%s timer=%d %x=%x\n", __func__, timer, addr * 4, r)); + D(fprintf(stderr, "%s timer=%d %x=%x\n", __func__, timer, addr * 4, r)); return r; } @@ -127,7 +127,7 @@ static void timer_enable(struct xlx_timer *xt) { uint64_t count; - D(printf("%s timer=%d down=%d\n", __func__, + D(fprintf(stderr, "%s timer=%d down=%d\n", __func__, xt->nr, xt->regs[R_TCSR] & TCSR_UDT)); ptimer_stop(xt->ptimer); @@ -152,7 +152,7 @@ timer_write(void *opaque, target_phys_addr_t addr, addr >>= 2; timer = timer_from_addr(addr); xt = &t->timers[timer]; - D(printf("%s addr=%x val=%x (timer=%d off=%d)\n", + D(fprintf(stderr, "%s addr=%x val=%x (timer=%d off=%d)\n", __func__, addr * 4, value, timer, addr & 3)); /* Further decoding to address a specific timers reg. */ addr &= 3; @@ -189,7 +189,7 @@ static void timer_hit(void *opaque) { struct xlx_timer *xt = opaque; struct timerblock *t = xt->parent; - D(printf("%s %d\n", __func__, timer)); + D(fprintf(stderr, "%s %d\n", __func__, timer)); xt->regs[R_TCSR] |= TCSR_TINT; if (xt->regs[R_TCSR] & TCSR_ARHT) -- cgit v1.1 From 919f89f44c7e3a8dee6a0f0eebd0cc81766da612 Mon Sep 17 00:00:00 2001 From: "Peter A. G. Crosthwaite" Date: Fri, 29 Jun 2012 13:20:46 +1000 Subject: xilinx_timer: Fixed "frequency" prop name The "frequency" qdev prop matches the "clock-frequency" property in Xilinx EDK. Renamed "frequency" -> "clock-frequency" accordingly. Signed-off-by: Peter A. G. Crosthwaite --- hw/xilinx_timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hw/xilinx_timer.c') diff --git a/hw/xilinx_timer.c b/hw/xilinx_timer.c index c02e6ca..9eb5ef7 100644 --- a/hw/xilinx_timer.c +++ b/hw/xilinx_timer.c @@ -224,7 +224,8 @@ static int xilinx_timer_init(SysBusDevice *dev) } static Property xilinx_timer_properties[] = { - DEFINE_PROP_UINT32("frequency", struct timerblock, freq_hz, 62 * 1000000), + DEFINE_PROP_UINT32("clock-frequency", struct timerblock, freq_hz, + 62 * 1000000), DEFINE_PROP_UINT8("one-timer-only", struct timerblock, one_timer_only, 0), DEFINE_PROP_END_OF_LIST(), }; -- cgit v1.1 From 8354cd722e0afae63bee3e4cb21c8f0ddb6874c2 Mon Sep 17 00:00:00 2001 From: Chris Wulff Date: Sun, 9 Sep 2012 20:20:07 -0400 Subject: xilinx_timer: Fix a compile error if debug enabled There was a missing include of qemu-log and a variable name in a printf was out of date. Signed-off-by: Chris Wulff Signed-off-by: Peter A. G. Crosthwaite --- hw/xilinx_timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hw/xilinx_timer.c') diff --git a/hw/xilinx_timer.c b/hw/xilinx_timer.c index 9eb5ef7..2e48ca2 100644 --- a/hw/xilinx_timer.c +++ b/hw/xilinx_timer.c @@ -24,6 +24,7 @@ #include "sysbus.h" #include "ptimer.h" +#include "qemu-log.h" #define D(x) @@ -189,7 +190,7 @@ static void timer_hit(void *opaque) { struct xlx_timer *xt = opaque; struct timerblock *t = xt->parent; - D(fprintf(stderr, "%s %d\n", __func__, timer)); + D(fprintf(stderr, "%s %d\n", __func__, xt->nr)); xt->regs[R_TCSR] |= TCSR_TINT; if (xt->regs[R_TCSR] & TCSR_ARHT) -- cgit v1.1 From a8170e5e97ad17ca169c64ba87ae2f53850dab4c Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Tue, 23 Oct 2012 12:30:10 +0200 Subject: Rename target_phys_addr_t to hwaddr target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are reserved) and its purpose doesn't match the name (most target_phys_addr_t addresses are not target specific). Replace it with a finger-friendly, standards conformant hwaddr. Outstanding patchsets can be fixed up with the command git rebase -i --exec 'find -name "*.[ch]" | xargs s/target_phys_addr_t/hwaddr/g' origin Signed-off-by: Avi Kivity Signed-off-by: Anthony Liguori --- hw/xilinx_timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hw/xilinx_timer.c') diff --git a/hw/xilinx_timer.c b/hw/xilinx_timer.c index 2e48ca2..2b01dc2 100644 --- a/hw/xilinx_timer.c +++ b/hw/xilinx_timer.c @@ -72,7 +72,7 @@ static inline unsigned int num_timers(struct timerblock *t) return 2 - t->one_timer_only; } -static inline unsigned int timer_from_addr(target_phys_addr_t addr) +static inline unsigned int timer_from_addr(hwaddr addr) { /* Timers get a 4x32bit control reg area each. */ return addr >> 2; @@ -93,7 +93,7 @@ static void timer_update_irq(struct timerblock *t) } static uint64_t -timer_read(void *opaque, target_phys_addr_t addr, unsigned int size) +timer_read(void *opaque, hwaddr addr, unsigned int size) { struct timerblock *t = opaque; struct xlx_timer *xt; @@ -142,7 +142,7 @@ static void timer_enable(struct xlx_timer *xt) } static void -timer_write(void *opaque, target_phys_addr_t addr, +timer_write(void *opaque, hwaddr addr, uint64_t val64, unsigned int size) { struct timerblock *t = opaque; -- cgit v1.1 From 1de7afc984b49af164e2619e6850b9732b173b34 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 17 Dec 2012 18:20:00 +0100 Subject: misc: move include files to include/qemu/ Signed-off-by: Paolo Bonzini --- hw/xilinx_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/xilinx_timer.c') diff --git a/hw/xilinx_timer.c b/hw/xilinx_timer.c index 2b01dc2..69294bb 100644 --- a/hw/xilinx_timer.c +++ b/hw/xilinx_timer.c @@ -24,7 +24,7 @@ #include "sysbus.h" #include "ptimer.h" -#include "qemu-log.h" +#include "qemu/log.h" #define D(x) -- cgit v1.1