[PATCH v1 2/3] RTC: rtc-cmos.c: enable RTC_DM_BINARY of RTC_LIB for fuloong2e and fuloong2f

View: New views
3 Messages — Rating Filter:   Alert me  

Parent Message unknown [PATCH v1 2/3] RTC: rtc-cmos.c: enable RTC_DM_BINARY of RTC_LIB for fuloong2e and fuloong2f

by Wu Zhangjin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This patch enables the RTC_DM_BINARY support for RTC_LIB of fuloong2e
and fuloong2f. without it, RTC_LIB not work on those machines.

The platform RTC device driver is coming in the next patch.

Signed-off-by: Wu Zhangjin <wuzhangjin@...>
---
 drivers/rtc/rtc-cmos.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index 21e48f7..820bdad 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -757,9 +757,8 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
  /* FIXME teach the alarm code how to handle binary mode;
  * <asm-generic/rtc.h> doesn't know 12-hour mode either.
  */
- if (is_valid_irq(rtc_irq) &&
-    (!(rtc_control & RTC_24H) || (rtc_control & (RTC_DM_BINARY)))) {
- dev_dbg(dev, "only 24-hr BCD mode supported\n");
+ if (is_valid_irq(rtc_irq) && !(rtc_control & RTC_24H)) {
+ dev_dbg(dev, "only 24-hr supported\n");
  retval = -ENXIO;
  goto cleanup1;
  }
--
1.6.2.1



Re: [rtc-linux] [PATCH v1 2/3] RTC: rtc-cmos.c: enable RTC_DM_BINARY of RTC_LIB for fuloong2e and fuloong2f

by Alessandro Zummo-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu,  5 Nov 2009 09:22:09 +0800
Wu Zhangjin <wuzhangjin@...> wrote:

>   */
> - if (is_valid_irq(rtc_irq) &&
> -    (!(rtc_control & RTC_24H) || (rtc_control & (RTC_DM_BINARY)))) {
> - dev_dbg(dev, "only 24-hr BCD mode supported\n");
> + if (is_valid_irq(rtc_irq) && !(rtc_control & RTC_24H)) {
> + dev_dbg(dev, "only 24-hr supported\n");

 If this check was there it's probably because there are problems
 in some other parts of the driver. I'm not keen to add this without
 some feedback by the original author or porter.

--

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it



Re: [rtc-linux] [PATCH v1 2/3] RTC: rtc-cmos.c: enable RTC_DM_BINARY of RTC_LIB for fuloong2e and fuloong2f

by Wu Zhangjin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 2009-12-03 at 17:27 +0100, Alessandro Zummo wrote:

> On Thu,  5 Nov 2009 09:22:09 +0800
> Wu Zhangjin <wuzhangjin@...> wrote:
>
> >   */
> > - if (is_valid_irq(rtc_irq) &&
> > -    (!(rtc_control & RTC_24H) || (rtc_control & (RTC_DM_BINARY)))) {
> > - dev_dbg(dev, "only 24-hr BCD mode supported\n");
> > + if (is_valid_irq(rtc_irq) && !(rtc_control & RTC_24H)) {
> > + dev_dbg(dev, "only 24-hr supported\n");
>
>  If this check was there it's probably because there are problems
>  in some other parts of the driver. I'm not keen to add this without
>  some feedback by the original author or porter.
>

Just found two authors or porters from the file: drivers/rtc/rtc-cmos.c

/*
 * RTC class driver for "CMOS RTC":  PCs, ACPI, etc
 *
 * Copyright (C) 1996 Paul Gortmaker (drivers/char/rtc.c)
 * Copyright (C) 2006 David Brownell (convert to new framework)
[...]

and found out their names in MAINTAINERS and put them in the CC list ;)

Regards,
        Wu Zhangjin