On Tue, Jun 07, 2011 at 04:22:16PM -0700, David Daney wrote:
> On 06/07/2011 04:02 PM, David VomLehn wrote:
>> On Sun, Jun 05, 2011 at 11:41:10PM -0500, Grant Likely wrote:
>>> On Sun, Jun 5, 2011 at 7:07 PM, Ralf Baechle<firstname.lastname@example.org> wrote:
>>>> Over the past few days I've started to convert arch/mips to use DT.
>> It seems like everything ultimately does create a command line. We could then
>> use a parameter like "devtree=<virtual-address>" on the command line, passed
>> in any way the bootloader likes.
> I would say to pass the pointer to the DTB in the environment, but not
> all platforms (like powertv) have an environment. So I guess the
> command line has to do.
[Actually, PowerTV *could* have an environment; I fought with my bootloader
people to ensure a2 was NULL to allow for future support for passing a
pointer to an environment later. I really wish those guys were in the
same group as the kernel people...]
I think we're kind of stuck with passing something on the command line, which
means passing the command line in the device tree ends up being a bit
confusing. We might want to think about this case a bit:
o Do we take only the device tree argument from the command line, then
replace it with the command line in the device tree, if any?
o Or append the device tree command line to the command line?
o Or do something else entirely?
I'm reluctant to leave it undefined but don't really see one alternative
as clearly better than another.
> Also I think we should pass the physical address of the DTB, not the
> virtual address. It would be the kernel's responsibility to figure out
> what the virtual address is.
I'm good with this. We're currently passing a virtual address with the
command line parameter "devicetree" so, not surprisingly, I'd like to use
some other parameter name if we pass the physical address. Using "devtree"
is nice and short. Or "device_tree" if you like something more less terse.
> David Daney
>> In this case, the<virtual-address> will be
>> a kseg0 address so we don't have to set up any mappings. If we allow multiple
>> device trees to be built in or appended to the end of the kernel, we can use
>> the existing "dtb_compat" command line parameter to select which one to use.
>> I would propose that "devtree" take precedence over "dtb_compat", but that's
>> really just a desire to pick one over the other, whichever is the preferred
Any thoughts on precedence of "devtree"/"device_tree" over "dtb_compat"? My
thought is that something passed explicitly should take precedence over
something built-in, but that's just what I think right now.