- 03 5月, 2017 1 次提交
-
-
由 Arnd Bergmann 提交于
gcc warns that an empty device tree would cause undefined behavior: drivers/of/unittest.c: In function 'of_unittest': drivers/of/unittest.c:2199:25: warning: 'last_sibling' may be used uninitialized in this function [-Wmaybe-uninitialized] This adds an initialization of the variable to zero, which we handle correctly. Fixes: 81d0848f ("of: Add unit tests for applying overlays") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NRob Herring <robh@kernel.org>
-
- 29 4月, 2017 1 次提交
-
-
由 Arnd Bergmann 提交于
We get a link error when the new tests are used by overlays are not: drivers/of/built-in.o: In function `unflatten_device_tree': (.init.text+0x967): undefined reference to `unittest_unflatten_overlay_base' This makes the #ifdef check match the symbols that lead to building the unittest_unflatten_overlay_base function. Fixes: 81d0848f ("of: Add unit tests for applying overlays") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Reviewed-by: NFrank Rowand <frank.rowand@sony.com> Tested-by: NFrank Rowand <frank.rowand@sony.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
- 28 4月, 2017 1 次提交
-
-
由 Frank Rowand 提交于
Existing overlay unit tests examine individual pieces of the overlay code. The new tests target the entire process of applying an overlay. Signed-off-by: NFrank Rowand <frank.rowand@sony.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
- 19 4月, 2017 1 次提交
-
-
由 Tyrel Datwyler 提交于
The call to of_find_node_by_path("/cpus") returns the cpus device_node with its reference count incremented. There is no matching of_node_put() call in of_numa_parse_cpu_nodes() which results in a leaked reference to the "/cpus" node. This patch adds an of_node_put() to release the reference. fixes: 298535c0 ("of, numa: Add NUMA of binding implementation.") Signed-off-by: NTyrel Datwyler <tyreld@linux.vnet.ibm.com> Acked-by: NDavid Daney <david.daney@cavium.com> Cc: stable@vger.kernel.org # v4.7+ Signed-off-by: NRob Herring <robh@kernel.org>
-
- 23 3月, 2017 1 次提交
-
-
由 Rob Herring 提交于
The modalias sysfs attr is lacking a newline for DT aliases on platform devices. The macio and ibmebus correctly add the newline, but open code it. Introduce a new function, of_device_modalias(), that fills the buffer with the modalias including the newline and update users of the old of_device_get_modalias function. Signed-off-by: NRob Herring <robh@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Frank Rowand <frowand.list@gmail.com> Cc: linuxppc-dev@lists.ozlabs.org Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 22 3月, 2017 1 次提交
-
-
由 Rob Herring 提交于
If the length of the modalias is greater than the buffer size, then the modalias is truncated. However the untruncated length is returned which will cause an error. Fix this to return the truncated length. If an error in the case was desired, then then we should just return -ENOMEM. The reality is no device will ever have 4KB of compatible strings to hit this case. Signed-off-by: NRob Herring <robh@kernel.org> Cc: Frank Rowand <frowand.list@gmail.com>
-
- 20 2月, 2017 1 次提交
-
-
由 David Daney 提交于
Some Cavium dev boards have firmware which doesn't supply a proper ethernet-phy-ieee802.3-c22" compatible property. Restore these boards to working order by whitelisting this compatible value. Signed-off-by: NDavid Daney <david.daney@cavium.com> Acked-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 15 2月, 2017 1 次提交
-
-
由 Rob Herring 提交于
The OF graph API leaves too much of the graph walking to clients when in many cases the driver doesn't care about accessing the port or endpoint nodes. The drivers typically just want the device connected via a particular graph connection. of_graph_get_remote_node provides this functionality. Signed-off-by: NRob Herring <robh@kernel.org> Acked-by: NPhilipp Zabel <p.zabel@pengutronix.de>
-
- 09 2月, 2017 3 次提交
-
-
由 Frank Rowand 提交于
Make pr_fmt() in fdt.c consistent with all other files in drivers/of/ Signed-off-by: NFrank Rowand <frank.rowand@am.sony.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Frank Rowand 提交于
of_device_make_bus_id() was changed to non-static by commit c6601225 ("of/device: Make of_device_make_bus_id() usable by other code") more than 6 years ago, but there are no users of it outside of platform.c. Make the function static again. Signed-off-by: NFrank Rowand <frank.rowand@am.sony.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Qi Hou 提交于
During stepping down the tree, parent node is gotten first and its refcount is increased with of_node_get() in __of_get_next_child(). Since it just being used as tmp node, its refcount must be decreased with of_node_put() after traversing its child nodes. Or, its refcount will never be descreased to ZERO, then it will never be freed, as well as other related memory blocks. To fix this, decrease refcount of parent with of_node_put() after __of_find_node_by_path(). Signed-off-by: NQi Hou <qi.hou@windriver.com> Acked-by: NPeter Rosin <peda@axentia.se> Signed-off-by: NRob Herring <robh@kernel.org>
-
- 24 1月, 2017 1 次提交
-
-
由 Alexander Sverdlin 提交于
Function signature of_unittest_apply_overlay(int unittest_nr, int overlay_nr, ... and call sites, like in of_unittest_apply_overlay_check(): ret = of_unittest_apply_overlay(overlay_nr, unittest_nr, ... do not match. Fix this in one place (function signature). The only affected test case is 15, which supplies non-existing overlay number 16, but two bugs matched here. Fix the test case. Signed-off-by: NAlexander Sverdlin <alexander.sverdlin@nokia.com> Cc: Rob Herring <robh+dt@kernel.org> Cc: Frank Rowand <frowand.list@gmail.com> Cc: devicetree@vger.kernel.org Signed-off-by: NRob Herring <robh@kernel.org>
-
- 20 1月, 2017 2 次提交
-
-
由 Stephen Boyd 提交于
The ULPI bus can be built as a module, and it will soon be calling these functions when it supports probing devices from DT. Export them so they can be used by the ULPI module. Acked-by: NRob Herring <robh@kernel.org> Cc: <devicetree@vger.kernel.org> Signed-off-by: NStephen Boyd <stephen.boyd@linaro.org> Signed-off-by: NPeter Chen <peter.chen@nxp.com>
-
由 Stephen Boyd 提交于
In the case of ULPI devices, we want to be able to load the driver before registering the device so that we don't get stuck in a loop waiting for the phy module to appear and failing usb controller probe. Currently we request the ulpi module via the ulpi ids, but in the DT case we might need to request it with the OF based modalias instead. Add a common function that allows anyone to request a module with the OF based modalias. Acked-by: NRob Herring <robh@kernel.org> Cc: <devicetree@vger.kernel.org> Signed-off-by: NStephen Boyd <stephen.boyd@linaro.org> Signed-off-by: NPeter Chen <peter.chen@nxp.com>
-
- 17 1月, 2017 1 次提交
-
-
由 Sudeep Holla 提交于
It is useful to have helper function just to get the number of cache levels for a given logical cpu. We can obtain the same by just checking the level at which the last cache is present. This patch adds support to find the level of the last cache for a given cpu. It will be used on ARM64 platform where the device tree provides the information for the additional non-architected/transparent/external last level caches that are not integrated with the processors. Cc: Mark Rutland <mark.rutland@arm.com> Suggested-by: NRob Herring <robh+dt@kernel.org> Acked-by: NRob Herring <robh+dt@kernel.org> Tested-by: NTan Xiaojun <tanxiaojun@huawei.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com> [will: use u32 instead of int for cache_level] Signed-off-by: NWill Deacon <will.deacon@arm.com>
-
- 10 1月, 2017 1 次提交
-
-
由 XuYing 提交于
memset in of_build_overlay_info is redundant, the ovinfo has been zeroed in of_fill_overlay_info when error. Signed-off-by: NYiPing Xu <xuyiping@hisilicon.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
- 09 1月, 2017 1 次提交
-
-
由 Guilherme G. Piccoli 提交于
On PowerPC machines some PCI slots might not have level triggered interrupts capability (also know as level signaled interrupts), leading of_irq_parse_pci() to complain by presenting error messages on the kernel log - in this case, the properties "interrupt-map" and "interrupt-map-mask" are not present on device's node in the device tree. This patch introduces a different message for this specific case, and also reduces its level from error to warning. Besides, we warn (once) that possibly some PCI slots on the system have no level triggered interrupts available. We changed some error return codes too on function of_irq_parse_raw() in order other failure's cases can be presented in a more precise way. Before this patch, when an adapter was plugged in a slot without level interrupts capabilitiy on PowerPC, we saw a generic error message like this: [54.239] pci 002d:70:00.0: of_irq_parse_pci() failed with rc=-22 Now, with this applied, we see the following specific message: [16.154] pci 0014:60:00.1: of_irq_parse_pci: no interrupt-map found, INTx interrupts not available Finally, we standardize the error path in of_irq_parse_raw() by always taking the fail path instead of returning directly from the loop. Signed-off-by: NGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
- 05 1月, 2017 2 次提交
-
-
由 Geliang Tang 提交于
Drop duplicate headers string.h and of_platform.h. Signed-off-by: NGeliang Tang <geliangtang@gmail.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Smitha T Murthy 提交于
For some IPs, there may be virtual child devices created and for them its necessary to set the dma_ops if it's using reserved memory else it will call the dummy dma_ops during buffer operations for the child devices which will lead to memory mapping failure. Signed-off-by: NSmitha T Murthy <smitha.t@samsung.com> Signed-off-by: NPankaj Dubey <pankaj.dubey@samsung.com> Acked-by: NMarek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
- 03 1月, 2017 2 次提交
-
-
由 Paul Burton 提交于
When allocating a struct alias_prop, of_alias_scan() only requested that it be aligned on a 4 byte boundary. The struct contains pointers which leads to us attempting 64 bit writes on 64 bit systems, and if the CPU doesn't support unaligned memory accesses then this causes problems - for example on some MIPS64r2 CPUs including the "mips64r2-generic" QEMU emulated CPU it will trigger an address error exception. Fix this by requesting alignment for the struct alias_prop allocation matching that which the compiler expects, using the __alignof__ keyword. Signed-off-by: NPaul Burton <paul.burton@imgtec.com> Acked-by: NRob Herring <robh@kernel.org> Reviewed-by: NGrant Likely <grant.likely@secretlab.ca> Cc: Frank Rowand <frowand.list@gmail.com> Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14306/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
由 Tobias Wolf 提交于
An empty __dtb_start to __dtb_end section might result in initial_boot_params being null for arch/mips/ralink. This showed that the boot process hangs indefinitely in of_scan_flat_dt(). Signed-off-by: NTobias Wolf <dev-NTEO@vplace.de> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14605/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
- 13 12月, 2016 1 次提交
-
-
由 Reza Arbab 提交于
When movable nodes are enabled, any node containing only hotpluggable memory is made movable at boot time. On x86, hotpluggable memory is discovered by parsing the ACPI SRAT, making corresponding calls to memblock_mark_hotplug(). If we introduce a dt property to describe memory as hotpluggable, configs supporting early fdt may then also do this marking and use movable nodes. Link: http://lkml.kernel.org/r/1479160961-25840-5-git-send-email-arbab@linux.vnet.ibm.comSigned-off-by: NReza Arbab <arbab@linux.vnet.ibm.com> Tested-by: NBalbir Singh <bsingharora@gmail.com> Acked-by: NBalbir Singh <bsingharora@gmail.com> Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Alistair Popple <apopple@au1.ibm.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Bharata B Rao <bharata@linux.vnet.ibm.com> Cc: Frank Rowand <frowand.list@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Rob Herring <robh+dt@kernel.org> Cc: Stewart Smith <stewart@linux.vnet.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 10 12月, 2016 3 次提交
-
-
由 Rob Herring 提交于
This reverts commit e5269794.
-
由 Moritz Fischer 提交于
No longer fall through into the error case that prints out an error if no error (err = 0) occurred. Fixes d9181b20(of: Add back an error message, restructured) Signed-off-by: NMoritz Fischer <mdf@kernel.org> Reviewed-by: NFrank Rowand <frank.rowand@am.sony.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Marcin Nowakowski 提交于
Since the KERN_CONT changes, the current debug printks have a lot of empty lines making the log messages very hard to read. Signed-off-by: NMarcin Nowakowski <marcin.nowakowski@imgtec.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
- 30 11月, 2016 1 次提交
-
-
由 Johan Hovold 提交于
Add helper to deregister fixed-link PHYs registered using of_phy_register_fixed_link(). Convert the two drivers that care to deregister their fixed-link PHYs to use the new helper, but note that most drivers currently fail to do so. Signed-off-by: NJohan Hovold <johan@kernel.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 18 11月, 2016 3 次提交
-
-
由 Sudeep Holla 提交于
Currently platforms/drivers needing to get the machine model name are replicating the same snippet of code. In some case, the OF reference counting is either missing or incorrect. This patch adds support to read the machine model name either using the "model" or the "compatible" property in the device tree root node to the core OF/DT code. This can be used to remove all the duplicate code snippets doing exactly same thing later. Cc: Rob Herring <robh+dt@kernel.org> Cc: Frank Rowand <frowand.list@gmail.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Johan Hovold 提交于
Make sure to drop the reference taken by bus_find_device() before returning NULL from of_phy_find_device() when the found device is not a PHY. Fixes: 6ed74236 ("of: of_mdio: Ensure mdio device is a PHY") Signed-off-by: NJohan Hovold <johan@kernel.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Johan Hovold 提交于
Make sure to drop the of_node reference also on failure to parse the speed property in of_phy_register_fixed_link(). Fixes: 3be2a49e ("of: provide a binding for fixed link PHYs") Signed-off-by: NJohan Hovold <johan@kernel.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 15 11月, 2016 11 次提交
-
-
由 Johan Hovold 提交于
Add comment clarifying that of_find_device_by_node() takes a reference to the embedded struct device which needs to be dropped after use. Note that most current users fail to do so. Signed-off-by: NJohan Hovold <johan@kernel.org> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Johan Hovold 提交于
Update the comment to of_platform_device_destroy() to reflect that it no longer returns a status value. Fixes: 75f353b6 ("of/platform: Fix of_platform_device_destroy...") Signed-off-by: NJohan Hovold <johan@kernel.org> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Frank Rowand 提交于
Remove unused pointer to node "__symbols__". Signed-off-by: NFrank Rowand <frank.rowand@am.sony.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Frank Rowand 提交于
Value of pointer was calculated in an earlier block than where it was used. Move it down into the block where it is used, immediately before where is is checked to be valid. Signed-off-by: NFrank Rowand <frank.rowand@am.sony.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Frank Rowand 提交于
Add a single pr_err() to cover a range of errors that were reported by several pr_err() that were removed earlier in this series. Signed-off-by: NFrank Rowand <frank.rowand@am.sony.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Frank Rowand 提交于
Update comments to better explain what functions are doing. Signed-off-by: NFrank Rowand <frank.rowand@am.sony.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Frank Rowand 提交于
Remove a redundant check of buffer size. Signed-off-by: NFrank Rowand <frank.rowand@am.sony.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Frank Rowand 提交于
Remove BUG_ON(), which is frowned upon and not needed here. Restructure to remove some excessive complexity. Signed-off-by: NFrank Rowand <frank.rowand@am.sony.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Frank Rowand 提交于
Rename variables to better reflect what their purpose is. As a side effect, this reduces the need for some of the comments previously removed in this series. Signed-off-by: NFrank Rowand <frank.rowand@am.sony.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Frank Rowand 提交于
Remove "__of_" prefix from local function names. The pattern of a leading "__" is used in drivers/of/ to signify a function that must be called with a lock held. These functions do not fit that pattern. Signed-off-by: NFrank Rowand <frank.rowand@am.sony.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Frank Rowand 提交于
Some function names are misleading or do not provide a good sense of what they do. Rename the functions to ne more informative. Signed-off-by: NFrank Rowand <frank.rowand@am.sony.com> Signed-off-by: NRob Herring <robh@kernel.org>
-