From: Matt Sealey <matt@genesi-usa.com>
To: avorontsov@ru.mvista.com
Cc: Scott Wood <scottwood@freescale.com>,
linuxppc-dev@ozlabs.org,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Subject: Re: [PATCH] powerpc: Remove device_type = "rtc" properties in .dts files
Date: Wed, 22 Oct 2008 13:40:50 -0500 [thread overview]
Message-ID: <48FF73B2.8040600@genesi-usa.com> (raw)
In-Reply-To: <20081022135046.GA30347@oksana.dev.rtsoft.ru>
Anton Vorontsov wrote:
> On Wed, Oct 22, 2008 at 08:38:03AM -0500, Matt Sealey wrote:
>> I'm extremely troubled that it is "not used in the code", surely
>> device_type is checked as a legacy for Open Firmware (otherwise a lot of
>> devices may never be detected!),
>
> Checked where?
of_find_device_by_type() goes through it and
of_find_compatible_node() - while not directly, checks the
type field of the node which is filled in from device_type
BEFORE it checks the compatible property.
This isn't specific CHRP/FDT platform code it's in the generic
tree scanning functions.
> platforms, the CHRP is running real OF, so it is irrelevant if it
> checks for device_type = "rtc" or not.)
Except when there is no compatible property because the device
is adequately identified by device_type (for instance if you
are looking for every serial port on a system, device_type is
your only hope without checking for every different KIND of
serial port you may ever possibly encounter.. or if you are
checking for what kind of console OF attached you to (be it
display/keyboard combination or serial or something else).
It's a useful property that should be kept around, you never
know when it might be needed :D but of course since it's not
in ePAPR, no point in shoving it in when "compatible"
describes your board very very accurately anyway (except when
you have no need to be very very accurate and are just looking
for serial ports... :)
--
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations
next prev parent reply other threads:[~2008-10-22 18:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-21 18:58 [PATCH] powerpc: Remove device_type = "rtc" properties in .dts files Anton Vorontsov
2008-10-21 19:37 ` Grant Likely
2008-10-22 0:04 ` David Gibson
2008-10-22 13:38 ` Matt Sealey
2008-10-22 13:50 ` Anton Vorontsov
2008-10-22 18:40 ` Matt Sealey [this message]
2008-10-22 18:59 ` Anton Vorontsov
2008-10-22 19:09 ` Matt Sealey
2008-10-22 19:28 ` Anton Vorontsov
[not found] <C3C48FF2CBB.7060605@genesi-usa.com>
2008-10-22 20:38 ` Milton Miller
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=48FF73B2.8040600@genesi-usa.com \
--to=matt@genesi-usa.com \
--cc=avorontsov@ru.mvista.com \
--cc=g.liakhovetski@gmx.de \
--cc=linuxppc-dev@ozlabs.org \
--cc=scottwood@freescale.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 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.