- 30 8月, 2013 3 次提交
-
-
由 Anton Blanchard 提交于
We feed the entire DMI table into the random pool to provide better random data during early boot, so do the same with the flattened device tree. Signed-off-by: NAnton Blanchard <anton@samba.org> Signed-off-by: NGrant Likely <grant.likely@linaro.org>
-
由 Grant Likely 提交于
The flat tree unflatting path is using unsigned longs to carry around virtual address pointers to the device tree and the allocated memory used to unpack it. This is a little insane since every access to them needs to be cast to a pointer type before using it. This patch changes the data type to void* for the 'start' and 'mem' pointers and reworks the unflattening functions to use those values directly which results in slightly simpler code. Signed-off-by: NGrant Likely <grant.likely@linaro.org>
-
由 Grant Likely 提交于
Patch 9e401275, "of: fdt: fix memory initialization for expanded DT" fixed incomplete clearing of memory when unflattening the device tree. However the code was already clearing some of the memory, it just wasn't doing so for all allocations. Now that the memory is cleared right at the point of allocation, the memset after unflatten_dt_alloc() is redundant. Remove it. Signed-off-by: NGrant Likely <grant.likely@linaro.org> Acked-by: NWladislav Wiebe <wladislav.kw@gmail.com>
-
- 29 8月, 2013 1 次提交
-
-
由 Grant Likely 提交于
Most architectures use the same implementation. Collapse the common ones into a single weak function that can be overridden. Signed-off-by: NGrant Likely <grant.likely@linaro.org>
-
- 27 8月, 2013 1 次提交
-
-
由 Marek Szyprowski 提交于
Add a function to scan the flattened device-tree starting from the node given by the path. It is used to extract information (like reserved memory), which is required on early boot before we can unflatten the tree. Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Acked-by: NTomasz Figa <t.figa@samsung.com> Reviewed-by: NRob Herring <rob.herring@calxeda.com>
-
- 22 8月, 2013 1 次提交
-
-
由 Wladislav Wiebe 提交于
Already existing property flags are filled wrong for properties created from initial FDT. This could cause problems if this DYNAMIC device-tree functions are used later, i.e. properties are attached/detached/replaced. Simply dumping flags from the running system show, that some initial static (not allocated via kzmalloc()) nodes are marked as dynamic. I putted some debug extensions to property_proc_show(..) : .. + if (OF_IS_DYNAMIC(pp)) + pr_err("DEBUG: xxx : OF_IS_DYNAMIC\n"); + if (OF_IS_DETACHED(pp)) + pr_err("DEBUG: xxx : OF_IS_DETACHED\n"); when you operate on the nodes (e.g.: ~$ cat /proc/device-tree/*some_node*) you will see that those flags are filled wrong, basically in most cases it will dump a DYNAMIC or DETACHED status, which is in not true. (BTW. this OF_IS_DETACHED is a own define for debug purposes which which just make a test_bit(OF_DETACHED, &x->_flags) If nodes are dynamic kernel is allowed to kfree() them. But it will crash attempting to do so on the nodes from FDT -- they are not allocated via kzmalloc(). Signed-off-by: NWladislav Wiebe <wladislav.kw@gmail.com> Acked-by: NAlexander Sverdlin <alexander.sverdlin@nsn.com> Cc: stable@vger.kernel.org Signed-off-by: NRob Herring <rob.herring@calxeda.com>
-
- 24 7月, 2013 1 次提交
-
-
由 Santosh Shilimkar 提交于
On some PAE architectures, the entire range of physical memory could reside outside the 32-bit limit. These systems need the ability to specify the initrd location using 64-bit numbers. This patch globally modifies the early_init_dt_setup_initrd_arch() function to use 64-bit numbers instead of the current unsigned long. There has been quite a bit of debate about whether to use u64 or phys_addr_t. It was concluded to stick to u64 to be consistent with rest of the device tree code. As summarized by Geert, "The address to load the initrd is decided by the bootloader/user and set at that point later in time. The dtb should not be tied to the kernel you are booting" More details on the discussion can be found here: https://lkml.org/lkml/2013/6/20/690 https://lkml.org/lkml/2012/9/13/544Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: NRob Herring <rob.herring@calxeda.com> Acked-by: NVineet Gupta <vgupta@synopsys.com> Acked-by: NJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: NGrant Likely <grant.likely@linaro.org>
-
- 18 6月, 2013 1 次提交
-
-
由 Robert P. J. Day 提交于
Fix "/aliasas" typo in comments, no functional change. Signed-off-by: NRobert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 18 12月, 2012 1 次提交
-
-
由 Andy Shevchenko 提交于
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NGrant Likely <grant.likely@secretlab.ca> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 30 11月, 2012 1 次提交
-
-
由 Randy Dunlap 提交于
ERROR: "allnodes" [drivers/w1/masters/w1-gpio.ko] undefined! Signed-off-by: NRandy Dunlap <rdunlap@infradead.org> [grant.likely: allnodes is too generic; rename to of_allnodes] Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Cc: Ville Syrjala <syrjala@sci.fi>
-
- 21 11月, 2012 2 次提交
-
-
由 Catalin Marinas 提交于
Commit 509b7455 (of/fdt: Don't copy garbage after "/" in root node path) sets the path length to 0 to ignore any garbage after "/" in the root node path. This has the side effect of also ignoring '\0' at the end of the root node path. This patch sets the ignores the garbage by setting the last character to '\0' and length to 1. Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: NRob Herring <rob.herring@calxeda.com>
-
由 Fabio Estevam 提交于
Constify 'pathp' in order to get rid of the following warning: drivers/of/fdt.c:491:10: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> [Rob Herring: also constify np and lp] Signed-off-by: NRob Herring <rob.herring@calxeda.com>
-
- 17 11月, 2012 1 次提交
-
-
由 Grant Likely 提交于
Neither of these should ever be changed once set. Make them const and fix up the users that try to modify it in-place. In one case kmalloc+memcpy is replaced with kstrdup() to avoid modifying the string. Build tested with defconfigs on ARM, PowerPC, Sparc, MIPS, x86 among others. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NDavid S. Miller <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Julian Calaby <julian.calaby@gmail.com>
-
- 11 11月, 2012 1 次提交
-
-
由 Benjamin Herrenschmidt 提交于
The root node path must be internally converted to "/", or various pieces of code looking for it that way will fail. The code to do that however had a bug where we might incorrectly append pieces of the original path from the fdt to the "/". We should probably add a proper dedicated accessor for the root node but in the meantime this patch should fix it. Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: NRob Herring <rob.herring@calxeda.com>
-
- 28 2月, 2012 1 次提交
-
-
由 Danny Kukawka 提交于
drivers/of/fdt.c included 'asm/setup.h' twice, remove the duplicate. Signed-off-by: NDanny Kukawka <danny.kukawka@bisect.de> Signed-off-by: NRob Herring <rob.herring@calxeda.com>
-
- 10 1月, 2012 1 次提交
-
-
由 Yu Yue 提交于
In the file drivers/of/fdt.c, it uses the COMMAND_LINE_SIZE which is stated in asm/setup.h, so asm/setup.h should be included in drivers/of/fdt.c. Signed-off-by: NYu Yue <yuyue@mprc.pku.edu.cn> Signed-off-by: NGuan Xuetao <guanxuetao@mprc.pku.edu.cn> Cc: Grant Likerly <grant.likely@secretlab.ca> Cc: devicetree-discuss@lists.ozlabs.org Cc: Arnd Bergmann <arnd@arndb.de>
-
- 05 1月, 2012 1 次提交
-
-
由 Fabio Estevam 提交于
Fix the following build error: CC [M] fs/udf/balloc.o In file included from /home/fabio/next/linux-next/arch/arm/include/asm/prom.h:16, from include/linux/of.h:140, from include/asm-generic/gpio.h:7, from arch/arm/plat-mxc/include/mach/irqs.h:14, from /home/fabio/next/linux-next/arch/arm/include/asm/irq.h:4, from /home/fabio/next/linux-next/arch/arm/include/asm/hardirq.h:6, from include/linux/hardirq.h:7, from include/linux/highmem.h:8, from include/linux/pagemap.h:10, from include/linux/buffer_head.h:13, from fs/udf/udfdecl.h:11, from fs/udf/balloc.c:22: /home/fabio/next/linux-next/arch/arm/include/asm/setup.h:146: error: redefinition of 'struct tag' Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> [grant.likely: fix build failure on drivers/of/fdt.c] Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 28 12月, 2011 1 次提交
-
-
由 Uwe Kleine-König 提交于
This allows dt_compat to point to a constant list of compatible strings. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NRob Herring <rob.herring@calxeda.com>
-
- 23 9月, 2011 1 次提交
-
-
由 Shawn Guo 提交于
The patch adds function of_alias_scan to populate a global lookup table with the properties of 'aliases' node and function of_alias_get_id for drivers to find alias id from the lookup table. v3: Split out automatic addition of aliases on id lookup so that it can be debated separately from the core functionality. v2: - Add of_chosen/of_aliases populating and of_alias_scan() invocation for OF_PROMTREE. - Add locking - rework parse loop Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Acked-by: NDavid S. Miller <davem@davemloft.net> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 20 9月, 2011 1 次提交
-
-
由 Benjamin Herrenschmidt 提交于
We used to overwrite with CONFIG_CMDLINE if we found a chosen node but failed to get bootargs out of it or they were empty, unless CONFIG_CMDLINE_FORCE is set. Instead change that to overwrite if "data" is non empty after the bootargs check. It allows arch code to have other mechanisms to retrieve the command line prior to parsing the device-tree. Note: CONFIG_CMDLINE_FORCE case should ideally be handled elsewhere as it won't work as it-is if the device-tree has no /chosen node Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> CC: devicetree-discuss@lists-ozlabs.org CC: Grant Likely <grant.likely@secretlab.ca> Acked-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 04 8月, 2011 1 次提交
-
-
由 Grant Likely 提交于
This reverts commit 750f463a. of_alias_* still needs work to be generalized for 'promtree' dt platforms, and to no implicitly create entries for available ids. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 03 8月, 2011 1 次提交
-
-
由 Shawn Guo 提交于
The patch adds function of_alias_scan to populate a global lookup table with the properties of 'aliases' node and function of_alias_get_id for drivers to find alias id from the lookup table. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> [grant.likely: add locking and rework parse loop] Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 11 5月, 2011 1 次提交
-
-
由 Grant Likely 提交于
This patch drops the reference to a global 'cmd_line' variable from early_init_dt_scan_chosen, and instead passes the pointer to the command line string via the *data argument. Each architecture does something slightly different with the initial command line, so it makes sense for the architecture to be able to specify the variable name. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 31 3月, 2011 1 次提交
-
-
由 Lucas De Marchi 提交于
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: NLucas De Marchi <lucas.demarchi@profusion.mobi>
-
- 24 3月, 2011 1 次提交
-
-
由 Andres Salomon 提交于
- static-ize some functions - add some additional comments Signed-off-by: NAndres Salomon <dilinger@queued.net> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 16 1月, 2011 1 次提交
-
-
由 Grant Likely 提交于
The physical address is never used by the device tree code when allocating memory for unflattening. Change the architecture's alloc hook to return the virutal address instead. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 02 1月, 2011 1 次提交
-
-
由 Grant Likely 提交于
This patch adds of_flat_dt_match() which tests a node for compatibility with a list of values and converts the relevant powerpc platform code to use it. This approach simplifies the board support code a bit. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Reviewed-by: NStephen Neuendorffer <stephen.neuendorffer@xilinx.com>
-
- 30 12月, 2010 5 次提交
-
-
由 Stephen Neuendorffer 提交于
unflatten_device_tree has two dependencies on things that happen during boot time. Firstly, it references the initial device tree directly. Secondly, it allocates memory using the early boot allocator. This patch factors out these dependencies and uses the new __unflatten_device_tree function to implement a driver-visible fdt_unflatten_tree function, which can be used to unflatten a blob after boot time. V2: - remove extra __va() call - make dt_alloc functions return void *. This doesn't fix the general strangeness in this code that constantly casts back and forth between unsigned long and __be32 * Signed-off-by: NStephen Neuendorffer <stephen.neuendorffer@xilinx.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Stephen Neuendorffer 提交于
Move unflatten_dt_node to be grouped with non-__init functions. Signed-off-by: NStephen Neuendorffer <stephen.neuendorffer@xilinx.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Stephen Neuendorffer 提交于
unflatten_dt_node is a helper function that does most of the work to convert a device tree blob into tree of device nodes. This code now uses a passed-in blob instead of using the single boot-time blob, allowing it to be called in more contexts. Signed-off-by: NStephen Neuendorffer <stephen.neuendorffer@xilinx.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Stephen Neuendorffer 提交于
In preparation for providing run-time handling of device trees, factor out some of the basic functions so that they take an arbitrary blob, rather than relying on the single boot-time tree. V2: - functions have of_fdt_* names - removed find_flat_dt_string - blob argument is first Signed-off-by: NStephen Neuendorffer <stephen.neuendorffer@xilinx.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Stephen Neuendorffer 提交于
The device tree code is now in two pieces: some which can be used generically on any platform which selects CONFIG_OF_FLATTREE, and some early which is used at boot time on only a few architectures. This patch segregates the early code so that only those architectures which care about it need compile it. This also means that some of the requirements in the early code (such as a cmd_line variable) that most architectures (e.g. X86) don't provide can be ignored. Signed-off-by: NStephen Neuendorffer <stephen.neuendorffer@xilinx.com> [grant.likely@secretlab.ca: remove extra blank line addition] [grant.likely@secretlab.ca: fixed incorrect #ifdef CONFIG_EARLY_FLATTREE check] [grant.likely@secretlab.ca: Made OF_EARLY_FLATTREE select instead of depend on OF_FLATTREE] Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 22 10月, 2010 1 次提交
-
-
由 Grant Likely 提交于
This patch refactors the early init parsing of the chosen node so that architectures aren't forced to provide an empty implementation of early_init_dt_scan_chosen_arch. Instead, if an architecture wants to do something different, it can either use a wrapper function around early_init_dt_scan_chosen(), or it can replace it altogether. This patch was written in preparation to adding device tree support to both x86 ad MIPS. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Tested-by: NDavid Daney <ddaney@caviumnetworks.com>
-
- 25 7月, 2010 2 次提交
-
-
由 Grant Likely 提交于
The flat tree code wasn't fixing the endianness on phandle values when unflattening the tree, and the code in drivers/of wasn't always doing a be32_to_cpu before trying to dereference the phandle values. This patch fixes them. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Stuart Yoder 提交于
With the current string comparison, a device tree compatible of "foo-bar" would match as compatible with a driver looking for "foo". This patch fixes the function to use the of_compat_cmp() macro so that it does the right thing on all platforms (If sparc ever uses this code, it will still want the strncasecmp() behaviour). Signed-off-by: NStuart Yoder <stuart.yoder@freescale.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 15 7月, 2010 1 次提交
-
-
由 Grant Likely 提交于
There's no reason to use the powerpc-specific _ALIGN macro in the fdt code. Replace it with ALIGN() from kernel.h Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-By: NJeremy Kerr <jeremy.kerr@canonical.com> Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 29 4月, 2010 1 次提交
-
-
由 Grant Likely 提交于
This patch makes unflatten_device_tree() safe to call from any arch setup code with the following changes: - Make sure initial_boot_params actually points to a device tree blob before unflattening - Make sure the initial_boot_params->magic field is correct - If CONFIG_OF_FLATTREE is not set, then make unflatten_device_tree() an empty static inline function. This patch also adds some additional debug output to the top of unflatten_device_tree(). Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 27 3月, 2010 1 次提交
-
-
由 Jason Gunthorpe 提交于
NOPs within the property section are skipped, but NOPs between OF_DT_END_NODE and OF_DT_BEGIN_NODE were not. My firmware NOPs out entire nodes depending on various environment parameters. of_scan_flat_dt already handles NOP more generally. Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 14 2月, 2010 1 次提交
-
-
由 Jeremy Kerr 提交于
We don't always have lmb available, so make arches provide an early_init_dt_alloc_memory_arch() to handle the allocation of memory in the fdt code. When we don't have lmb.h included, we need asm/page.h for __va. Signed-off-by: NJeremy Kerr <jeremy.kerr@canonical.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: NMichal Simek <monstr@monstr.eu>
-
- 09 2月, 2010 1 次提交
-
-
由 David Gibson 提交于
Currently when processing flattened device trees, the kernel expects the phandle in a property called "linux,phandle". The ePAPR spec - not being Linux specific - instead requires phandles to be encoded in a property named simply "phandle". This patch makes the kernel accept either form when unflattening the device tree. Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-