mirror of
https://github.com/gwenhael-le-moine/x49gp.git
synced 2024-12-26 21:58:41 +01:00
fix warnings on 64bit for all debug output
This commit is contained in:
parent
1e49bdb159
commit
1f19c8009c
14 changed files with 62 additions and 62 deletions
|
@ -66,9 +66,9 @@ s3c2410_adc_read(void *opaque, target_phys_addr_t offset)
|
|||
reg = S3C2410_OFFSET_ENTRY(adc, offset);
|
||||
|
||||
#ifdef DEBUG_S3C2410_ADC
|
||||
printf("read %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("read %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-adc", S3C2410_ADC_BASE,
|
||||
reg->name, offset, *(reg->datap));
|
||||
reg->name, (unsigned long) offset, *(reg->datap));
|
||||
#endif
|
||||
|
||||
switch (offset) {
|
||||
|
@ -99,9 +99,9 @@ s3c2410_adc_write(void *opaque, target_phys_addr_t offset, uint32_t data)
|
|||
reg = S3C2410_OFFSET_ENTRY(adc, offset);
|
||||
|
||||
#ifdef DEBUG_S3C2410_ADC
|
||||
printf("write %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("write %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-adc", S3C2410_ADC_BASE,
|
||||
reg->name, offset, data);
|
||||
reg->name, (unsigned long) offset, data);
|
||||
#endif
|
||||
|
||||
*(reg->datap) = data;
|
||||
|
|
|
@ -514,9 +514,9 @@ s3c2410_intc_read(void *opaque, target_phys_addr_t offset)
|
|||
}
|
||||
|
||||
#ifdef DEBUG_S3C2410_INTC
|
||||
printf("read %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("read %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-intc", S3C2410_INTC_BASE,
|
||||
reg->name, offset, data);
|
||||
reg->name, (unsigned long) offset, data);
|
||||
#endif
|
||||
|
||||
return data;
|
||||
|
@ -540,9 +540,9 @@ s3c2410_intc_write(void *opaque, target_phys_addr_t offset, uint32_t data)
|
|||
#ifdef DEBUG_S3C2410_INTC
|
||||
reg = S3C2410_OFFSET_ENTRY(intc, offset);
|
||||
|
||||
printf("write %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("write %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-intc", S3C2410_INTC_BASE,
|
||||
reg->name, offset, data);
|
||||
reg->name, (unsigned long) offset, data);
|
||||
#endif
|
||||
|
||||
switch (offset) {
|
||||
|
|
|
@ -262,9 +262,9 @@ s3c2410_io_port_read(void *opaque, target_phys_addr_t offset)
|
|||
}
|
||||
|
||||
#ifdef DEBUG_S3C2410_IO_PORT
|
||||
printf("read %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("read %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-io-port", S3C2410_IO_PORT_BASE,
|
||||
reg->name, offset, *(reg->datap));
|
||||
reg->name, (unsigned long) offset, *(reg->datap));
|
||||
#endif
|
||||
|
||||
return *(reg->datap);
|
||||
|
@ -288,9 +288,9 @@ static uint32_t lcd_data = 0;
|
|||
reg = S3C2410_OFFSET_ENTRY(io, offset);
|
||||
|
||||
#ifdef DEBUG_S3C2410_IO_PORT
|
||||
printf("write %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("write %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-io-port", S3C2410_IO_PORT_BASE,
|
||||
reg->name, offset, data);
|
||||
reg->name, (unsigned long) offset, data);
|
||||
#endif
|
||||
|
||||
switch (offset) {
|
||||
|
|
|
@ -211,9 +211,9 @@ s3c2410_lcd_read(void *opaque, target_phys_addr_t offset)
|
|||
}
|
||||
|
||||
#ifdef DEBUG_S3C2410_LCD
|
||||
printf("read %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("read %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-lcd", S3C2410_LCD_BASE,
|
||||
reg->name, offset, *(reg->datap));
|
||||
reg->name, (unsigned long) offset, *(reg->datap));
|
||||
#endif
|
||||
|
||||
return *(reg->datap);
|
||||
|
@ -236,9 +236,9 @@ s3c2410_lcd_write(void *opaque, target_phys_addr_t offset, uint32_t data)
|
|||
reg = S3C2410_OFFSET_ENTRY(lcd, offset);
|
||||
|
||||
#ifdef DEBUG_S3C2410_LCD
|
||||
printf("write %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("write %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-lcd", S3C2410_LCD_BASE,
|
||||
reg->name, offset, data);
|
||||
reg->name, (unsigned long) offset, data);
|
||||
#endif
|
||||
|
||||
switch (offset) {
|
||||
|
|
|
@ -84,9 +84,9 @@ s3c2410_memc_read(void *opaque, target_phys_addr_t offset)
|
|||
reg = S3C2410_OFFSET_ENTRY(memc, offset);
|
||||
|
||||
#ifdef DEBUG_S3C2410_MEMC
|
||||
printf("read %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("read %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-memc", S3C2410_MEMC_BASE,
|
||||
reg->name, offset, *(reg->datap));
|
||||
reg->name, (unsigned long) offset, *(reg->datap));
|
||||
#endif
|
||||
|
||||
return *(reg->datap);
|
||||
|
@ -108,9 +108,9 @@ s3c2410_memc_write(void *opaque, target_phys_addr_t offset, uint32_t data)
|
|||
reg = S3C2410_OFFSET_ENTRY(memc, offset);
|
||||
|
||||
#ifdef DEBUG_S3C2410_MEMC
|
||||
printf("write %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("write %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-memc", S3C2410_MEMC_BASE,
|
||||
reg->name, offset, data);
|
||||
reg->name, (unsigned long) offset, data);
|
||||
#endif
|
||||
|
||||
*(reg->datap) = data;
|
||||
|
|
|
@ -72,9 +72,9 @@ s3c2410_power_read(void *opaque, target_phys_addr_t offset)
|
|||
reg = S3C2410_OFFSET_ENTRY(power, offset);
|
||||
|
||||
#ifdef DEBUG_S3C2410_POWER
|
||||
printf("read %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("read %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-power", S3C2410_POWER_BASE,
|
||||
reg->name, offset, *(reg->datap));
|
||||
reg->name, (unsigned long) offset, *(reg->datap));
|
||||
#endif
|
||||
|
||||
return *(reg->datap);
|
||||
|
@ -100,9 +100,9 @@ s3c2410_power_write(void *opaque, target_phys_addr_t offset, uint32_t data)
|
|||
reg = S3C2410_OFFSET_ENTRY(power, offset);
|
||||
|
||||
#ifdef DEBUG_S3C2410_POWER
|
||||
printf("write %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("write %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-power", S3C2410_POWER_BASE,
|
||||
reg->name, offset, data);
|
||||
reg->name, (unsigned long) offset, data);
|
||||
#endif
|
||||
|
||||
switch (offset) {
|
||||
|
|
|
@ -120,7 +120,7 @@ s3c2410_rtc_timeout(void * user_data)
|
|||
us = 1000;
|
||||
|
||||
#ifdef DEBUG_S3C2410_RTC
|
||||
printf("RTC: restart TICK timer (%llu us)\n", us);
|
||||
printf("RTC: restart TICK timer (%llu us)\n", (unsigned long long) us);
|
||||
#endif
|
||||
|
||||
x49gp_mod_timer(rtc->tick_timer, rtc->expires);
|
||||
|
@ -156,7 +156,7 @@ s3c2410_rtc_set_ticnt(s3c2410_rtc_t *rtc)
|
|||
us = 1000;
|
||||
|
||||
#ifdef DEBUG_S3C2410_RTC
|
||||
printf("RTC: start TICK timer (%lld us)\n", us);
|
||||
printf("RTC: start TICK timer (%lld us)\n", (unsigned long long) us);
|
||||
#endif
|
||||
|
||||
x49gp_mod_timer(rtc->tick_timer, rtc->expires);
|
||||
|
@ -216,7 +216,7 @@ s3c2410_rtc_alarm(void * user_data)
|
|||
}
|
||||
|
||||
#ifdef DEBUG_S3C2410_RTC
|
||||
printf("RTC: reload ALARM timer (%lld us)\n", us);
|
||||
printf("RTC: reload ALARM timer (%lld us)\n", (unsigned long long) us);
|
||||
#endif
|
||||
|
||||
x49gp_mod_timer(rtc->alarm_timer, now + us);
|
||||
|
@ -239,7 +239,7 @@ s3c2410_rtc_set_rtcalm(s3c2410_rtc_t *rtc)
|
|||
us = 1000000LL - tv.tv_usec;
|
||||
|
||||
#ifdef DEBUG_S3C2410_RTC
|
||||
printf("RTC: start ALARM timer (%lld us)\n", us);
|
||||
printf("RTC: start ALARM timer (%lld us)\n", (unsigned long long) us);
|
||||
#endif
|
||||
|
||||
x49gp_mod_timer(rtc->alarm_timer, now + us);
|
||||
|
@ -294,9 +294,9 @@ s3c2410_rtc_read(void *opaque, target_phys_addr_t offset)
|
|||
}
|
||||
|
||||
#ifdef DEBUG_S3C2410_RTC
|
||||
printf("read %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("read %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-rtc", S3C2410_RTC_BASE,
|
||||
reg->name, offset, *(reg->datap));
|
||||
reg->name, (unsigned long) offset, *(reg->datap));
|
||||
#endif
|
||||
|
||||
return *(reg->datap);
|
||||
|
@ -318,9 +318,9 @@ s3c2410_rtc_write(void *opaque, target_phys_addr_t offset, uint32_t data)
|
|||
reg = S3C2410_OFFSET_ENTRY(rtc, offset);
|
||||
|
||||
#ifdef DEBUG_S3C2410_RTC
|
||||
printf("write %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("write %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-rtc", S3C2410_RTC_BASE,
|
||||
reg->name, offset, data);
|
||||
reg->name, (unsigned long) offset, data);
|
||||
#endif
|
||||
|
||||
switch (offset) {
|
||||
|
|
|
@ -291,9 +291,9 @@ s3c2410_sdi_read(void *opaque, target_phys_addr_t offset)
|
|||
}
|
||||
|
||||
#ifdef DEBUG_S3C2410_SDI
|
||||
printf("read %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("read %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-sdi", S3C2410_SDI_BASE,
|
||||
reg->name, offset, *(reg->datap));
|
||||
reg->name, (unsigned long) offset, *(reg->datap));
|
||||
#endif
|
||||
|
||||
return *(reg->datap);
|
||||
|
@ -316,9 +316,9 @@ s3c2410_sdi_write(void *opaque, target_phys_addr_t offset, uint32_t data)
|
|||
reg = S3C2410_OFFSET_ENTRY(sdi, offset);
|
||||
|
||||
#ifdef DEBUG_S3C2410_SDI
|
||||
printf("write %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("write %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-sdi", S3C2410_SDI_BASE,
|
||||
reg->name, offset, data);
|
||||
reg->name, (unsigned long) offset, data);
|
||||
#endif
|
||||
|
||||
switch (offset) {
|
||||
|
|
|
@ -84,9 +84,9 @@ s3c2410_spi_read(void *opaque, target_phys_addr_t offset)
|
|||
reg = S3C2410_OFFSET_ENTRY(spi, offset);
|
||||
|
||||
#ifdef DEBUG_S3C2410_SPI
|
||||
printf("read %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("read %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-spi", S3C2410_SPI_BASE,
|
||||
reg->name, offset, *(reg->datap));
|
||||
reg->name, (unsigned long) offset, *(reg->datap));
|
||||
#endif
|
||||
|
||||
switch (offset) {
|
||||
|
@ -119,9 +119,9 @@ s3c2410_spi_write(void *opaque, target_phys_addr_t offset, uint32_t data)
|
|||
reg = S3C2410_OFFSET_ENTRY(spi, offset);
|
||||
|
||||
#ifdef DEBUG_S3C2410_SPI
|
||||
printf("write %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("write %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-spi", S3C2410_SPI_BASE,
|
||||
reg->name, offset, data);
|
||||
reg->name, (unsigned long) offset, data);
|
||||
#endif
|
||||
|
||||
*(reg->datap) = data;
|
||||
|
|
|
@ -140,7 +140,7 @@ s3c2410_timer_timeout(void *data)
|
|||
|
||||
timeout = 1000000LL * t->tcnt * t->interval / x49gp->PCLK;
|
||||
#ifdef DEBUG_S3C2410_TIMER
|
||||
printf("s3c2410-timer: reload TIMER%u: CNT %u (%lu PCLKs): %llu us\n", t->index, t->tcnt, t->interval, timeout);
|
||||
printf("s3c2410-timer: reload TIMER%u: CNT %u (%lu PCLKs): %llu us\n", t->index, t->tcnt, t->interval, (unsigned long long) timeout);
|
||||
#endif
|
||||
x49gp_mod_timer(t->timer, x49gp_get_clock() + timeout);
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ s3c2410_update_tcfg(s3c2410_timer_t *timer)
|
|||
if (x49gp_timer_pending(t->timer)) {
|
||||
timeout = 1000000LL * t->tcnt * t->interval / x49gp->PCLK;
|
||||
#ifdef DEBUG_S3C2410_TIMER
|
||||
printf("s3c2410-timer: mod TIMER%u: CNT %u (%lu PCLKs): %llu us\n", t->index, t->tcnt, t->interval, timeout);
|
||||
printf("s3c2410-timer: mod TIMER%u: CNT %u (%lu PCLKs): %llu us\n", t->index, t->tcnt, t->interval, (unsigned long long) timeout);
|
||||
#endif
|
||||
x49gp_mod_timer(t->timer, x49gp_get_clock() + timeout);
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ s3c2410_update_tcon(s3c2410_timer_t *timer)
|
|||
if (timer->tcon & t->tconfig->start_bit) {
|
||||
timeout = 1000000LL * t->tcnt * t->interval / x49gp->PCLK;
|
||||
#ifdef DEBUG_S3C2410_TIMER
|
||||
printf("s3c2410-timer: start TIMER%u: CNT %u (%lu PCLKs): %llu us\n", t->index, t->tcnt, t->interval, timeout);
|
||||
printf("s3c2410-timer: start TIMER%u: CNT %u (%lu PCLKs): %llu us\n", t->index, t->tcnt, t->interval, (unsigned long long) timeout);
|
||||
#endif
|
||||
x49gp_mod_timer(t->timer, x49gp_get_clock() + timeout);
|
||||
} else {
|
||||
|
@ -329,9 +329,9 @@ s3c2410_timer_read(void *opaque, target_phys_addr_t offset)
|
|||
}
|
||||
|
||||
#ifdef DEBUG_S3C2410_TIMER
|
||||
printf("read %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("read %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-timer", S3C2410_TIMER_BASE,
|
||||
reg->name, offset, data);
|
||||
reg->name, (unsigned long) offset, data);
|
||||
#endif
|
||||
|
||||
return data;
|
||||
|
@ -353,9 +353,9 @@ s3c2410_timer_write(void *opaque, target_phys_addr_t offset, uint32_t data)
|
|||
reg = S3C2410_OFFSET_ENTRY(timer, offset);
|
||||
|
||||
#ifdef DEBUG_S3C2410_TIMER
|
||||
printf("write %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("write %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-timer", S3C2410_TIMER_BASE,
|
||||
reg->name, offset, data);
|
||||
reg->name, (unsigned long) offset, data);
|
||||
#endif
|
||||
|
||||
switch (offset) {
|
||||
|
|
|
@ -164,8 +164,8 @@ s3c2410_uart_read(void *opaque, target_phys_addr_t offset)
|
|||
reg = S3C2410_OFFSET_ENTRY(uart_regs, offset);
|
||||
|
||||
#ifdef DEBUG_S3C2410_UART
|
||||
printf("read %s [%08x] %s [%08x] data %08x\n",
|
||||
module, base, reg->name, offset, *(reg->datap));
|
||||
printf("read %s [%08x] %s [%08lx] data %08x\n",
|
||||
module, mod_offset, reg->name, (unsigned long) offset, *(reg->datap));
|
||||
#endif
|
||||
|
||||
switch (offset) {
|
||||
|
@ -223,8 +223,8 @@ s3c2410_uart_write(void *opaque, target_phys_addr_t offset, uint32_t data)
|
|||
reg = S3C2410_OFFSET_ENTRY(uart_regs, offset);
|
||||
|
||||
#ifdef DEBUG_S3C2410_UART
|
||||
printf("write %s [%08x] %s [%08x] data %08x\n",
|
||||
module, mod_offset, reg->name, offset, data);
|
||||
printf("write %s [%08x] %s [%08lx] data %08x\n",
|
||||
module, mod_offset, reg->name, (unsigned long) offset, data);
|
||||
#endif
|
||||
|
||||
*(reg->datap) = data;
|
||||
|
|
|
@ -148,9 +148,9 @@ s3c2410_usbdev_read(void *opaque, target_phys_addr_t offset)
|
|||
reg = S3C2410_OFFSET_ENTRY(usbdev, offset);
|
||||
|
||||
#ifdef DEBUG_S3C2410_USBDEV
|
||||
printf("read %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("read %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-usbdev", S3C2410_USBDEV_BASE,
|
||||
reg->name, offset, *(reg->datap));
|
||||
reg->name, (unsigned long) offset, *(reg->datap));
|
||||
#endif
|
||||
|
||||
return *(reg->datap);
|
||||
|
@ -172,9 +172,9 @@ s3c2410_usbdev_write(void *opaque, target_phys_addr_t offset, uint32_t data)
|
|||
reg = S3C2410_OFFSET_ENTRY(usbdev, offset);
|
||||
|
||||
#ifdef DEBUG_S3C2410_USBDEV
|
||||
printf("write %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("write %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-usbdev", S3C2410_USBDEV_BASE,
|
||||
reg->name, offset, data);
|
||||
reg->name, (unsigned long) offset, data);
|
||||
#endif
|
||||
|
||||
*(reg->datap) = data;
|
||||
|
|
|
@ -127,7 +127,7 @@ s3c2410_watchdog_next_interrupt(x49gp_t *x49gp)
|
|||
|
||||
#ifdef DEBUG_S3C2410_WATCHDOG
|
||||
printf("WATCHDOG: wtcnt %u, interval %lu, expires %llu, next irq %lu\n",
|
||||
watchdog->wtcnt, watchdog->interval, x49gp_timer_pending(watchdog->timer) ? x49gp_timer_expires(watchdog->timer) : 0, irq);
|
||||
watchdog->wtcnt, watchdog->interval, (unsigned long long) (x49gp_timer_pending(watchdog->timer) ? x49gp_timer_expires(watchdog->timer) : 0), irq);
|
||||
#endif
|
||||
|
||||
return irq;
|
||||
|
@ -175,9 +175,9 @@ s3c2410_watchdog_read(void *opaque, target_phys_addr_t offset)
|
|||
|
||||
|
||||
#ifdef DEBUG_S3C2410_WATCHDOG
|
||||
printf("read %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("read %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-watchdog", S3C2410_WATCHDOG_BASE,
|
||||
reg->name, offset, *(reg->datap));
|
||||
reg->name, (unsigned long) offset, *(reg->datap));
|
||||
#endif
|
||||
|
||||
return *(reg->datap);
|
||||
|
@ -199,9 +199,9 @@ s3c2410_watchdog_write(void *opaque, target_phys_addr_t offset, uint32_t data)
|
|||
reg = S3C2410_OFFSET_ENTRY(watchdog, offset);
|
||||
|
||||
#ifdef DEBUG_S3C2410_WATCHDOG
|
||||
printf("write %s [%08x] %s [%08x] data %08x\n",
|
||||
printf("write %s [%08x] %s [%08lx] data %08x\n",
|
||||
"s3c2410-watchdog", S3C2410_WATCHDOG_BASE,
|
||||
reg->name, offset, data);
|
||||
reg->name, (unsigned long) offset, data);
|
||||
#endif
|
||||
|
||||
*(reg->datap) = data;
|
||||
|
|
4
timer.c
4
timer.c
|
@ -262,11 +262,11 @@ x49gp_main_loop(x49gp_t *x49gp)
|
|||
|
||||
if (x49gp->arm_idle == X49GP_ARM_RUN) {
|
||||
#ifdef DEBUG_X49GP_TIMER_IDLE
|
||||
printf("%lld: %s: call cpu_exec(%p)\n", x49gp_get_clock(), __FUNCTION__, x49gp->env);
|
||||
printf("%lld: %s: call cpu_exec(%p)\n", (unsigned long long) x49gp_get_clock(), __FUNCTION__, x49gp->env);
|
||||
#endif
|
||||
ret = cpu_exec(x49gp->env);
|
||||
#ifdef DEBUG_X49GP_TIMER_IDLE
|
||||
printf("%lld: %s: cpu_exec(): %d, PC %08x\n", x49gp_get_clock(), __FUNCTION__, ret, x49gp->env->regs[15]);
|
||||
printf("%lld: %s: cpu_exec(): %d, PC %08x\n", (unsigned long long) x49gp_get_clock(), __FUNCTION__, ret, x49gp->env->regs[15]);
|
||||
#endif
|
||||
|
||||
if (x49gp->env->regs[15] == 0x8620) {
|
||||
|
|
Loading…
Reference in a new issue