Don't use "hz" in identifiers to make AIX happy.
malc found AIX headers leak "hz" and so it can't be used there. Change the occurences in hw/. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5709 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
c89068455d
commit
b0f74c87a1
2
hw/i2c.h
2
hw/i2c.h
@ -68,7 +68,7 @@ void wm8750_dac_dat(void *opaque, uint32_t sample);
|
||||
uint32_t wm8750_adc_dat(void *opaque);
|
||||
void *wm8750_dac_buffer(void *opaque, int samples);
|
||||
void wm8750_dac_commit(void *opaque);
|
||||
void wm8750_set_bclk_in(void *opaque, int hz);
|
||||
void wm8750_set_bclk_in(void *opaque, int new_hz);
|
||||
|
||||
/* ssd0303.c */
|
||||
void ssd0303_init(DisplayState *ds, i2c_bus *bus, int address);
|
||||
|
@ -70,11 +70,11 @@ typedef struct rc4030State
|
||||
static void set_next_tick(rc4030State *s)
|
||||
{
|
||||
qemu_irq_lower(s->timer_irq);
|
||||
uint32_t hz;
|
||||
uint32_t tm_hz;
|
||||
|
||||
hz = 1000 / (s->itr + 1);
|
||||
tm_hz = 1000 / (s->itr + 1);
|
||||
|
||||
qemu_mod_timer(s->periodic_timer, qemu_get_clock(vm_clock) + ticks_per_sec / hz);
|
||||
qemu_mod_timer(s->periodic_timer, qemu_get_clock(vm_clock) + ticks_per_sec / tm_hz);
|
||||
}
|
||||
|
||||
/* called for accesses to rc4030 */
|
||||
|
@ -54,7 +54,7 @@ struct menelaus_s {
|
||||
struct {
|
||||
uint8_t ctrl;
|
||||
uint16_t comp;
|
||||
QEMUTimer *hz;
|
||||
QEMUTimer *hz_tm;
|
||||
int64_t next;
|
||||
struct tm tm;
|
||||
struct tm new;
|
||||
@ -77,12 +77,12 @@ static inline void menelaus_update(struct menelaus_s *s)
|
||||
static inline void menelaus_rtc_start(struct menelaus_s *s)
|
||||
{
|
||||
s->rtc.next =+ qemu_get_clock(rt_clock);
|
||||
qemu_mod_timer(s->rtc.hz, s->rtc.next);
|
||||
qemu_mod_timer(s->rtc.hz_tm, s->rtc.next);
|
||||
}
|
||||
|
||||
static inline void menelaus_rtc_stop(struct menelaus_s *s)
|
||||
{
|
||||
qemu_del_timer(s->rtc.hz);
|
||||
qemu_del_timer(s->rtc.hz_tm);
|
||||
s->rtc.next =- qemu_get_clock(rt_clock);
|
||||
if (s->rtc.next < 1)
|
||||
s->rtc.next = 1;
|
||||
@ -106,7 +106,7 @@ static void menelaus_rtc_hz(void *opaque)
|
||||
s->rtc.next_comp --;
|
||||
s->rtc.alm_sec --;
|
||||
s->rtc.next += 1000;
|
||||
qemu_mod_timer(s->rtc.hz, s->rtc.next);
|
||||
qemu_mod_timer(s->rtc.hz_tm, s->rtc.next);
|
||||
if ((s->rtc.ctrl >> 3) & 3) { /* EVERY */
|
||||
menelaus_rtc_update(s);
|
||||
if (((s->rtc.ctrl >> 3) & 3) == 1 && !s->rtc.tm.tm_sec)
|
||||
@ -886,7 +886,7 @@ i2c_slave *twl92230_init(i2c_bus *bus, qemu_irq irq)
|
||||
s->i2c.send = menelaus_tx;
|
||||
|
||||
s->irq = irq;
|
||||
s->rtc.hz = qemu_new_timer(rt_clock, menelaus_rtc_hz, s);
|
||||
s->rtc.hz_tm = qemu_new_timer(rt_clock, menelaus_rtc_hz, s);
|
||||
s->in = qemu_allocate_irqs(menelaus_gpio_set, s, 3);
|
||||
s->pwrbtn = qemu_allocate_irqs(menelaus_pwrbtn_set, s, 1)[0];
|
||||
|
||||
|
6
hw/vga.c
6
hw/vga.c
@ -169,7 +169,7 @@ static void vga_precise_update_retrace_info(VGAState *s)
|
||||
int div2, sldiv2, dots;
|
||||
int clocking_mode;
|
||||
int clock_sel;
|
||||
const int hz[] = {25175000, 28322000, 25175000, 25175000};
|
||||
const int clk_hz[] = {25175000, 28322000, 25175000, 25175000};
|
||||
int64_t chars_per_sec;
|
||||
struct vga_precise_retrace *r = &s->retrace_info.precise;
|
||||
|
||||
@ -194,7 +194,7 @@ static void vga_precise_update_retrace_info(VGAState *s)
|
||||
clock_sel = (s->msr >> 2) & 3;
|
||||
dots = (s->msr & 1) ? 8 : 9;
|
||||
|
||||
chars_per_sec = hz[clock_sel] / dots;
|
||||
chars_per_sec = clk_hz[clock_sel] / dots;
|
||||
|
||||
htotal_chars <<= clocking_mode;
|
||||
|
||||
@ -239,7 +239,7 @@ static void vga_precise_update_retrace_info(VGAState *s)
|
||||
div2, sldiv2,
|
||||
clocking_mode,
|
||||
clock_sel,
|
||||
hz[clock_sel],
|
||||
clk_hz[clock_sel],
|
||||
dots,
|
||||
r->ticks_per_char
|
||||
);
|
||||
|
@ -723,11 +723,11 @@ uint32_t wm8750_adc_dat(void *opaque)
|
||||
return *data;
|
||||
}
|
||||
|
||||
void wm8750_set_bclk_in(void *opaque, int hz)
|
||||
void wm8750_set_bclk_in(void *opaque, int new_hz)
|
||||
{
|
||||
struct wm8750_s *s = (struct wm8750_s *) opaque;
|
||||
|
||||
s->ext_adc_hz = hz;
|
||||
s->ext_dac_hz = hz;
|
||||
s->ext_adc_hz = new_hz;
|
||||
s->ext_dac_hz = new_hz;
|
||||
wm8750_clk_update(s, 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user