RTC: rtc-cmos.c: fix warning for MIPS
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/3 RTC: rtc-cmos.c: fix warning for MIPS
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.
--- drivers/rtc/rtc-cmos.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/rtc/rtc-cmos.c +2 -1
@@ -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.
Signature · 1 line
1.6.2.1
Quoted 6 lines · Wu Zhangjin
This patch fixes the following warning with
RTC_LIBon MIPS:
drivers/rtc/rtc-cmos.c:697:2: warning: #warning Assuming 128 bytes of RTC+NVRAM address space, not 64 bytes.Signed-off-by Wu Zhangjin <[email protected]>
Ralf
Quoted 7 lines · Ralf Baechle
Quoted 5 lines · Wu Zhangjin
This patch fixes the following warning with
RTC_LIBon MIPS:
drivers/rtc/rtc-cmos.c:697:2: warning: #warning Assuming 128 bytes of RTC+NVRAM address space, not 64 bytes.
Quoted 6 lines
Quoted 1 line
Signed-off-by Wu Zhangjin <[email protected]>Acked-by Ralf Baechle <[email protected]>Ralf
Hi, Paul or Alessandro
Could you please apply this pathset?
thanks!
Regards,
Wu Zhangjin
Quoted 15 lines · Wu Zhangjin
This patch fixes the following warning with
RTC_LIBon MIPS:
drivers/rtc/rtc-cmos.c:697:2: warning: #warning Assuming 128 bytes of RTC+NVRAM address space, not 64 bytes.Signed-off-by Wu Zhangjin <[email protected]>--- drivers/rtc/rtc-cmos.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/rtc/rtc-cmos.c +0
-0
drivers/rtc/rtc-cmos.c cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq) · line 698
Quoted 9 lines
drivers/rtc/rtc-cmos.c +2
-1@@ -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.
Ping.
This patch is now nearly a month old and I haven't yet heared anything. This was actually meant to be 2.6.32 material.
Ralf
Alessandro Zummo
Acked-byQuoted 4 lines · On Thu, 3 Dec 2009 15:56:04 +0000 Ralf Baechle <[email protected]> wrote:
Ping.
This patch is now nearly a month old and I haven't yet heared anything. This was actually meant to be 2.6.32 material.
I supposed MIPS things were handled by the MIPS tree. If there's urgency a submitter should specify the intended delivery path (trivial, mips, rtc, directly to Andrew) and kernel release.
Signature · 6 lines
Best regards, Alessandro Zummo, Tower Technologies - Torino, Italy http://www.towertech.it
Quoted 5 lines · Alessandro Zummo
Quoted 2 lines · On Thu, 3 Dec 2009 15:56:04 +0000 Ralf Baechle <[email protected]> wrote:
Ping.
Quoted 8 lines
Quoted 2 lines
This patch is now nearly a month old and I haven't yet heared anything. This was actually meant to be 2.6.32 material.
I supposed MIPS things were handled by the MIPS tree. If there's urgency a submitter should specify the intended delivery path (trivial, mips, rtc, directly to Andrew) and kernel release.
Acked-by Alessandro Zummo <[email protected]>
Hi, Alessandro Zummo
Could you please review the left two(only patch 2/3 for rtc tree) for 2.6.33 in http://patchwork.linux-mips.org/bundle/ralf/rtc/ ?
[v1,2/3] RTC: rtc-cmos.c: enable RTC_DM_BINARY of RTC_LIB for fuloong2e and fuloong2f
[v1,3/3,loongson] RTC: Registration of Loongson RTC platform device
(Sorry, I can not find them in my Email client currently, so can not reply the old Email thread directly, If necessary, I will resend them, thanks!)
Best Regards,
Wu Zhangjin
PATCH 2/3 RTC: rtc-cmos.c: enable RTC_DM_BINARY of RTC_LIB for fuloong2e and fuloong2f
In reply to a message not in the archiveThis 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.
--- drivers/rtc/rtc-cmos.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/rtc/rtc-cmos.c +2 -3
@@ -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; }
Signature · 1 line
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
drivers/rtc/rtc-cmos.c cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq) · line 761
Quoted 6 lines · On Thu, 5 Nov 2009 09:22:09 +0800 Wu Zhangjin <[email protected]> wrote:
drivers/rtc/rtc-cmos.c +2
-3*/ -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.
Signature · 6 lines
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
Quoted 14 lines · Alessandro Zummo
drivers/rtc/rtc-cmos.c cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq) · line 761
Quoted 6 lines · On Thu, 5 Nov 2009 09:22:09 +0800 Wu Zhangjin <[email protected]> wrote:
drivers/rtc/rtc-cmos.c +2
-3*/ -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
Re: [rtc-linux] [PATCH v1 2/3] RTC: rtc-cmos.c: enable RTC_DM_BINARY of RTC_LIB for fuloong2e and fuloong2f
Quoted 4 lines · Wu Zhangjin
Quoted 3 lines · Alessandro Zummo
On Thu, 5 Nov 2009 09:22:09 +0800
Wu Zhangjin <[email protected]> wrote:
Quoted 10 lines
Quoted 10 lines
drivers/rtc/rtc-cmos.c cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq) · line 761
Quoted 6 lines
drivers/rtc/rtc-cmos.c +2
-3*/ -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.
As *already* noted in the code: <asm-generic/rtc.h> only handles BCD. And that's what's used to access most of those registers.
PATCH 3/3 RTC: Registration of Loongson RTC platform device
In reply to a message not in the archiveThis patch add the RTC_LIB support for fuloong2e,fuloong2f.
To make hwclock work with it normally, please do:
kernel configuration:
Device Drivers --->
<*> Real Time Clock --->
<*> PC-style 'CMOS'
user-space configuration:
$ mknod /dev/rtc0 c 254 0
/dev/rtc0 is the default RTC device file.
Of course, if udevd installed, ignore the above user-space configuration.
--- arch/mips/loongson/common/Makefile | 6 +++++ arch/mips/loongson/common/rtc.c | 43 ++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 0 deletions(-) create mode 100644 arch/mips/loongson/common/rtc.c
arch/mips/loongson/common/Makefile +6 -0
@@ -10,3 +10,9 @@ obj-y += setup.o init.o cmdline.o env.o time.o reset.o irq.o \ # obj-$(CONFIG_EARLY_PRINTK) += early_printk.o obj-$(CONFIG_SERIAL_8250) += serial.o + +# Enable RTC Class support +# +# please enable CONFIG_RTC_DRV_CMOS +# +obj-$(CONFIG_RTC_DRV_CMOS) += rtc.o
arch/mips/loongson/common/rtc.c new file +43 -0
43 lines not on this page · raw message
Signature · 1 line
1.6.2.1
Re: [rtc-linux] [PATCH v1 3/3] [loongson] RTC: Registration of Loongson RTC platform device
Quoted 3 lines · On Thu, 5 Nov 2009 09:24:10 +0800 Wu Zhangjin <[email protected]> wrote:
user-space configuration:
$ mknod /dev/rtc0 c 254 0
That's not guaranteed.
Signature · 6 lines
Best regards, Alessandro Zummo, Tower Technologies - Torino, Italy http://www.towertech.it
Re: [rtc-linux] [PATCH v1 3/3] [loongson] RTC: Registration of Loongson RTC platform device
Quoted 5 lines · Alessandro Zummo
Quoted 3 lines
user-space configuration:
$ mknod /dev/rtc0 c 254 0That's not guaranteed.
Thanks, I've fixed that comment.
Ralf