linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Mark A. Greer" <mgreer@mvista.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linux/PPC Development <linuxppc-dev@ozlabs.org>
Subject: Re: [RFC] Option to disable mapping genrtc calls to ppc_md calls
Date: Tue, 18 Jan 2005 11:40:50 -0700	[thread overview]
Message-ID: <41ED5832.2040602@mvista.com> (raw)
In-Reply-To: <Pine.GSO.4.61.0501181017110.20681@waterleaf.sonytel.be>

Geert Uytterhoeven wrote:

>On Mon, 17 Jan 2005, Mark A. Greer wrote:
>  
>
>><snip>
>>
>>There are 2 reasons to not use the ppc_md.get_rtc_time() et. al. interfaces:
>>1) They are called before the i2c driver is initialized and even loaded if its
>>a module.
>>    
>>
>
>How is this solved by your patch if genrtc is builtin?
>

It solved because the rtc interface isn't called until you do an hwclock 
presumably in a startup script.

> How is your solution
>different from setting ppc_md.get_rtc_time to your get_rtc_time routine?
>

It arch independent which was the whole motivation for doing it this 
way.  However, it does rely on a startup script to do a 'hwclock 
--hctosys' which happen after driver initialization.  From what I can 
tell sysvinit used to do the hwclock but doesn't anymore so you need a 
script.  The mvl userland has a startup script that does this; others 
probably do too.  Note that using a startup script to do a hwclock is 
pretty standard AFAICT.

>>2) Its ppc-specific.  Implementing get_rtc_time() et. al. directly makes it
>>generic across all architectures.
>>    
>>
>
>... but prevents you from building a kernel that supports both normal RTCs and
>your i2c RTC.
>

Well, yes but you aren't going to be able to do this and be 
arch-agnostic.  If you don't care about running on anything but ppc then 
you can to it the way i2c rtc's have been done before and either kludge 
into the i2c driver during early startup or setup ppc_md.get_rtc_time() 
once the i2c/rtc driver(s) are initialized.  This patch will not 
interfere with that unless you deliberately set that option.

I think the real question you should be ask is are the 
ppc_md.get_rtc_time() et. al. calls really necessary?  Or to put it 
another way, should we be grilling the people who are submitting 
ppc-only solutions and not the ones submitting generic solutions?  :)

Mark

  reply	other threads:[~2005-01-18 18:40 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-17 21:10 [RFC] Option to disable mapping genrtc calls to ppc_md calls Mark A. Greer
2005-01-18  9:20 ` Geert Uytterhoeven
2005-01-18 18:40   ` Mark A. Greer [this message]
2005-01-18 19:01     ` Eugene Surovegin
2005-01-18 16:15 ` Tom Rini
2005-01-18 16:25   ` Dan Malek
2005-01-18 17:39     ` Tolunay Orkun
2005-01-18 18:33       ` Tom Rini
2005-01-18 18:13     ` Tom Rini
2005-01-18 18:58       ` Mark A. Greer
2005-01-18 19:08         ` Tom Rini
2005-01-18 19:43           ` Mark A. Greer
2005-01-19 18:08             ` Tom Rini
2005-01-20 20:52               ` Mark A. Greer
2005-01-20 22:53                 ` Tom Rini
2005-01-20 23:21                   ` Mark A. Greer
2005-01-20 23:47                     ` Tom Rini
2005-01-20 23:56                       ` Mark A. Greer
2005-01-18 18:54     ` Eugene Surovegin
2005-01-20 22:27     ` Benjamin Herrenschmidt
2005-01-18 18:55   ` Mark A. Greer
2005-01-18 19:05     ` Tom Rini
2005-01-18 19:33       ` Mark A. Greer
2005-01-20 22:25 ` Benjamin Herrenschmidt
2005-01-20 23:54   ` Mark A. Greer
2005-01-21  0:01     ` Benjamin Herrenschmidt
2005-01-21  0:09       ` Mark A. Greer
2005-01-21  0:12         ` Benjamin Herrenschmidt
2005-01-21  9:14           ` Geert Uytterhoeven
2005-01-21 14:39             ` Corey Minyard
2005-01-21 22:01             ` Benjamin Herrenschmidt
2005-01-21  9:44         ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41ED5832.2040602@mvista.com \
    --to=mgreer@mvista.com \
    --cc=geert@linux-m68k.org \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).