* [PATCH 1/2] RTC: enable RTC_LIB for fuloong2e and fuloong2f
@ 2009-11-04 15:49 Wu Zhangjin
2009-11-04 16:26 ` Ralf Baechle
0 siblings, 1 reply; 3+ messages in thread
From: Wu Zhangjin @ 2009-11-04 15:49 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Arnaud Patard, Wu Zhangjin, linux-mips, rtc-linux
This patch fixes the following warning with RTC_LIB on MIPS:
drivers/rtc/rtc-cmos.c:697:2: warning: #warning Assuming 128 bytes of
RTC+NVRAM address space, not 64 bytes.
and also, enables the RTC_DM_BINARY support. without this support,
RTC_LIB of fuloong2e and fuloong2f does not work.
The platform RTC device driver is coming in the next patch.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
---
drivers/rtc/rtc-cmos.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index f7a4701..820bdad 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -691,7 +691,8 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
*/
#if defined(CONFIG_ATARI)
address_space = 64;
-#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__sparc__)
+#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) \
+ || defined(__sparc__) || defined(__mips__)
address_space = 128;
#else
#warning Assuming 128 bytes of RTC+NVRAM address space, not 64 bytes.
@@ -756,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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] RTC: enable RTC_LIB for fuloong2e and fuloong2f
2009-11-04 15:49 [PATCH 1/2] RTC: enable RTC_LIB for fuloong2e and fuloong2f Wu Zhangjin
@ 2009-11-04 16:26 ` Ralf Baechle
2009-11-05 0:44 ` Wu Zhangjin
0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2009-11-04 16:26 UTC (permalink / raw)
To: Wu Zhangjin; +Cc: Arnaud Patard, linux-mips, rtc-linux
On Wed, Nov 04, 2009 at 11:49:22PM +0800, Wu Zhangjin wrote:
> diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
> index f7a4701..820bdad 100644
> --- a/drivers/rtc/rtc-cmos.c
> +++ b/drivers/rtc/rtc-cmos.c
> @@ -691,7 +691,8 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
> */
> #if defined(CONFIG_ATARI)
> address_space = 64;
> -#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__sparc__)
> +#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) \
> + || defined(__sparc__) || defined(__mips__)
> address_space = 128;
> #else
> #warning Assuming 128 bytes of RTC+NVRAM address space, not 64 bytes.
I'd like to see at least this first segment included for 2.6.32 already.
Ralf
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] RTC: enable RTC_LIB for fuloong2e and fuloong2f
2009-11-04 16:26 ` Ralf Baechle
@ 2009-11-05 0:44 ` Wu Zhangjin
0 siblings, 0 replies; 3+ messages in thread
From: Wu Zhangjin @ 2009-11-05 0:44 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Arnaud Patard, linux-mips, rtc-linux
On Wed, 2009-11-04 at 17:26 +0100, Ralf Baechle wrote:
> On Wed, Nov 04, 2009 at 11:49:22PM +0800, Wu Zhangjin wrote:
>
> > diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
> > index f7a4701..820bdad 100644
> > --- a/drivers/rtc/rtc-cmos.c
> > +++ b/drivers/rtc/rtc-cmos.c
> > @@ -691,7 +691,8 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
> > */
> > #if defined(CONFIG_ATARI)
> > address_space = 64;
> > -#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__sparc__)
> > +#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) \
> > + || defined(__sparc__) || defined(__mips__)
> > address_space = 128;
> > #else
> > #warning Assuming 128 bytes of RTC+NVRAM address space, not 64 bytes.
>
> I'd like to see at least this first segment included for 2.6.32 already.
>
Will split it out for 2.6.32.
Regards,
Wu Zhangjin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-05 0:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-04 15:49 [PATCH 1/2] RTC: enable RTC_LIB for fuloong2e and fuloong2f Wu Zhangjin
2009-11-04 16:26 ` Ralf Baechle
2009-11-05 0:44 ` Wu Zhangjin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox