From: Sylvain Munaut <tnt@246tNt.com>
To: Jakob Viketoft <jakob.viketoft@bitsim.se>
Cc: Linux PPC Embedded list <linuxppc-embedded@ozlabs.org>
Subject: Re: Platform bus/ppc sys model...
Date: Wed, 30 Mar 2005 11:54:17 +0200 [thread overview]
Message-ID: <424A7749.3040604@246tNt.com> (raw)
In-Reply-To: <424A5C89.2030504@bitsim.se>
Hi,
> Is there some good documentation about how to use the platform bus / ppc
> sys model or is it only possible to read and try to understand the code
> for the freescale devices?
I'm not aware on documentation for the ppc_sys model in particular but
the code is pretty easy to understand/read.
Basically you have a ???_devices.c that describe all the devices you can
find in a family of devices (by family I mean basically the same
processors but with slightly different options/peripheral), then a
???_sys.c that describe each particular variant with the devices that
are really implemented in that variant). Then somewhere in platform init
code, you need to identify the ppc system you're runngin on ( by a
identify_ppc_sys_by_id(mfspr(SPRN_SVR)); for e.g. ).
Kumar, if I got it wrong, please correct ;)
> Specifically, how do you make the kernel aware of a certain device and
> what else is required? Do I have to "connect" the device and the driver
> or will the new model find this out automagically? I'm looking at adding
> the usual serials, emacs etc...
It's "automatic" by using matching of strings. The driver name has to be
the same as the device name. More specifically by matching the name
field in struct platform_device with the name field in struct
device_driver. The code for this magic is in drivers/base/platform.c
> Lastly, I suppose this will be the way all platforms should connect
> their boards with the devices "from now on", right?
It seems to be the trend yes.
The OCP and platform bus model have the same base idea/concept. The
advantage of platform bus is that it's common in multiple arch, the rest
is mainly style. The ppc sys model is based on platform bus to ease
working with SoC variants.
Sylvain.
next prev parent reply other threads:[~2005-03-30 9:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-30 8:00 Platform bus/ppc sys model Jakob Viketoft
2005-03-30 9:54 ` Sylvain Munaut [this message]
2005-03-30 13:52 ` Andrei Konovalov
2005-03-30 15:06 ` Kumar Gala
2005-03-30 16:12 ` Jakob Viketoft
2005-03-30 17:26 ` Kumar Gala
2005-03-31 12:33 ` Jon Masters
2005-03-31 15:55 ` Flat OF Device Tree for ppc32 [was: Platform bus/ppc sys model...] Jon Loeliger
2005-04-04 7:20 ` Jakob Viketoft
2005-04-04 7:31 ` Jon Masters
2005-04-04 10:56 ` Andrei Konovalov
2005-04-04 11:01 ` Jon Masters
2005-04-04 11:08 ` Jakob Viketoft
2005-04-04 16:45 ` Wolfgang Denk
2005-04-04 16:58 ` Andrei Konovalov
2005-04-04 16:56 ` Jon Masters
2005-04-07 17:20 ` Tom Rini
2005-04-07 17:35 ` Jon Loeliger
2005-04-07 17:49 ` Tom Rini
2005-04-11 15:58 ` Jon Loeliger
2005-04-14 9:54 ` Jakob Viketoft
2005-04-15 14:22 ` Jon Loeliger
2005-04-22 17:33 ` Andrei Konovalov
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=424A7749.3040604@246tNt.com \
--to=tnt@246tnt.com \
--cc=jakob.viketoft@bitsim.se \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.