linux-mips
[Top] [All Lists]

Re: [PATCH 04/14] MIPS: Add helper function to allow platforms to point

To: John Crispin <blogic@openwrt.org>
Subject: Re: [PATCH 04/14] MIPS: Add helper function to allow platforms to point at a DTB.
From: David Daney <ddaney.cavm@gmail.com>
Date: Mon, 30 Apr 2012 09:50:28 -0700
Cc: Ralf Baechle <ralf@linux-mips.org>, "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=VfMcW08VmuzFtR9vJ+ddjJFez2pXG0KT030Bab87pXo=; b=W7ZAId5h8GA0/ZX/gK/eroWqfgXKLHXIri4dDK+gVwQrRXDhikPfYZKdXJ8igYyHwD KWP/LZUN28O4CkwrlLabhuW/tp1ZMmWtrxMgdaaF35kWWg3tQLNHSNmlSVJg5xLP+HSo G4m7hVpS8QwN3i5k4kGXZk4aj4rjPGftOJneYCraBzFAfmELnf6VJQDe/92aQeA80Eck GiV+8f5wAJ3qEj38rGpv7Ngw8UpgyzV097LTICNsOaNWMmEREDNDiZpkWZRIFYtC73Wz HP5G+N0CH636YIOJV0AuAWQCRpsWRosKyXoV35MRJ6y/7qpPCzLAWVddJe+OwOm/oKEs zl1w==
In-reply-to: <1335785589-32532-4-git-send-email-blogic@openwrt.org>
References: <1335785589-32532-1-git-send-email-blogic@openwrt.org> <1335785589-32532-4-git-send-email-blogic@openwrt.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 04/30/2012 04:32 AM, John Crispin wrote:
Add __dt_setup_arch() that can be called to load a builtin DT.
Additionally we add a macro to allow loading a specific symbol
from the __dtb_* section.

Signed-off-by: Ralf Baechle<ralf@linux-mips.org>
Signed-off-by: John Crispin<blogic@openwrt.org>
---
  arch/mips/include/asm/prom.h |   11 +++++++++++
  arch/mips/kernel/prom.c      |   14 ++++++++++++++
  2 files changed, 25 insertions(+), 0 deletions(-)

[...]
+
+void __init __dt_setup_arch(struct boot_param_header *bph)
+{
+       unsigned long size;
+
+       if (be32_to_cpu(bph->magic) != OF_DT_HEADER) {
+               pr_err("DTB has bad magic, ignoring builtin OF DTB\n");
+
+               return;
+       }
+
+       initial_boot_params = bph;
+       size = be32_to_cpu(bph->totalsize);

size is unused, you can remove it.

+}


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