From: "John Rigby" <jcrigby@gmail.com>
To: "Kári Davíðsson" <kari.davidsson@marel.is>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: OF devices and non OF devices
Date: Tue, 3 Jul 2007 10:31:00 -0600 [thread overview]
Message-ID: <4b73d43f0707030931v42aefc72x2598546e48ae87e8@mail.gmail.com> (raw)
In-Reply-To: <DD39B5C3F4963040ADC9768BE7E430CB020D3B9D@is-hdq-exchange.marel.net>
[-- Attachment #1: Type: text/plain, Size: 2357 bytes --]
One place to find binding between OF devices and non OF devices is in
arch/powerpc/sysdev/fsl_soc.c
The typical pattern is:
if of_find_compatible_node "of-device-name"
platform_device_register_simple ""platform-device-name"
platform_device_add_data ...
On 7/3/07, Kári Davíðsson <kari.davidsson@marel.is> wrote:
>
> Hi,
>
> I am attempting to get some non OF devices working for an mpc 5200 board,
> in particular
> PCF8563 RTC.
>
> This device has an non OF device interface which I believe is correct.
> After all it should work
> on non OF platforms.
>
> I have managed to get the board to run the i2c initialization (and probe)
> for the fsl-mpc i2c driver by
> converting the fsl-mpc i2c driver to OF driver (I found some patch here
> that I based this work on).
fsl-i2c is one of the devices handled by fsl_soc.c so you shouldn't need to
change anything to
make it work in the latest kernel. CONFIG_FSL_SOC was only added to
lite5200_defconfig recently so
that may explain why it's not on in your kernel.
Since the PCF8563 driver is not OF driver only its initaliziation code is
> run but the .probe function
> of the driver is never run. Basically (as far as I can understand) the
> .probe is never run because the
> driver is not an OF driver.
>
> I could convert the PCF8563 driver to OF driver and make it work for our
> puposes but I feel this is
> 1) Wrong
> 2) therefore wasted work.
Since the driver must run on non OF platforms then it should not be
converted. You just need to add a platform_device_register somewhere.
I don't think fsl_soc.c is the right place since it is not part of an
freescale SOC.
You could probably put it in a board specific startup routine.
What seems to elude me is some glue that glues together the OF part of the
> driver space to the non OF part
> of the driver space.
>
> Any hints or pointers on where to find this glue?
>
> Regards,
> kd
>
> P.S. Kernel is post 2.6.20.
>
> --
> Kári Davíðsson | kari.davidsson@marel.is
> Hugbúnaðargerð | www.marel.com
> Tel: 563-8156 Fax: +354 563 8001
> Iceland
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
[-- Attachment #2: Type: text/html, Size: 3482 bytes --]
next prev parent reply other threads:[~2007-07-03 16:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-03 14:54 OF devices and non OF devices Kári Davíðsson
2007-07-03 16:31 ` John Rigby [this message]
2007-07-04 4:24 ` about FCC of MPC8270 li.chunlin
2007-07-04 5:42 ` Matvejchikov Ilya
2007-07-04 6:55 ` li.chunlin
2007-07-04 7:02 ` Matvejchikov Ilya
2007-07-04 7:50 ` li.chunlin
2007-07-04 12:00 ` OF devices and non OF devices Kári Davíðsson
2007-07-05 13:28 ` John Rigby
2007-07-05 17:20 ` John Rigby
2007-07-18 11:13 ` Kári Davíðsson
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=4b73d43f0707030931v42aefc72x2598546e48ae87e8@mail.gmail.com \
--to=jcrigby@gmail.com \
--cc=kari.davidsson@marel.is \
--cc=linuxppc-embedded@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).