LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Porter <porter@cox.net>
To: "Montgomery, Tim" <timm@artesyncp.com>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: PPC RTC on I2C
Date: Mon, 25 Nov 2002 16:12:40 -0700	[thread overview]
Message-ID: <20021125161239.A20831@home.com> (raw)
In-Reply-To: <F9102D41F595D311ACA7009027DE2C84033FFE27@c3po.heurikon.com>; from timm@artesyncp.com on Mon, Nov 25, 2002 at 04:13:17PM -0600


On Mon, Nov 25, 2002 at 04:13:17PM -0600, Montgomery, Tim wrote:
>
> Hey all,
>
> I'm working on getting i2c support working on a module that has its
> RTC on i2c.
>
> I've got my i2c client written, but i2c-core and friends don't load
> until very late in the game; setting ppc_md.get/set (at least in
> platform_init) is not very useful.
>
> Any thoughts on a graceful way to implement kernel RTC support using
> an i2c-based RTC (w/o bypassing the kernel's i2c layer)?

Hi Tim,

I always thought that one would implement some low-level ppc-specific
i2c master access functions.  These would be available via a few
ppc_mds and one could have a generic i2c 'adapter' to call the
functions.  For RTC access, one would then have a i2c RTC implementation
using these access functions rather than using the generic PPC RTC
device.  This does bypass the bloated i2c layer, however.  If done
properly, though, one could follow a similar strategy to that of
serial.c and with proper locking allow two paths to the hardware
registers.

One could modify the i2c layer to hook up early access of i2c master
devices.  This would be similar to the early initialization of 550
uarts that is available in that driver.  When the full driver is
initialized then accesses would occur in the normal manner.

Regards,
--
Matt Porter
porter@cox.net
This is Linux Country. On a quiet night, you can hear Windows reboot.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  parent reply	other threads:[~2002-11-25 23:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-25 22:13 PPC RTC on I2C Montgomery, Tim
2002-11-25 22:43 ` "Extra cflags for kbuild 2.4." [ _devel tree ] Mark Pilon
2002-11-25 23:12 ` Matt Porter [this message]
2002-11-25 23:06   ` PPC RTC on I2C Dan Malek
2002-11-25 23:07   ` Wolfgang Denk
2002-11-26  8:09     ` Joakim Tjernlund
2002-11-26  8:23 ` leeyang
2002-12-02 10:38   ` QMC driver for 860? Joakim Tjernlund
2002-12-02 12:41     ` Pantelis Antoniou
2002-12-02 13:18       ` Joakim Tjernlund

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=20021125161239.A20831@home.com \
    --to=porter@cox.net \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    --cc=timm@artesyncp.com \
    /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