hw/arm/omap1: Drop ALMDEBUG ifdeffed out code

In omap1.c, there are some debug printfs in the omap_rtc_write()
function that are guardad by ifdef ALMDEBUG. ALMDEBUG is never
set, so this is all dead code.

It's not worth the effort of converting all of these to tracepoints;
a modern tracepoint approach would probably have a single tracepoint
covering all the register writes anyway. Just delete the printf()s.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250227170117.1726895-3-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
Peter Maydell 2025-02-27 17:01:14 +00:00 committed by Philippe Mathieu-Daudé
parent 08c99626cb
commit 4af3c6eca9

View File

@ -2660,25 +2660,16 @@ static void omap_rtc_write(void *opaque, hwaddr addr,
switch (offset) { switch (offset) {
case 0x00: /* SECONDS_REG */ case 0x00: /* SECONDS_REG */
#ifdef ALMDEBUG
printf("RTC SEC_REG <-- %02x\n", value);
#endif
s->ti -= s->current_tm.tm_sec; s->ti -= s->current_tm.tm_sec;
s->ti += from_bcd(value); s->ti += from_bcd(value);
return; return;
case 0x04: /* MINUTES_REG */ case 0x04: /* MINUTES_REG */
#ifdef ALMDEBUG
printf("RTC MIN_REG <-- %02x\n", value);
#endif
s->ti -= s->current_tm.tm_min * 60; s->ti -= s->current_tm.tm_min * 60;
s->ti += from_bcd(value) * 60; s->ti += from_bcd(value) * 60;
return; return;
case 0x08: /* HOURS_REG */ case 0x08: /* HOURS_REG */
#ifdef ALMDEBUG
printf("RTC HRS_REG <-- %02x\n", value);
#endif
s->ti -= s->current_tm.tm_hour * 3600; s->ti -= s->current_tm.tm_hour * 3600;
if (s->pm_am) { if (s->pm_am) {
s->ti += (from_bcd(value & 0x3f) & 12) * 3600; s->ti += (from_bcd(value & 0x3f) & 12) * 3600;
@ -2688,17 +2679,11 @@ static void omap_rtc_write(void *opaque, hwaddr addr,
return; return;
case 0x0c: /* DAYS_REG */ case 0x0c: /* DAYS_REG */
#ifdef ALMDEBUG
printf("RTC DAY_REG <-- %02x\n", value);
#endif
s->ti -= s->current_tm.tm_mday * 86400; s->ti -= s->current_tm.tm_mday * 86400;
s->ti += from_bcd(value) * 86400; s->ti += from_bcd(value) * 86400;
return; return;
case 0x10: /* MONTHS_REG */ case 0x10: /* MONTHS_REG */
#ifdef ALMDEBUG
printf("RTC MTH_REG <-- %02x\n", value);
#endif
memcpy(&new_tm, &s->current_tm, sizeof(new_tm)); memcpy(&new_tm, &s->current_tm, sizeof(new_tm));
new_tm.tm_mon = from_bcd(value); new_tm.tm_mon = from_bcd(value);
ti[0] = mktimegm(&s->current_tm); ti[0] = mktimegm(&s->current_tm);
@ -2715,9 +2700,6 @@ static void omap_rtc_write(void *opaque, hwaddr addr,
return; return;
case 0x14: /* YEARS_REG */ case 0x14: /* YEARS_REG */
#ifdef ALMDEBUG
printf("RTC YRS_REG <-- %02x\n", value);
#endif
memcpy(&new_tm, &s->current_tm, sizeof(new_tm)); memcpy(&new_tm, &s->current_tm, sizeof(new_tm));
new_tm.tm_year += from_bcd(value) - (new_tm.tm_year % 100); new_tm.tm_year += from_bcd(value) - (new_tm.tm_year % 100);
ti[0] = mktimegm(&s->current_tm); ti[0] = mktimegm(&s->current_tm);
@ -2737,25 +2719,16 @@ static void omap_rtc_write(void *opaque, hwaddr addr,
return; /* Ignored */ return; /* Ignored */
case 0x20: /* ALARM_SECONDS_REG */ case 0x20: /* ALARM_SECONDS_REG */
#ifdef ALMDEBUG
printf("ALM SEC_REG <-- %02x\n", value);
#endif
s->alarm_tm.tm_sec = from_bcd(value); s->alarm_tm.tm_sec = from_bcd(value);
omap_rtc_alarm_update(s); omap_rtc_alarm_update(s);
return; return;
case 0x24: /* ALARM_MINUTES_REG */ case 0x24: /* ALARM_MINUTES_REG */
#ifdef ALMDEBUG
printf("ALM MIN_REG <-- %02x\n", value);
#endif
s->alarm_tm.tm_min = from_bcd(value); s->alarm_tm.tm_min = from_bcd(value);
omap_rtc_alarm_update(s); omap_rtc_alarm_update(s);
return; return;
case 0x28: /* ALARM_HOURS_REG */ case 0x28: /* ALARM_HOURS_REG */
#ifdef ALMDEBUG
printf("ALM HRS_REG <-- %02x\n", value);
#endif
if (s->pm_am) if (s->pm_am)
s->alarm_tm.tm_hour = s->alarm_tm.tm_hour =
((from_bcd(value & 0x3f)) % 12) + ((from_bcd(value & 0x3f)) % 12) +
@ -2766,33 +2739,21 @@ static void omap_rtc_write(void *opaque, hwaddr addr,
return; return;
case 0x2c: /* ALARM_DAYS_REG */ case 0x2c: /* ALARM_DAYS_REG */
#ifdef ALMDEBUG
printf("ALM DAY_REG <-- %02x\n", value);
#endif
s->alarm_tm.tm_mday = from_bcd(value); s->alarm_tm.tm_mday = from_bcd(value);
omap_rtc_alarm_update(s); omap_rtc_alarm_update(s);
return; return;
case 0x30: /* ALARM_MONTHS_REG */ case 0x30: /* ALARM_MONTHS_REG */
#ifdef ALMDEBUG
printf("ALM MON_REG <-- %02x\n", value);
#endif
s->alarm_tm.tm_mon = from_bcd(value); s->alarm_tm.tm_mon = from_bcd(value);
omap_rtc_alarm_update(s); omap_rtc_alarm_update(s);
return; return;
case 0x34: /* ALARM_YEARS_REG */ case 0x34: /* ALARM_YEARS_REG */
#ifdef ALMDEBUG
printf("ALM YRS_REG <-- %02x\n", value);
#endif
s->alarm_tm.tm_year = from_bcd(value); s->alarm_tm.tm_year = from_bcd(value);
omap_rtc_alarm_update(s); omap_rtc_alarm_update(s);
return; return;
case 0x40: /* RTC_CTRL_REG */ case 0x40: /* RTC_CTRL_REG */
#ifdef ALMDEBUG
printf("RTC CONTROL <-- %02x\n", value);
#endif
s->pm_am = (value >> 3) & 1; s->pm_am = (value >> 3) & 1;
s->auto_comp = (value >> 2) & 1; s->auto_comp = (value >> 2) & 1;
s->round = (value >> 1) & 1; s->round = (value >> 1) & 1;
@ -2802,32 +2763,20 @@ static void omap_rtc_write(void *opaque, hwaddr addr,
return; return;
case 0x44: /* RTC_STATUS_REG */ case 0x44: /* RTC_STATUS_REG */
#ifdef ALMDEBUG
printf("RTC STATUSL <-- %02x\n", value);
#endif
s->status &= ~((value & 0xc0) ^ 0x80); s->status &= ~((value & 0xc0) ^ 0x80);
omap_rtc_interrupts_update(s); omap_rtc_interrupts_update(s);
return; return;
case 0x48: /* RTC_INTERRUPTS_REG */ case 0x48: /* RTC_INTERRUPTS_REG */
#ifdef ALMDEBUG
printf("RTC INTRS <-- %02x\n", value);
#endif
s->interrupts = value; s->interrupts = value;
return; return;
case 0x4c: /* RTC_COMP_LSB_REG */ case 0x4c: /* RTC_COMP_LSB_REG */
#ifdef ALMDEBUG
printf("RTC COMPLSB <-- %02x\n", value);
#endif
s->comp_reg &= 0xff00; s->comp_reg &= 0xff00;
s->comp_reg |= 0x00ff & value; s->comp_reg |= 0x00ff & value;
return; return;
case 0x50: /* RTC_COMP_MSB_REG */ case 0x50: /* RTC_COMP_MSB_REG */
#ifdef ALMDEBUG
printf("RTC COMPMSB <-- %02x\n", value);
#endif
s->comp_reg &= 0x00ff; s->comp_reg &= 0x00ff;
s->comp_reg |= 0xff00 & (value << 8); s->comp_reg |= 0xff00 & (value << 8);
return; return;