RTC_LIB is selected by MIPS by default, and therefore, the legacy RTC driver is
disabled. but fortunately, RTC_LIB not works on fulong, so, enabling the legcy
RTC driver is needed, otherwise, the tools like hwclock will not work.
because loongson family machines, including fuloong2e, fuloong2f and
yeeloong2f need to enable legacy RTC driver, so we use MACH_LOONGSON
here.
Signed-off-by: Wu Zhangjin <[email protected]>
---
arch/mips/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 8417357..6a9bdda 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -7,7 +7,7 @@ config MIPS
select HAVE_ARCH_KGDB
# Horrible source of confusion. Die, die, die ...
select EMBEDDED
- select RTC_LIB if !LEMOTE_FULOONG2E
+ select RTC_LIB if !MACH_LOONGSON
mainmenu "Linux/MIPS Kernel Configuration"
--
1.6.2.1
Wu Zhangjin <[email protected]> writes:
Hi,
> RTC_LIB is selected by MIPS by default, and therefore, the legacy RTC driver is
> disabled. but fortunately, RTC_LIB not works on fulong, so, enabling the legcy
> RTC driver is needed, otherwise, the tools like hwclock will not work.
>
> because loongson family machines, including fuloong2e, fuloong2f and
> yeeloong2f need to enable legacy RTC driver, so we use MACH_LOONGSON
> here.
There are loongson machines which are working fine with RTC_LIB (for
instance the gdium which is using a m41t83 on i2c) so would be better to
be more restrictive imho.
Arnaud
Hi,
On Wed, 2009-11-04 at 11:40 +0100, Arnaud Patard wrote:
> Wu Zhangjin <[email protected]> writes:
>
> Hi,
>
> > RTC_LIB is selected by MIPS by default, and therefore, the legacy RTC driver is
> > disabled. but unfortunately, RTC_LIB not works on fulong, so, enabling the legcy
> > RTC driver is needed, otherwise, the tools like hwclock will not work.
> >
> > because loongson family machines, including fuloong2e, fuloong2f and
> > yeeloong2f need to enable legacy RTC driver, so we use MACH_LOONGSON
> > here.
>
> There are loongson machines which are working fine with RTC_LIB (for
> instance the gdium which is using a m41t83 on i2c) so would be better to
> be more restrictive imho.
In reality, fuloong2e, fuloong2f and yeeloong2f work fine with RTC_LIB,
but relative patches need to append to drivers/rtc/rtc-cmos.c and also
need a RTC platform device. If what I remembered is right, Gdium also
need corresponding patches to make it work with RTC_LIB.
Herein, I just let the basic support for those machines work, and then,
the RTC_LIB support will be sent out later.
and a small question: if legacy RTC driver works well on these machines,
why should we forbid people to use it? I think it's better to remove the
"select RTC_LIB" line for MIPS, and then, the people will be free to
choose what they want, and even for the users whose platform not support
RTC_LIB.
Regards,
Wu Zhangjin
Wu Zhangjin <[email protected]> writes:
> Hi,
>
> On Wed, 2009-11-04 at 11:40 +0100, Arnaud Patard wrote:
>> Wu Zhangjin <[email protected]> writes:
>>
>> Hi,
>>
>> > RTC_LIB is selected by MIPS by default, and therefore, the legacy RTC driver is
>> > disabled. but unfortunately, RTC_LIB not works on fulong, so, enabling the legcy
>> > RTC driver is needed, otherwise, the tools like hwclock will not work.
>> >
>> > because loongson family machines, including fuloong2e, fuloong2f and
>> > yeeloong2f need to enable legacy RTC driver, so we use MACH_LOONGSON
>> > here.
>>
>> There are loongson machines which are working fine with RTC_LIB (for
>> instance the gdium which is using a m41t83 on i2c) so would be better to
>> be more restrictive imho.
>
> In reality, fuloong2e, fuloong2f and yeeloong2f work fine with RTC_LIB,
> but relative patches need to append to drivers/rtc/rtc-cmos.c and also
> need a RTC platform device. If what I remembered is right, Gdium also
> need corresponding patches to make it work with RTC_LIB.
As I said, Gdium is using an i2c chip and the bus is made with the sm501
gpio. So except the patch for gpiolib support for ls2f, there's nothing
special for RTC_LIB. It's just working out of the box (as long as you
declare the platform devices but that's not what I call a problem).
>
> Herein, I just let the basic support for those machines work, and then,
> the RTC_LIB support will be sent out later.
>
> and a small question: if legacy RTC driver works well on these machines,
> why should we forbid people to use it? I think it's better to remove the
> "select RTC_LIB" line for MIPS, and then, the people will be free to
> choose what they want, and even for the users whose platform not support
> RTC_LIB.
Well, I though about this. If you go that way and remove the "select
RTC_LIB", please check and enable it for all platforms which needs it or
warn people about. Would be nice to avoid regression due to that.
Arnaud
On Wed, Nov 04, 2009 at 07:18:47PM +0800, Wu Zhangjin wrote:
> In reality, fuloong2e, fuloong2f and yeeloong2f work fine with RTC_LIB,
> but relative patches need to append to drivers/rtc/rtc-cmos.c and also
> need a RTC platform device. If what I remembered is right, Gdium also
> need corresponding patches to make it work with RTC_LIB.
>
> Herein, I just let the basic support for those machines work, and then,
> the RTC_LIB support will be sent out later.
>
> and a small question: if legacy RTC driver works well on these machines,
> why should we forbid people to use it? I think it's better to remove the
> "select RTC_LIB" line for MIPS, and then, the people will be free to
> choose what they want, and even for the users whose platform not support
> RTC_LIB.
RTC_LIB is the way to go; the non-RTC_LIB drivers are there only for
backward compatbility. A grep through the defcconfig files for all
platforms on all architectures finds that by now all have set
CONFIG_RTC_LIB and the remaining users of CONFIG_RTC, CONFIG_JS_RTC,
CONFIG_GEN_RTC, CONFIG_EFI_RTC, CONFIG_DS1302 (which all depend on !RTC_LIB)
are all defconfig files which seem to be slowly bitrotting.
Time to axe !RTC_LIB? I'm tempted.
Ralf
On Wed, 2009-11-04 at 15:15 +0100, Ralf Baechle wrote:
> On Wed, Nov 04, 2009 at 07:18:47PM +0800, Wu Zhangjin wrote:
>
> > In reality, fuloong2e, fuloong2f and yeeloong2f work fine with RTC_LIB,
> > but relative patches need to append to drivers/rtc/rtc-cmos.c and also
> > need a RTC platform device. If what I remembered is right, Gdium also
> > need corresponding patches to make it work with RTC_LIB.
> >
> > Herein, I just let the basic support for those machines work, and then,
> > the RTC_LIB support will be sent out later.
> >
> > and a small question: if legacy RTC driver works well on these machines,
> > why should we forbid people to use it? I think it's better to remove the
> > "select RTC_LIB" line for MIPS, and then, the people will be free to
> > choose what they want, and even for the users whose platform not support
> > RTC_LIB.
>
> RTC_LIB is the way to go; the non-RTC_LIB drivers are there only for
> backward compatbility. A grep through the defcconfig files for all
> platforms on all architectures finds that by now all have set
> CONFIG_RTC_LIB and the remaining users of CONFIG_RTC, CONFIG_JS_RTC,
> CONFIG_GEN_RTC, CONFIG_EFI_RTC, CONFIG_DS1302 (which all depend on !RTC_LIB)
> are all defconfig files which seem to be slowly bitrotting.
>
> Time to axe !RTC_LIB? I'm tempted.
>
Okay, later, I will send the patches for RTC_LIB support asap, I'm
testing it currently ;)
Regards,
Wu Zhangjin