linux-mips
[Top] [All Lists]

Re: Converting MIPS to Device Tree

To: Ralf Baechle <ralf@linux-mips.org>
Subject: Re: Converting MIPS to Device Tree
From: David Daney <ddaney@caviumnetworks.com>
Date: Fri, 10 Jun 2011 12:00:01 -0700
Cc: David VomLehn <dvomlehn@cisco.com>, Grant Likely <grant.likely@secretlab.ca>, linux-mips@linux-mips.org, Imre Kaloz <kaloz@openwrt.org>, Gabor Juhos <juhosg@openwrt.org>, John Crispin <blogic@openwrt.org>, "Dezhong Diao (dediao)" <dediao@cisco.com>, Thomas Gleixner <tglx@linutronix.de>
In-reply-to: <20110610185745.GA3536@linux-mips.org>
References: <20110606010753.GA16202@linux-mips.org> <BANLkTik1mRWTcX8WgO5s6mFrUGYwBRmSow@mail.gmail.com> <20110607230218.GA23552@dvomlehn-lnx2.corp.sa.net> <4DEEB2A8.8050302@caviumnetworks.com> <20110610185745.GA3536@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10
On 06/10/2011 11:57 AM, Ralf Baechle wrote:
On Tue, Jun 07, 2011 at 04:22:16PM -0700, David Daney wrote:

use a parameter like "devtree=<virtual-address>" on the command line, passed
in any way the bootloader likes.

Some  u-boots for non-mips platforms pass it in the environment of
the bootm protocol.

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.

3 steps:

   1) Use command line argument for DT
   2) Iff 1) fails, use DT specified by environment

I'm OK with this as long as we can define 'the environment' to include what I am currently doing on Octeon.


   3) Iff 1) and 2) fail, use builtin DTB.

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 like the basic idea - but ...  Most firmware will only use KSEG0 / XKPHYS
mappings so there should be no aliasing issue but still there could be
conflicting cache modes.  So we should also specify that firmware should
writeback and invalidate the DTB from caches.

   Ralf



<Prev in Thread] Current Thread [Next in Thread>