The patch titled Subject: rtc: omap: silence bogus power-up reset message at probe has been added to the -mm tree. Its filename is rtc-omap-silence-bogus-power-up-reset-message-at-probe.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/rtc-omap-silence-bogus-power-up-reset-message-at-probe.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/rtc-omap-silence-bogus-power-up-reset-message-at-probe.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Johan Hovold <johan@xxxxxxxxxx> Subject: rtc: omap: silence bogus power-up reset message at probe Some legacy RTC IP revisions has a power-up reset flag in the status register that later revisions lack. As this flag is always read back as set on later revisions (or is overloaded with a different flag), make sure to only clear the flag and print the info message on legacy platforms. Signed-off-by: Johan Hovold <johan@xxxxxxxxxx> Cc: Alessandro Zummo <a.zummo@xxxxxxxxxxxx> Cc: Tony Lindgren <tony@xxxxxxxxxxx> Cc: Benot Cousson <bcousson@xxxxxxxxxxxx> Cc: Lokesh Vutla <lokeshvutla@xxxxxx> Cc: Guenter Roeck <linux@xxxxxxxxxxxx> Cc: Sekhar Nori <nsekhar@xxxxxx> Cc: Tero Kristo <t-kristo@xxxxxx> Cc: Keerthy J <j-keerthy@xxxxxx> Cc: Felipe Balbi <balbi@xxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/rtc/rtc-omap.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff -puN drivers/rtc/rtc-omap.c~rtc-omap-silence-bogus-power-up-reset-message-at-probe drivers/rtc/rtc-omap.c --- a/drivers/rtc/rtc-omap.c~rtc-omap-silence-bogus-power-up-reset-message-at-probe +++ a/drivers/rtc/rtc-omap.c @@ -106,6 +106,7 @@ struct omap_rtc_device_type { bool has_32kclk_en; bool has_kicker; bool has_irqwakeen; + bool has_power_up_reset; }; struct omap_rtc { @@ -346,6 +347,7 @@ static struct rtc_class_ops omap_rtc_ops }; static const struct omap_rtc_device_type omap_rtc_default_type = { + .has_power_up_reset = true, }; static const struct omap_rtc_device_type omap_rtc_am3352_type = { @@ -391,7 +393,7 @@ static int __init omap_rtc_probe(struct { struct omap_rtc *rtc; struct resource *res; - u8 reg, new_ctrl; + u8 reg, mask, new_ctrl; const struct platform_device_id *id_entry; const struct of_device_id *of_id; int ret; @@ -448,12 +450,17 @@ static int __init omap_rtc_probe(struct /* clear old status */ reg = rtc_read(rtc, OMAP_RTC_STATUS_REG); - if (reg & (u8) OMAP_RTC_STATUS_POWER_UP) { - dev_info(&pdev->dev, "RTC power up reset detected\n"); - rtc_write(rtc, OMAP_RTC_STATUS_REG, OMAP_RTC_STATUS_POWER_UP); + + mask = OMAP_RTC_STATUS_ALARM; + + if (rtc->type->has_power_up_reset) { + mask |= OMAP_RTC_STATUS_POWER_UP; + if (reg & OMAP_RTC_STATUS_POWER_UP) + dev_info(&pdev->dev, "RTC power up reset detected\n"); } - if (reg & (u8) OMAP_RTC_STATUS_ALARM) - rtc_write(rtc, OMAP_RTC_STATUS_REG, OMAP_RTC_STATUS_ALARM); + + if (reg & mask) + rtc_write(rtc, OMAP_RTC_STATUS_REG, reg & mask); /* On boards with split power, RTC_ON_NOFF won't reset the RTC */ reg = rtc_read(rtc, OMAP_RTC_CTRL_REG); _ Patches currently in -mm which might be from johan@xxxxxxxxxx are rtc-omap-fix-clock-source-configuration.patch rtc-omap-fix-missing-wakealarm-attribute.patch rtc-omap-fix-interrupt-disable-at-probe.patch rtc-omap-clean-up-probe-error-handling.patch rtc-omap-fix-class-device-registration.patch rtc-omap-remove-unused-register-base-define.patch rtc-omap-use-dev_info.patch rtc-omap-make-platform-device-id-table-const.patch rtc-omap-add-device-abstraction.patch rtc-omap-remove-driver_name-macro.patch rtc-omap-add-structured-device-type-info.patch rtc-omap-silence-bogus-power-up-reset-message-at-probe.patch rtc-omap-add-helper-to-read-raw-bcd-time.patch rtc-omap-add-helper-to-read-32-bit-registers.patch rtc-omap-add-support-for-pmic_power_en.patch rtc-omap-enable-wake-up-from-power-off.patch rtc-omap-fix-minor-coding-style-issues.patch rtc-omap-add-copyright-entry.patch arm-dts-am33xx-update-rtc-node-compatible-property.patch arm-dts-am335x-boneblack-enable-power-off-and-rtc-wake-up.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html