ptimer: move declarations to ptimer.h
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 13 Jan 2012 16:07:19 +0000 (17:07 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 13 Jan 2012 16:20:50 +0000 (10:20 -0600)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
18 files changed:
hw/arm_timer.c
hw/etraxfs_timer.c
hw/grlib_apbuart.c
hw/grlib_gptimer.c
hw/lan9118.c
hw/leon3.c
hw/lm32_timer.c
hw/mcf5206.c
hw/mcf5208.c
hw/milkymist-sysctl.c
hw/musicpal.c
hw/ptimer.c
hw/ptimer.h [new file with mode: 0644]
hw/sh_timer.c
hw/slavio_timer.c
hw/xilinx_axidma.c
hw/xilinx_timer.c
qemu-timer.h

index 60e1c63ab6aba958ebd58380cf766f490d9c2a21..1902f1a7b9a916c46a1682a3be18d9c1e73329ff 100644 (file)
@@ -11,6 +11,7 @@
 #include "qemu-timer.h"
 #include "qemu-common.h"
 #include "qdev.h"
+#include "ptimer.h"
 
 /* Common timer implementation.  */
 
index 319cee130b897fb497ecd09b3d5ca51abaebb91f..2dfdb3063e634d8940dfcc2a877ad2139340bfd7 100644 (file)
@@ -24,6 +24,7 @@
 #include "sysbus.h"
 #include "sysemu.h"
 #include "qemu-timer.h"
+#include "ptimer.h"
 
 #define D(x)
 
index 62bdb03a9c0def8aab3b26c49c4d42f2526deb07..f8a64e1644a0a1e9ad4da75006c9963eff208a8d 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "sysbus.h"
 #include "qemu-char.h"
+#include "ptimer.h"
 
 #include "trace.h"
 
index 5645054c3c18727c1964a7f42b77b14f30c2d688..9c98a830d74339c399fa54420ed4372fcd86aabd 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "sysbus.h"
 #include "qemu-timer.h"
+#include "ptimer.h"
 
 #include "trace.h"
 
index 7e64c5dee3979e5364eb7eb19a47ccc5eedf30f0..341a52142f4606e288de1d4edd6e3ec157b8d1a5 100644 (file)
@@ -11,6 +11,7 @@
 #include "net.h"
 #include "devices.h"
 #include "sysemu.h"
+#include "ptimer.h"
 /* For crc32 */
 #include <zlib.h>
 
index e25bb046a763f3df841524ea126404fedde7ee85..71d79a65a7ecd903977262592bf97f5a7896d75c 100644 (file)
@@ -23,6 +23,7 @@
  */
 #include "hw.h"
 #include "qemu-timer.h"
+#include "ptimer.h"
 #include "qemu-char.h"
 #include "sysemu.h"
 #include "boards.h"
index 445847f1ce0be0e6455c77f880ec7cf1590c09a5..115e1e968f2b554ad62c8903d11d69550c7463aa 100644 (file)
@@ -25,6 +25,7 @@
 #include "sysbus.h"
 #include "trace.h"
 #include "qemu-timer.h"
+#include "ptimer.h"
 #include "qemu-error.h"
 
 #define DEFAULT_FREQUENCY (50*1000000)
index 7b6d501447c339afb18cc419891fc450bfe661d4..5110d833af1a9a0f9b053680fc2dd6e0f2a2a8a1 100644 (file)
@@ -8,6 +8,7 @@
 #include "hw.h"
 #include "mcf.h"
 #include "qemu-timer.h"
+#include "ptimer.h"
 #include "sysemu.h"
 #include "exec-memory.h"
 
index 3b0636dc2f4c5e8999cefe0d1b43130a03820d78..aa11a755cc97b84c3bf3d6d5cc6c8f052fa4e67a 100644 (file)
@@ -8,6 +8,7 @@
 #include "hw.h"
 #include "mcf.h"
 #include "qemu-timer.h"
+#include "ptimer.h"
 #include "sysemu.h"
 #include "net.h"
 #include "boards.h"
index 6326b70abb336c2d520925d688ce36c492e45159..bd2a298d2eafcf24384e047b28d1bacac9cc8b03 100644 (file)
@@ -26,6 +26,7 @@
 #include "sysemu.h"
 #include "trace.h"
 #include "qemu-timer.h"
+#include "ptimer.h"
 #include "qemu-error.h"
 
 enum {
index a01e3d2d92043dd9c604df6426944b07e29f823c..522559d4b7d2f75304827fba5fff08121a51c779 100644 (file)
@@ -14,6 +14,7 @@
 #include "boards.h"
 #include "pc.h"
 #include "qemu-timer.h"
+#include "ptimer.h"
 #include "block.h"
 #include "flash.h"
 #include "console.h"
index b6cabd5b7d05613753d1408bc9775e72190270c5..de7d6643ad12c6472509a4153d4e30925a02dc1e 100644 (file)
@@ -7,6 +7,7 @@
  */
 #include "hw.h"
 #include "qemu-timer.h"
+#include "ptimer.h"
 #include "host-utils.h"
 
 struct ptimer_state
diff --git a/hw/ptimer.h b/hw/ptimer.h
new file mode 100644 (file)
index 0000000..69cdddc
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * General purpose implementation of a simple periodic countdown timer.
+ *
+ * Copyright (c) 2007 CodeSourcery.
+ *
+ * This code is licensed under the GNU LGPL.
+ */
+#ifndef PTIMER_H
+#define PTIMER_H
+
+#include "qemu-common.h"
+#include "qemu-timer.h"
+
+/* ptimer.c */
+typedef struct ptimer_state ptimer_state;
+typedef void (*ptimer_cb)(void *opaque);
+
+ptimer_state *ptimer_init(QEMUBH *bh);
+void ptimer_set_period(ptimer_state *s, int64_t period);
+void ptimer_set_freq(ptimer_state *s, uint32_t freq);
+void ptimer_set_limit(ptimer_state *s, uint64_t limit, int reload);
+uint64_t ptimer_get_count(ptimer_state *s);
+void ptimer_set_count(ptimer_state *s, uint64_t count);
+void ptimer_run(ptimer_state *s, int oneshot);
+void ptimer_stop(ptimer_state *s);
+
+#endif
index d2c0cec835ce6e8346cc361934d8d1e7fafe3fa3..64bf604ba4986e14ca2f7d80978e679499549d89 100644 (file)
@@ -12,6 +12,7 @@
 #include "sh.h"
 #include "qemu-timer.h"
 #include "exec-memory.h"
+#include "ptimer.h"
 
 //#define DEBUG_TIMER
 
index 2353c43bdaadf53b37965506945484932f42ff96..44b500a5fa85d94c0951cf377e0d12145f6a1c01 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "sun4m.h"
 #include "qemu-timer.h"
+#include "ptimer.h"
 #include "sysbus.h"
 #include "trace.h"
 
index 596ec0ed688efdd4c208491f00a7a1d6a3623f26..0da20d95651048e0e930ca030a23f1cd7314b1fd 100644 (file)
@@ -25,6 +25,7 @@
 #include "sysbus.h"
 #include "qemu-char.h"
 #include "qemu-timer.h"
+#include "ptimer.h"
 #include "qemu-log.h"
 #include "qdev-addr.h"
 
index 0b2f32a3af18adedfb5b94025ae2677516b3d683..adca53b98cb02aa7b48a8a303c2dff26320c443f 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "sysbus.h"
 #include "qemu-timer.h"
+#include "ptimer.h"
 
 #define D(x)
 
index 67ca72e045cec2bd1d23e3d62e583507143c8761..de17f3b1a1fc0c5ccd42a8ba6364abdbc8476edf 100644 (file)
@@ -139,19 +139,6 @@ static inline int64_t get_clock(void)
 void qemu_get_timer(QEMUFile *f, QEMUTimer *ts);
 void qemu_put_timer(QEMUFile *f, QEMUTimer *ts);
 
-/* ptimer.c */
-typedef struct ptimer_state ptimer_state;
-typedef void (*ptimer_cb)(void *opaque);
-
-ptimer_state *ptimer_init(QEMUBH *bh);
-void ptimer_set_period(ptimer_state *s, int64_t period);
-void ptimer_set_freq(ptimer_state *s, uint32_t freq);
-void ptimer_set_limit(ptimer_state *s, uint64_t limit, int reload);
-uint64_t ptimer_get_count(ptimer_state *s);
-void ptimer_set_count(ptimer_state *s, uint64_t count);
-void ptimer_run(ptimer_state *s, int oneshot);
-void ptimer_stop(ptimer_state *s);
-
 /* icount */
 int64_t cpu_get_icount(void);
 int64_t cpu_get_clock(void);