* [PATCH v1 1/3] RTC: rtc-cmos.c: fix warning for MIPS [not found] <cover.1257383766.git.wuzhangjin@gmail.com> @ 2009-11-05 1:21 ` Wu Zhangjin 2009-11-05 7:41 ` Ralf Baechle 2009-12-03 15:56 ` Ralf Baechle 2009-11-05 1:22 ` [PATCH v1 2/3] RTC: rtc-cmos.c: enable RTC_DM_BINARY of RTC_LIB for fuloong2e and fuloong2f Wu Zhangjin 2009-11-05 1:24 ` [PATCH v1 3/3] [loongson] RTC: Registration of Loongson RTC platform device Wu Zhangjin 2 siblings, 2 replies; 13+ messages in thread From: Wu Zhangjin @ 2009-11-05 1:21 UTC (permalink / raw) To: Paul Gortmaker, Alessandro Zummo; +Cc: linux-mips, rtc-linux, Wu Zhangjin 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. Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> --- drivers/rtc/rtc-cmos.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index f7a4701..21e48f7 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. -- 1.6.2.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH v1 1/3] RTC: rtc-cmos.c: fix warning for MIPS 2009-11-05 1:21 ` [PATCH v1 1/3] RTC: rtc-cmos.c: fix warning for MIPS Wu Zhangjin @ 2009-11-05 7:41 ` Ralf Baechle 2009-11-10 7:24 ` Wu Zhangjin 2009-12-03 15:56 ` Ralf Baechle 1 sibling, 1 reply; 13+ messages in thread From: Ralf Baechle @ 2009-11-05 7:41 UTC (permalink / raw) To: Wu Zhangjin; +Cc: Paul Gortmaker, Alessandro Zummo, linux-mips, rtc-linux On Thu, Nov 05, 2009 at 09:21:54AM +0800, Wu Zhangjin wrote: > 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. > > Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> Acked-by: Ralf Baechle <ralf@linux-mips.org> Ralf ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v1 1/3] RTC: rtc-cmos.c: fix warning for MIPS 2009-11-05 7:41 ` Ralf Baechle @ 2009-11-10 7:24 ` Wu Zhangjin 0 siblings, 0 replies; 13+ messages in thread From: Wu Zhangjin @ 2009-11-10 7:24 UTC (permalink / raw) To: Paul Gortmaker, Alessandro Zummo; +Cc: Ralf Baechle, linux-mips, rtc-linux On Thu, 2009-11-05 at 08:41 +0100, Ralf Baechle wrote: > On Thu, Nov 05, 2009 at 09:21:54AM +0800, Wu Zhangjin wrote: > > > 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. > > > > Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> > > Acked-by: Ralf Baechle <ralf@linux-mips.org> > > > Ralf Hi, Paul or Alessandro Could you please apply this pathset? thanks! Regards, Wu Zhangjin ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v1 1/3] RTC: rtc-cmos.c: fix warning for MIPS 2009-11-05 1:21 ` [PATCH v1 1/3] RTC: rtc-cmos.c: fix warning for MIPS Wu Zhangjin 2009-11-05 7:41 ` Ralf Baechle @ 2009-12-03 15:56 ` Ralf Baechle 2009-12-03 16:14 ` [rtc-linux] " Alessandro Zummo 1 sibling, 1 reply; 13+ messages in thread From: Ralf Baechle @ 2009-12-03 15:56 UTC (permalink / raw) To: Wu Zhangjin Cc: Paul Gortmaker, Alessandro Zummo, linux-mips, rtc-linux, Andrew Morton On Thu, Nov 05, 2009 at 09:21:54AM +0800, Wu Zhangjin wrote: > 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. > > Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> > --- > drivers/rtc/rtc-cmos.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c > index f7a4701..21e48f7 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. 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 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [rtc-linux] Re: [PATCH v1 1/3] RTC: rtc-cmos.c: fix warning for MIPS 2009-12-03 15:56 ` Ralf Baechle @ 2009-12-03 16:14 ` Alessandro Zummo 2009-12-03 16:21 ` Wu Zhangjin 0 siblings, 1 reply; 13+ messages in thread From: Alessandro Zummo @ 2009-12-03 16:14 UTC (permalink / raw) To: rtc-linux; +Cc: ralf, Wu Zhangjin, Paul Gortmaker, linux-mips, Andrew Morton On Thu, 3 Dec 2009 15:56:04 +0000 Ralf Baechle <ralf@linux-mips.org> 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. Acked-by: Alessandro Zummo <a.zummo@towertech.it> -- Best regards, Alessandro Zummo, Tower Technologies - Torino, Italy http://www.towertech.it ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [rtc-linux] Re: [PATCH v1 1/3] RTC: rtc-cmos.c: fix warning for MIPS 2009-12-03 16:14 ` [rtc-linux] " Alessandro Zummo @ 2009-12-03 16:21 ` Wu Zhangjin 0 siblings, 0 replies; 13+ messages in thread From: Wu Zhangjin @ 2009-12-03 16:21 UTC (permalink / raw) To: Alessandro Zummo Cc: rtc-linux, ralf, Paul Gortmaker, linux-mips, Andrew Morton On Thu, 2009-12-03 at 17:14 +0100, Alessandro Zummo wrote: > On Thu, 3 Dec 2009 15:56:04 +0000 > Ralf Baechle <ralf@linux-mips.org> 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. > > Acked-by: Alessandro Zummo <a.zummo@towertech.it> 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 ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v1 2/3] RTC: rtc-cmos.c: enable RTC_DM_BINARY of RTC_LIB for fuloong2e and fuloong2f [not found] <cover.1257383766.git.wuzhangjin@gmail.com> 2009-11-05 1:21 ` [PATCH v1 1/3] RTC: rtc-cmos.c: fix warning for MIPS Wu Zhangjin @ 2009-11-05 1:22 ` Wu Zhangjin 2009-12-03 16:27 ` [rtc-linux] " Alessandro Zummo 2009-11-05 1:24 ` [PATCH v1 3/3] [loongson] RTC: Registration of Loongson RTC platform device Wu Zhangjin 2 siblings, 1 reply; 13+ messages in thread From: Wu Zhangjin @ 2009-11-05 1:22 UTC (permalink / raw) To: Paul Gortmaker, Alessandro Zummo; +Cc: linux-mips, rtc-linux, Wu Zhangjin 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@gmail.com> --- 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 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [rtc-linux] [PATCH v1 2/3] RTC: rtc-cmos.c: enable RTC_DM_BINARY of RTC_LIB for fuloong2e and fuloong2f 2009-11-05 1:22 ` [PATCH v1 2/3] RTC: rtc-cmos.c: enable RTC_DM_BINARY of RTC_LIB for fuloong2e and fuloong2f Wu Zhangjin @ 2009-12-03 16:27 ` Alessandro Zummo 2009-12-03 16:44 ` Wu Zhangjin 0 siblings, 1 reply; 13+ messages in thread From: Alessandro Zummo @ 2009-12-03 16:27 UTC (permalink / raw) To: rtc-linux; +Cc: wuzhangjin, Paul Gortmaker, linux-mips On Thu, 5 Nov 2009 09:22:09 +0800 Wu Zhangjin <wuzhangjin@gmail.com> 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 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [rtc-linux] [PATCH v1 2/3] RTC: rtc-cmos.c: enable RTC_DM_BINARY of RTC_LIB for fuloong2e and fuloong2f 2009-12-03 16:27 ` [rtc-linux] " Alessandro Zummo @ 2009-12-03 16:44 ` Wu Zhangjin 2010-01-26 2:03 ` David Brownell 0 siblings, 1 reply; 13+ messages in thread From: Wu Zhangjin @ 2009-12-03 16:44 UTC (permalink / raw) To: Alessandro Zummo; +Cc: rtc-linux, Paul Gortmaker, linux-mips, David Brownell On Thu, 2009-12-03 at 17:27 +0100, Alessandro Zummo wrote: > On Thu, 5 Nov 2009 09:22:09 +0800 > Wu Zhangjin <wuzhangjin@gmail.com> 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 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [rtc-linux] [PATCH v1 2/3] RTC: rtc-cmos.c: enable RTC_DM_BINARY of RTC_LIB for fuloong2e and fuloong2f 2009-12-03 16:44 ` Wu Zhangjin @ 2010-01-26 2:03 ` David Brownell 0 siblings, 0 replies; 13+ messages in thread From: David Brownell @ 2010-01-26 2:03 UTC (permalink / raw) To: wuzhangjin; +Cc: Alessandro Zummo, rtc-linux, Paul Gortmaker, linux-mips On Thursday 03 December 2009, Wu Zhangjin wrote: > On Thu, 2009-12-03 at 17:27 +0100, Alessandro Zummo wrote: > > On Thu, 5 Nov 2009 09:22:09 +0800 > > Wu Zhangjin <wuzhangjin@gmail.com> 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. 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. ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v1 3/3] [loongson] RTC: Registration of Loongson RTC platform device [not found] <cover.1257383766.git.wuzhangjin@gmail.com> 2009-11-05 1:21 ` [PATCH v1 1/3] RTC: rtc-cmos.c: fix warning for MIPS Wu Zhangjin 2009-11-05 1:22 ` [PATCH v1 2/3] RTC: rtc-cmos.c: enable RTC_DM_BINARY of RTC_LIB for fuloong2e and fuloong2f Wu Zhangjin @ 2009-11-05 1:24 ` Wu Zhangjin 2009-12-03 16:21 ` [rtc-linux] " Alessandro Zummo 2 siblings, 1 reply; 13+ messages in thread From: Wu Zhangjin @ 2009-11-05 1:24 UTC (permalink / raw) To: Ralf Baechle, Arnaud Patard Cc: linux-mips, rtc-linux, Paul Gortmaker, Alessandro Zummo, Wu Zhangjin This 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. Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> --- 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 diff --git a/arch/mips/loongson/common/Makefile b/arch/mips/loongson/common/Makefile index d21d116..d1bd38c 100644 --- a/arch/mips/loongson/common/Makefile +++ b/arch/mips/loongson/common/Makefile @@ -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 diff --git a/arch/mips/loongson/common/rtc.c b/arch/mips/loongson/common/rtc.c new file mode 100644 index 0000000..1f88791 --- /dev/null +++ b/arch/mips/loongson/common/rtc.c @@ -0,0 +1,43 @@ +/* + * Registration of Loongson RTC platform device. + * + * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> + * Copyright (C) 2009 Wu Zhangjin <wuzj@lemote.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include <linux/init.h> +#include <linux/ioport.h> +#include <linux/mc146818rtc.h> +#include <linux/platform_device.h> + +static struct resource rtc_cmos_resource[] = { + { + .start = RTC_PORT(0), + .end = RTC_PORT(1), + .flags = IORESOURCE_IO, + }, + { + .start = RTC_IRQ, + .end = RTC_IRQ, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device rtc_cmos_device = { + .name = "rtc_cmos", + .id = -1, + .num_resources = ARRAY_SIZE(rtc_cmos_resource), + .resource = rtc_cmos_resource +}; + +static __init int rtc_cmos_init(void) +{ + return platform_device_register(&rtc_cmos_device); +} + +device_initcall(rtc_cmos_init); -- 1.6.2.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [rtc-linux] [PATCH v1 3/3] [loongson] RTC: Registration of Loongson RTC platform device 2009-11-05 1:24 ` [PATCH v1 3/3] [loongson] RTC: Registration of Loongson RTC platform device Wu Zhangjin @ 2009-12-03 16:21 ` Alessandro Zummo 2009-12-03 17:11 ` Ralf Baechle 0 siblings, 1 reply; 13+ messages in thread From: Alessandro Zummo @ 2009-12-03 16:21 UTC (permalink / raw) To: rtc-linux Cc: wuzhangjin, Ralf Baechle, Arnaud Patard, linux-mips, Paul Gortmaker On Thu, 5 Nov 2009 09:24:10 +0800 Wu Zhangjin <wuzhangjin@gmail.com> wrote: > user-space configuration: > > $ mknod /dev/rtc0 c 254 0 That's not guaranteed. -- Best regards, Alessandro Zummo, Tower Technologies - Torino, Italy http://www.towertech.it ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [rtc-linux] [PATCH v1 3/3] [loongson] RTC: Registration of Loongson RTC platform device 2009-12-03 16:21 ` [rtc-linux] " Alessandro Zummo @ 2009-12-03 17:11 ` Ralf Baechle 0 siblings, 0 replies; 13+ messages in thread From: Ralf Baechle @ 2009-12-03 17:11 UTC (permalink / raw) To: Alessandro Zummo Cc: rtc-linux, wuzhangjin, Arnaud Patard, linux-mips, Paul Gortmaker On Thu, Dec 03, 2009 at 05:21:10PM +0100, Alessandro Zummo wrote: > > user-space configuration: > > > > $ mknod /dev/rtc0 c 254 0 > > That's not guaranteed. Thanks, I've fixed that comment. Ralf ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2010-01-26 2:03 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1257383766.git.wuzhangjin@gmail.com>
2009-11-05 1:21 ` [PATCH v1 1/3] RTC: rtc-cmos.c: fix warning for MIPS Wu Zhangjin
2009-11-05 7:41 ` Ralf Baechle
2009-11-10 7:24 ` Wu Zhangjin
2009-12-03 15:56 ` Ralf Baechle
2009-12-03 16:14 ` [rtc-linux] " Alessandro Zummo
2009-12-03 16:21 ` Wu Zhangjin
2009-11-05 1:22 ` [PATCH v1 2/3] RTC: rtc-cmos.c: enable RTC_DM_BINARY of RTC_LIB for fuloong2e and fuloong2f Wu Zhangjin
2009-12-03 16:27 ` [rtc-linux] " Alessandro Zummo
2009-12-03 16:44 ` Wu Zhangjin
2010-01-26 2:03 ` David Brownell
2009-11-05 1:24 ` [PATCH v1 3/3] [loongson] RTC: Registration of Loongson RTC platform device Wu Zhangjin
2009-12-03 16:21 ` [rtc-linux] " Alessandro Zummo
2009-12-03 17:11 ` Ralf Baechle
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).