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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
Signed-off-by: John Crispin<blogic@xxxxxxxxxxx>
---
  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.

+}




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux