- 16 8月, 2016 1 次提交
-
-
由 Lucas Stach 提交于
The called of_graph_get_next_endpoint() already decrements the refcount of the prev node, so it is wrong to do it again in the calling function. Use the for_each_endpoint_of_node() helper to interate through the endpoint OF nodes, which already does the right thing and simplifies the code a bit. Fixes: 8ccd0d0c (of: add helper for getting endpoint node of specific identifiers) Cc: stable@vger.kernel.org Reported-by: NDavid Jander <david@protonic.nl> Signed-off-by: NLucas Stach <l.stach@pengutronix.de> Acked-by: NPhilipp Zabel <p.zabel@pengutronix.de> Signed-off-by: NRob Herring <robh@kernel.org>
-
- 13 8月, 2016 1 次提交
-
-
由 Kevin Hao 提交于
With the commit 44a7185c ("of/platform: Add common method to populate default bus"), a default function is introduced to populate the default bus and this function is invoked at the arch_initcall_sync level. But a lot of ppc boards use machine_device_initcall() to populate the default bus. This means that the default populate function has higher priority and would override the arch specific population of the bus. The side effect is that some arch specific bus are not probed, then cause various malfunction due to the miss of some devices. Since it is very possible to introduce bugs if we simply change the initcall level for all these boards(about 30+). This just disable this default function for all the ppc boards. Signed-off-by: NKevin Hao <haokexin@gmail.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
- 10 8月, 2016 3 次提交
-
-
由 Philipp Zabel 提交于
That way the init callback may clear the flag again, in case of drivers split between early irq chip and a normal platform driver. Fixes: 15cc2ed6 ("of/irq: Mark initialised interrupt controllers as populated") Suggested-by: NRob Herring <robh@kernel.org> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de> Acked-by: NJon Hunter <jonathanh@nvidia.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Gavin Shan 提交于
@mynodes is set to NULL when __unflatten_device_tree() is called to unflatten device sub-tree in PCI hot add scenario on PowerPC PowerNV platform. Marking @mynodes detached unconditionally causes kernel crash as below backtrace shows: Unable to handle kernel paging request for data at address 0x00000000 Faulting instruction address: 0xc000000000b26f64 cpu 0x0: Vector: 300 (Data Access) at [c000003fcc7cf740] pc: c000000000b26f64: __unflatten_device_tree+0xf4/0x190 lr: c000000000b26f40: __unflatten_device_tree+0xd0/0x190 sp: c000003fcc7cf9c0 msr: 900000000280b033 dar: 0 dsisr: 40000000 current = 0xc000003fcc281680 paca = 0xc00000000ff00000 softe: 0 irq_happened: 0x01 pid = 2724, comm = sh Linux version 4.7.0-gavin-07754-g92a6836 (gwshan@gwshan) (gcc version \ 4.9.3 (Buildroot 2016.02-rc2-00093-g5ea3bce) ) #539 SMP Mon Aug 1 \ 12:40:29 AEST 2016 enter ? for help [c000003fcc7cfa50] c000000000b27060 of_fdt_unflatten_tree+0x60/0x90 [c000003fcc7cfaa0] c0000000004c6288 pnv_php_set_slot_power_state+0x118/0x440 [c000003fcc7cfb80] c0000000004c6a10 pnv_php_enable+0xc0/0x170 [c000003fcc7cfbd0] c0000000004c4d80 power_write_file+0xa0/0x190 [c000003fcc7cfc50] c0000000004be93c pci_slot_attr_store+0x3c/0x60 [c000003fcc7cfc70] c0000000002d3fd4 sysfs_kf_write+0x94/0xc0 [c000003fcc7cfcb0] c0000000002d2c30 kernfs_fop_write+0x180/0x260 [c000003fcc7cfd00] c000000000230fe0 __vfs_write+0x40/0x190 [c000003fcc7cfd90] c000000000232278 vfs_write+0xc8/0x240 [c000003fcc7cfde0] c000000000233d90 SyS_write+0x60/0x110 [c000003fcc7cfe30] c000000000009524 system_call+0x38/0x108 This avoids the kernel crash by marking @mynodes detached only when @mynodes is dereferencing valid device node in __unflatten_device_tree(). Fixes: 1d1bde55 ("of: fdt: mark unflattened tree as detached") Reported-by: NMeng Li <shlimeng@cn.ibm.com> Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Markus Elfring 提交于
The of_node_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net> Signed-off-by: NRob Herring <robh@kernel.org>
-
- 06 8月, 2016 1 次提交
-
-
由 Kees Cook 提交于
Instead of a ramoops-specific node, use a child node of /reserved-memory. This requires that of_platform_device_create() be explicitly called for the node, though, since "/reserved-memory" does not have its own "compatible" property. Suggested-by: NRob Herring <robh@kernel.org> Signed-off-by: NKees Cook <keescook@chromium.org> Acked-by: NRob Herring <robh@kernel.org>
-
- 20 7月, 2016 1 次提交
-
-
由 Benjamin Herrenschmidt 提交于
This provides an equivalent of of_fdt_match() for non-flat trees. This is more practical than matching an array of of_device_id structs when converting a bunch of existing users of of_fdt_match(). Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
-
- 19 7月, 2016 3 次提交
-
-
由 Michal Suchanek 提交于
The tree returned from of_fdt_unflatten_tree cannot be attached to the live tree because it is not marked as detached so mark it as such. The dt resolver checks the flag and refuses to process the tree otherwise. Signed-off-by: NMichal Suchanek <hramrach@gmail.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Michal Suchanek 提交于
Applying overlay fails silently in case of an error. Add error prints. Most notably the lack of symbols in the live tree is not reported. Signed-off-by: NMichal Suchanek <hramrach@gmail.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Rob Herring 提交于
Clean-up all the DT printk functions to use common pr_fmt prefix. Some print statements such as kmalloc errors were redundant, so just drop those. Cc: Frank Rowand <frowand.list@gmail.com> Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Reviewed-by: NFrank Rowand <frank.rowand@am.sony.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
- 17 7月, 2016 1 次提交
-
-
由 Dongpo Li 提交于
Abstract a general interface "of_phy_get_and_connect" for PHY connect. User will have no bother with getting "phy-mode" and "phy-handle" any more. Suggested-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NDongpo Li <lidongpo@hisilicon.com> Reviewed-by: NJiancheng Xue <xuejiancheng@hisilicon.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 06 7月, 2016 1 次提交
-
-
由 Shannon Zhao 提交于
Sometimes it needs to check if there is a subnode of given node in FDT by given name. Introduce this helper to get the subnode if it exists. CC: Rob Herring <robh@kernel.org> Signed-off-by: NShannon Zhao <shannon.zhao@linaro.org> Acked-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: NRob Herring <robh@kernel.org> Tested-by: NJulien Grall <julien.grall@arm.com>
-
- 28 6月, 2016 1 次提交
-
-
由 Arnd Bergmann 提交于
Calling the fixed-phy functions when CONFIG_FIXED_PHY=m as a previous change tried cannot work if the caller is in built-in code: drivers/of/built-in.o: In function `of_phy_register_fixed_link': of_reserved_mem.c:(.text+0x85e0): undefined reference to `fixed_phy_register' Making of_mdio depend on 'FIXED_PHY || !FIXED_PHY' would solve this dependency by enforcing that OF_MDIO itself becomes a loadable module when FIXED_PHY=y, but that creates a different dependency as it breaks any built-in ethernet driver that uses of_mdio. Making FIXED_PHY a bool option also cannot work, since it depends on PHYLIB, which again is tristate. This version now uses 'select FIXED_PHY' to ensure that the fixed-phy portion of of_mdio is not optional. The main downside of this is a small increase in code size for cases that do not need fixed phy support, but it should avoid all of the link-time problems. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Fixes: d1bd330a ("of_mdio: Enable fixed PHY support if driver is a module") Acked-by: NRandy Dunlap <rdunlap@infradead.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 25 6月, 2016 2 次提交
-
-
由 Jon Hunter 提交于
For interrupt controllers successfully initialised early via device-tree, mark these interrupt controllers as populated so we don't unnecessarily create a device and populate any platform data later on in the boot sequence when we populate all the various platform devices. Signed-off-by: NJon Hunter <jonathanh@nvidia.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Frank Rowand 提交于
Fix a memory leak resulting from memory allocation in safe_name(). This patch fixes all call sites of safe_name(). Mathieu Malaterre reported the memory leak on boot: On my PowerMac device-tree would generate a duplicate name: [ 0.023043] device-tree: Duplicate name in PowerPC,G4@0, renamed to "l2-cache#1" in this case a newly allocated name is generated by `safe_name`. However in this case it is never deallocated. The bug was found using kmemleak reported as: unreferenced object 0xdf532e60 (size 32): comm "swapper", pid 1, jiffies 4294892300 (age 1993.532s) hex dump (first 32 bytes): 6c 32 2d 63 61 63 68 65 23 31 00 dd e4 dd 1e c2 l2-cache#1...... ec d4 ba ce 04 ec cc de 8e 85 e9 ca c4 ec cc 9e ................ backtrace: [<c02d3350>] kvasprintf+0x64/0xc8 [<c02d3400>] kasprintf+0x4c/0x5c [<c0453814>] safe_name.isra.1+0x80/0xc4 [<c04545d8>] __of_attach_node_sysfs+0x6c/0x11c [<c075f21c>] of_core_init+0x8c/0xf8 [<c0729594>] kernel_init_freeable+0xd4/0x208 [<c00047e8>] kernel_init+0x24/0x11c [<c00158ec>] ret_from_kernel_thread+0x5c/0x64 Link: https://bugzilla.kernel.org/show_bug.cgi?id=120331Signed-off-by: NFrank Rowand <frank.rowand@am.sony.com> Reported-by: mathieu.malaterre@gmail.com Tested-by: NMathieu Malaterre <mathieu.malaterre@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: NRob Herring <robh@kernel.org>
-
- 24 6月, 2016 4 次提交
-
-
由 Kefeng Wang 提交于
This reverts commit b80443c2. After covering to use helper of_platform_default_populate() to populate the default bus, no need to export of_default_bus_match_table anymore. Reviewed-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Rob Herring <robh+dt@kernel.org> Cc: Frank Rowand <frowand.list@gmail.com> Cc: Grant Likely <grant.likely@linaro.org> Signed-off-by: NKefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Kefeng Wang 提交于
Use helper of_platform_default_populate() in linux/of_platform when possible, instead of calling of_platform_populate() with the default match table. Cc: Rob Herring <robh+dt@kernel.org> Cc: Frank Rowand <frowand.list@gmail.com> Cc: Grant Likely <grant.likely@linaro.org> Signed-off-by: NKefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Kefeng Wang 提交于
The arch code calls of_platform_populate() with default match table when it wants to populate default bus. This patch introduce a new of_platform_default_populate_init() and make it arch_initcall_sync(it should be later than some iommu configration, eg, of_iommu_init() and swiotlb_late_init in arm64), then we can finish above job in common method. In order to avoid the default bus being populated twice, simply checking the flag of bus node whether has be set OF_POPULATED_BUS or not. After that, we can safely remove the caller in arch code. Btw, add debug print in of_platform_populate(), and use __func__ to print function's name of of_platform_bus_create(). Cc: Rob Herring <robh+dt@kernel.org> Cc: Frank Rowand <frowand.list@gmail.com> Cc: Grant Likely <grant.likely@linaro.org> Signed-off-by: NKefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Ben Hutchings 提交于
The fixed_phy driver doesn't have to be built-in, and it's important that of_mdio supports it even if it's a module. Signed-off-by: NBen Hutchings <ben.hutchings@codethink.co.uk> Acked-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 10 6月, 2016 1 次提交
-
-
由 Gavin Shan 提交于
The function is unflattening device sub-tree blob if @dad passed to the function is valid. Currently, this functionality is used by PPC PowerNV PCI hotplug driver only. There are possibly multiple nodes in the first level of depth, fdt_next_node() bails immediately when @depth becomes negative before the second device node can be probed successfully. It leads to the device nodes except the first one won't be unflattened successfully. This fixes the issue by setting the initial depth (@inital_depth) to 1 when this function is called to unflatten device sub-tree blob. No logic changes when this function is used to unflatten non-sub-tree blob. Cc: Rhyland Klein <rklein@nvidia.com> Fixes: 78c44d91 ("drivers/of: Fix depth when unflattening devicetree") Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com> Tested-by: NRhyland Klein <rklein@nvidia.com> Tested-by: NAndrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
- 09 6月, 2016 1 次提交
-
-
由 Marek Szyprowski 提交于
Change return value back to -ENODEV when no region is defined for given device. This restores old behavior of this function, as some drivers rely on such error code. Fixes: 59ce4039 ("of: reserved_mem: add support for using more than one region for given device") Reported-by: NLiviu Dudau <liviu.dudau@arm.com> Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: NSylwester Nawrocki <s.nawrocki@samsung.com> Reviewed-by: NLiviu Dudau <Liviu.Dudau@arm.com> Acked-by: NRob Herring <robh@kernel.org> Reviewed-by: NSumit Semwal <sumit.semwal@linaro.org>
-
- 03 6月, 2016 4 次提交
-
-
由 Stephen Rothwell 提交于
pageblock_order can be (at least) an unsigned int or an unsigned long depending on the kernel config and architecture, so use max_t(unsigned long ...) when comparing it. fixes these warnings: In file included from include/linux/list.h:8:0, from include/linux/kobject.h:20, from include/linux/of.h:21, from drivers/of/of_reserved_mem.c:17: drivers/of/of_reserved_mem.c: In function ‘__reserved_mem_alloc_size’: include/linux/kernel.h:748:17: warning: comparison of distinct pointer types lacks a cast (void) (&_max1 == &_max2); \ ^ include/linux/kernel.h:747:9: note: in definition of macro ‘max’ typeof(y) _max2 = (y); \ ^ drivers/of/of_reserved_mem.c:131:48: note: in expansion of macro ‘max’ align = max(align, (phys_addr_t)PAGE_SIZE << max(MAX_ORDER - 1, pageblock_ord ^ include/linux/kernel.h:748:17: warning: comparison of distinct pointer types lacks a cast (void) (&_max1 == &_max2); \ ^ include/linux/kernel.h:747:21: note: in definition of macro ‘max’ typeof(y) _max2 = (y); \ ^ drivers/of/of_reserved_mem.c:131:48: note: in expansion of macro ‘max’ align = max(align, (phys_addr_t)PAGE_SIZE << max(MAX_ORDER - 1, pageblock_ord ^ Fixes: 1cc8e345 ("drivers: of: of_reserved_mem: fixup the alignment with CMA setup") Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Jaewon 提交于
There was an alignment mismatch issue for CMA and it was fixed by commit 1cc8e345 ("drivers: of: of_reserved_mem: fixup the alignment with CMA setup"). However the way of the commit considers not only dma-contiguous(CMA) but also dma-coherent which has no that requirement. This patch checks more to distinguish dma-contiguous(CMA) from dma-coherent. Signed-off-by: NJaewon Kim <jaewon31.kim@samsung.com> Acked-by: NJason Liu <r64343@freescale.com> Acked-by: NMarek Szyprowski <m.szyprowski@samsung.com> [robh: remove erroneous opening bracket] Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Sergei Shtylyov 提交于
The kernel-doc for the of_irq_get[_byname]() is clearly inadequate in describing the return values -- of_irq_get_byname() is documented better than of_irq_get() but it still doesn't mention that 0 is returned iff irq_create_of_mapping() fails (it doesn't return an error code in this case). Document all possible return value variants, making the writing of the word "IRQ" consistent, while at it... Fixes: 9ec36caf ("of/irq: do irq resolution in platform_get_irq") Fixes: ad69674e ("of/irq: do irq resolution in platform_get_irq_byname()") Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com> CC: stable@vger.kernel.org Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Marek Szyprowski 提交于
This patch allows device drivers to initialize more than one reserved memory region assigned to given device. When driver needs to use more than one reserved memory region, it should allocate child devices and initialize regions by index for each of its child devices. Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
-
- 30 5月, 2016 1 次提交
-
-
由 Hanjun Guo 提交于
Rework numa_add_memblk() to update the parameter "u64 size" to "u64 end", this will make it consistent with x86 and simplifies the arm64 ACPI NUMA code to be added later. Signed-off-by: NHanjun Guo <hanjun.guo@linaro.org> Signed-off-by: NRobert Richter <rrichter@cavium.com> Signed-off-by: NDavid Daney <david.daney@cavium.com> Acked-by: NCatalin Marinas <catalin.marinas@arm.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 19 5月, 2016 3 次提交
-
-
由 Javier Martinez Canillas 提交于
The OF_UNITTEST Kconfig symbol is bool so this unittest can only be built-in and not build as a module. Also, nothing defined in this header file used so is not necessary to include it. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Gavin Shan 提交于
Function populate_node() is used to unflatten FDT blob to device tree. It supports maximal 64 level of device nodes. There is one array @fpsizes[64] tracking the full name length of last unflattened device node in the corresponding level (index of element in the array - 1). Build warning is seen with CONFIG_FRAME_WARN=1024 like below on ARM64 as Geert reported. The issue can be reproduced on PPC64 as well. $ make drivers/of/fdt.o drivers/of/fdt.c:443:1: warning: the frame size of 1136 bytes is \ larger than 1024 bytes [-Wframe-larger-than=] This changes the data type of @fpsizes[i] from "unsigned long" to "unsigned int" to avoid the build warning. The return value type of populate_node() and its @fpsize argument is adjusted accordingly. With this applied, 256 bytes saved from the stack frame on ARM64 and PPC64 platforms and the above warning isn't seen. Fixes: 50800082 ("drivers/of: Avoid recursively calling unflatten_dt_node()") Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Rhyland Klein 提交于
When the implementation for unflatten_dt_node() changed from being recursive to being non-recursive, it had a side effect of increasing the depth passed to fdt_next_node() by 1. This is fine most of the time, but it seems that when the end of the dtb is being parsed, it will cause the FDT_END condition in fdt_next_node() to return a different value (returning nextoffset instead of -FDT_ERR_NOTFOUND). This ends up passing an FDT_ERR_TRUNCATED error back to the unflatten_dt_node() which then sees that and complains "Error -8 processing FDT" causing boot to fail. This patch simply avoids incrementing depth and uses modified accesses for local array indices so that the depth is the same as it was before the change as far as fdt_next_node() is concerned. This problem was discovered trying to boot Tegra210-Smaug platforms. Fixes: 50800082 ("drivers/of: Avoid recursively calling unflatten_dt_node()") Signed-off-by: NRhyland Klein <rklein@nvidia.com> [robh: squashed in KASAN fix from Rhyland] Signed-off-by: NRob Herring <robh@kernel.org>
-
- 16 5月, 2016 7 次提交
-
-
由 Pantelis Antoniou 提交于
When reverting an update property changeset entry that created a property the reverse operation is a remove property and not an update. Signed-off-by: NPantelis Antoniou <pantelis.antoniou@konsulko.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Gavin Shan 提交于
This exports of_detach_node() for PowerPC PowerNV PCI hotplug driver. No functional changes introduced. Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Gavin Shan 提交于
This returns the allocate memory chunk, storing the unflattened device tree, from of_fdt_unflatten_tree() so that memory chunk can be released on demand in PowerNV PCI hotplug driver. Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Gavin Shan 提交于
This adds one more argument to of_fdt_unflatten_tree() to specify the parent node of the FDT blob that is going to be unflattened. In the result, the function can be used to unflatten FDT blob that represents device sub-tree in PowerNV PCI hotplug driver. Cc: Jyri Sarha <jsarha@ti.com> Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: NRob Herring <robh@kernel.org> Acked-by: NJyri Sarha <jsarha@ti.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Gavin Shan 提交于
This renames unflatten_dt_node() to unflatten_dt_nodes() as it populates multiple device nodes from FDT blob. No logical changes introduced. Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Gavin Shan 提交于
In current implementation, unflatten_dt_node() is called recursively to unflatten device nodes in FDT blob. It's stress to limited stack capacity, especially to adopt the function to unflatten device sub-tree that possibly has multiple root nodes. In that case, we runs out of stack and the system can't boot up successfully. In order to reuse the function to unflatten device sub-tree, this avoids calling the function recursively, meaning the device nodes are unflattened in one call on unflatten_dt_node(): two arrays are introduced to track the parent path size and the device node of current level of depth, which will be used by the device node on next level of depth to be unflattened. All device nodes in more than 64 level of depth are dropped and hopefully, the system can boot up successfully with the partial device-tree. Also, the parameter "poffset" and "fpsize" are unused and dropped and the parameter "dryrun" is figured out from "mem == NULL". Besides, the return value of the function is changed to indicate the size of memory consumed by the unflatten device tree or error code. Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Gavin Shan 提交于
The function unflatten_dt_node() is called recursively to unflatten device nodes and properties in the FDT blob. It looks complicated and hard to be understood. This splits the function into 3 functions: populate_properties(), populate_node() and unflatten_dt_node(). populate_properties(), which is called by populate_node(), creates properties for the indicated device node. The later one creates the device nodes from FDT blob. populate_node() gets the offset in FDT blob for next device nodes and then calls populate_node(). No logical changes introduced. Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NRob Herring <robh@kernel.org>
-
- 12 5月, 2016 1 次提交
-
-
由 Tomasz Nowicki 提交于
No functional changes in this patch. PCI I/O space mapping code does not depend on OF; therefore it can be moved to PCI core code. This way we will be able to use it, e.g., in ACPI PCI code. Suggested-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: NTomasz Nowicki <tn@semihalf.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> CC: Arnd Bergmann <arnd@arndb.de> CC: Liviu Dudau <Liviu.Dudau@arm.com>
-
- 11 5月, 2016 1 次提交
-
-
由 Suraj Jitindar Singh 提交于
The validity of the property input argument to of_remove_property() is never checked within the function and thus it is possible to pass a null value. It happens that this will be picked up in __of_remove_property() as no matching property of the device node will be found and thus an error will be returned, however once again there is no explicit check for a null value. By the time this is detected 2 locks have already been acquired which is completely unnecessary if the property to remove is null. Add an explicit check in the function of_remove_property() for a null property value and return -ENODEV in this case, this is consistent with what the previous return value would have been when the null value was not detected and passed to __of_remove_property(). By moving an explicit check for the property paramenter into the of_remove_property() function, this will remove the need to perform this check in calling code before invocation of the of_remove_property() function. Signed-off-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
-
- 09 5月, 2016 1 次提交
-
-
由 Robin Murphy 提交于
As a set of driver-provided callbacks and static data, there is no compelling reason for struct iommu_ops to be mutable in core code, so enforce const-ness throughout. Acked-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NRobin Murphy <robin.murphy@arm.com> Acked-by: NWill Deacon <will.deacon@arm.com> Signed-off-by: NJoerg Roedel <jroedel@suse.de>
-
- 06 5月, 2016 1 次提交
-
-
由 Boris Brezillon 提交于
Now that all drivers go through nand_set_flash_node() to parse the generic NAND properties, we can move all of_get_nand_xxx() helpers in to nand_base.c, make them static and remove of_mtd.c and of_mtd.h. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-