linux-mips
[Top] [All Lists]

Re: [PATCH] OF: MIPS: sead3: Implement OF support.

To: linux-mips@linux-mips.org
Subject: Re: [PATCH] OF: MIPS: sead3: Implement OF support.
From: John Crispin <john@phrozen.org>
Date: Fri, 07 Dec 2012 08:40:29 +0100
In-reply-to: <1354857297-28863-1-git-send-email-sjhill@mips.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1354857297-28863-1-git-send-email-sjhill@mips.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.7) Gecko/20120922 Icedove/10.0.7
Hi,

  obj-y                         += sead3-i2c-dev.o sead3-i2c.o \
@@ -17,3 +19,11 @@ obj-y                                += sead3-i2c-dev.o 
sead3-i2c.o \

  obj-$(CONFIG_EARLY_PRINTK)    += sead3-console.o
  obj-$(CONFIG_USB_EHCI_HCD)    += sead3-ehci.o
+
+DTS_FILES = sead3.dts
+DTB_FILES = $(patsubst %.dts, %.dtb, $(DTS_FILES))
+
+obj-y += $(patsubst %.dts, %.dtb.o, $(DTS_FILES))
+
+$(obj)/%.dtb: $(obj)/%.dts FORCE
+       $(call if_changed_dep,dtc)

there is a patch already in -next that obseletes this


+void __init device_tree_init(void)
+{
+       unsigned long base, size;
+
+       if (!initial_boot_params)
+               return;
+
+       base = virt_to_phys((void *)initial_boot_params);
+       size = be32_to_cpu(initial_boot_params->totalsize);
+
+       /* Before we do anything, lets reserve the dt blob */
+       reserve_bootmem(base, size, BOOTMEM_DEFAULT);
+
+       unflatten_device_tree();
+
+       /* free the space reserved for the dt blob */
+       free_bootmem(base, size);

this free is one free too many. it will kill the devcietree. the code where you copied this from has been fixed in -next



John

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