- 05 6月, 2015 1 次提交
-
-
由 Geert Uytterhoeven 提交于
"IS_ENABLED(PPC_PSERIES)" always evaluates to false, as IS_ENABLED() is supposed to be used with the full Kconfig symbol name, including the "CONFIG_" prefix. Add the missing "CONFIG_" prefix to fix this. Fixes: a25095d4 ("of: Move dynamic node fixups out of powerpc and into common code") Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Cc: stable@vger.kernel.org #+3.17 Signed-off-by: NGrant Likely <grant.likely@linaro.org>
-
- 02 6月, 2015 1 次提交
-
-
由 Ard Biesheuvel 提交于
This splits off the reservation of the memory occupied by the FDT binary itself from the processing of the memory reservations it contains. This is necessary because the physical address of the FDT, which is needed to perform the reservation, may not be known to the FDT driver core, i.e., it may be mapped outside the linear direct mapping, in which case __pa() returns a bogus value. Cc: Russell King <linux@arm.linux.org.uk> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Acked-by: NRob Herring <robh@kernel.org> Acked-by: NMark Rutland <mark.rutland@arm.com> Acked-by: NCatalin Marinas <catalin.marinas@arm.com> Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
-
- 27 5月, 2015 1 次提交
-
-
由 Sudeep Holla 提交于
Commit 5590f319 ("drivers/core/of: Add symlink to device-tree from devices with an OF node") adds the symlink `of_node` for each device pointing to it's device tree node while creating/initialising it. However the devicetree sysfs is created and setup in of_init which is executed at core_initcall level. For all the devices created before of_init, the following error is thrown: "Error -2(-ENOENT) creating of_node link" Like many other components in driver model, initialize the sysfs support for OF/devicetree from driver_init so that it's ready before any devices are created. Fixes: 5590f319 ("drivers/core/of: Add symlink to device-tree from devices with an OF node") Suggested-by: NRob Herring <robh+dt@kernel.org> Cc: Grant Likely <grant.likely@linaro.org> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com> Tested-by: NRobert Schwebel <r.schwebel@pengutronix.de> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 16 5月, 2015 1 次提交
-
-
由 Zhichang Yuan 提交于
41f8bba7 ("of/pci: Add pci_register_io_range() and pci_pio_to_address()") added support for systems with several I/O ranges described by OF bindings. It modified pci_address_to_pio() look up the io_range for a given CPU physical address, but the conversion was wrong. Fix the conversion of address to I/O port. [bhelgaas: changelog] Fixes: 41f8bba7 ("of/pci: Add pci_register_io_range() and pci_pio_to_address()") Signed-off-by: NZhichang Yuan <yuanzhichang@hisilicon.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NLiviu Dudau <Liviu.Dudau@arm.com> CC: stable@vger.kernel.org # v3.18+
-
- 15 5月, 2015 1 次提交
-
-
由 Florian Fainelli 提交于
Some Ethernet PHY devices/switches may not properly release the MDIO bus during turn-around time, and fail to drive it low, which can be seen by some controllers as a read failure, while the data clocked in is still correct. Add a boolean property "broken-turn-around" which is parsed by the generic MDIO bus probing code and will set the corresponding bit in the MDIO bus phy_ignore_ta_mask bitmask for MDIO bus drivers to utilize that information. Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 11 5月, 2015 1 次提交
-
-
由 Linus Walleij 提交于
This defines a new compatible option for MFD devices "simple-mfd" that will make the OF core spawn child devices for all subnodes of that MFD device. It is optional but handy for things like syscon and possibly other simpler MFD devices. Since there was no file to put the documentation in, I took this opportunity to make a small writeup on MFD devices and add the compatible definition there. Suggested-by: NLee Jones <lee.jones@linaro.org> Acked-by: NLee Jones <lee.jones@linaro.org> Acked-by: NAntoine Tenart <antoine.tenart@free-electrons.com> Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Devicetree <devicetree@vger.kernel.org> Cc: Rob Herring <robh+dt@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Grant Likely <grant.likely@linaro.org> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Kumar Gala <galak@codeaurora.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 17 4月, 2015 1 次提交
-
-
由 Baruch Siach 提交于
Add two new facts to of_get_next_child() documentation: * of_get_next_child() returns NULL when there is not next child * of_get_next_child() decrements the refcount of prev Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NRob Herring <robh@kernel.org>
-
- 15 4月, 2015 6 次提交
-
-
由 Pantelis Antoniou 提交于
During the course of the overlay selftests some of them remain applied. While this does not pose a real problem, make sure you track them and destroy them at the end of the test. Signed-off-by: NPantelis Antoniou <pantelis.antoniou@konsulko.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Ricky Liang 提交于
The allocation size of device node path is off by one which drops the '\0' terminator. Signed-off-by: NRicky Liang <jcliang@chromium.org> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Kevin Cernekee 提交于
Provide a libfdt-based equivalent for of_device_is_big_endian(), suitable for use in the early_init_* functions. Signed-off-by: NKevin Cernekee <cernekee@gmail.com> Reviewed-by: NPeter Hurley <peter@hurleysoftware.com> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Kevin Cernekee 提交于
SoC peripherals can come in several different flavors: - little-endian: registers always need to be accessed in LE mode (so the kernel should perform a swap if the CPU is running BE) - big-endian: registers always need to be accessed in BE mode (so the kernel should perform a swap if the CPU is running LE) - native-endian: the bus will automatically swap accesses, so the kernel should never swap Introduce a function that checks an OF device node to see whether it contains a "big-endian" or "native-endian" property. For the former case, always return true. For the latter case, return true iff the kernel was built for BE (implying that the BE MMIO accessors do not perform a swap). Otherwise return false, assuming LE registers. LE registers are assumed by default because most existing drivers (libahci, serial8250, usb) always use readl/writel in the absence of instructions to the contrary, so that will be our fallback. Signed-off-by: NKevin Cernekee <cernekee@gmail.com> Reviewed-by: NPeter Hurley <peter@hurleysoftware.com> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Florian Fainelli 提交于
Commit 51975db0 ("of/flattree: merge early_init_dt_scan_memory() common code") consolidated some code from PowerPC (typically big-endian), and ended-up adding a pr_debug() printing reg properties in big-endian (DT native) format, not CPU endian. This debug print suffers from two problems: - we only print 4 "reg" values, while there could be more on typical systems having multiple memory ranges - we print these 4 "reg" values in FDT endianess, that is big-endian, and these values could be confusing for little-endian configurations Since we are already printing the base address and size of the memory regions parsed by early_init_dt_scan_memory() later in a way that is both endian correct, and takes into account arbitrary number of memory banks, just remove that part of the debug print. Suggested-by: NFrank Rowand <frowand.list@gmail.com> Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Geert Uytterhoeven 提交于
If CONFIG_IRQ_DOMAIN=n: drivers/of/irq.c: In function ‘of_irq_get’: drivers/of/irq.c:406: error: implicit declaration of function ‘irq_find_host’ drivers/of/irq.c:406: warning: assignment makes pointer from integer without a cast make[2]: *** [drivers/of/irq.o] Error 1 Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NRob Herring <robh@kernel.org>
-
- 29 3月, 2015 7 次提交
-
-
由 Grant Likely 提交于
The previous commit, "of/unittest: early return from test skips tests" exposed broken tests for the of_platform_unpopulate() function. The problem was the populate and depopulate calls were not symmetrical like they were intended to be, and unpopulate depends on the parent device to have it's of_node pointer pointing to the parent device node. Fix these bugs so that the test case works correctly. In the process, the test_bus used as a container for the test devices has been changed from a statically allocated struct device (which is bad) to a properly allocated device with a .release() method (which is good). This stops the test code from being a bad example of abusing the device model. Signed-off-by: NGrant Likely <grant.likely@linaro.org> Cc: Frank Rowand <frank.rowand@sonymobile.com> Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Cc: Pawel Moll <pawel.moll@arm.com>
-
由 Frank Rowand 提交于
Fix bugs pointed out by checkpatch: Mis-coding of two if statements caused early return from function. Number of tests completed increased from 102 to 107. Number of tests failed increased from 0 to 2. Signed-off-by: NFrank Rowand <frank.rowand@sonymobile.com> Signed-off-by: NGrant Likely <grant.likely@linaro.org>
-
由 Frank Rowand 提交于
Fix warnings pointed out by checkpatch. Checkpatch warns: externs should be avoided in .c files Reducing pain for future maintainers - adding a comment so that anyone trying to find where the extern data is created will be able to find it. (grep will not find that location) Signed-off-by: NFrank Rowand <frank.rowand@sonymobile.com> Signed-off-by: NGrant Likely <grant.likely@linaro.org>
-
由 Frank Rowand 提交于
Fix warnings pointed out by checkpatch. No bug fixes, but reduce the number of checkpatch warnings so that future problems will stand out better. Signed-off-by: NFrank Rowand <frank.rowand@sonymobile.com> Signed-off-by: NGrant Likely <grant.likely@linaro.org>
-
由 Frank Rowand 提交于
Fix bug pointed out by checkpatch. Splitting string incorrectly removed a space between two words. Signed-off-by: NFrank Rowand <frank.rowand@sonymobile.com> Signed-off-by: NGrant Likely <grant.likely@linaro.org>
-
由 Frank Rowand 提交于
Fix warnings pointed out by checkpatch. No bugs fixed, but the test code should be a good example of how to use the devicetree API. Signed-off-by: NFrank Rowand <frank.rowand@sonymobile.com> Signed-off-by: NGrant Likely <grant.likely@linaro.org>
-
由 Sergei Shtylyov 提交于
of_get_mac_address() basically does the same thing thrice, every time with a different property name, so it makes sense to factor out the repetitive code into separate function. While at it, we can start using ETH_ALEN instead of the bare number and drop unnecessary parens around the property length check. The resulting ARM object file is 100 bytes less in size than before the patch. Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com> Acked-by: NDavid S. Miller <davem@davemloft.net> Acked-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NGrant Likely <grant.likely@linaro.org>
-
- 28 3月, 2015 3 次提交
-
-
由 Benjamin Herrenschmidt 提交于
The "sdc" node is missing the ranges property, it needs to be treated as having an empty one otherwise translation fails for its children. Fixes 746c9e9f, "of/base: Fix PowerPC address parsing hack" Tested-by: NSteven Rostedt <rostedt@goodmis.org> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: NGrant Likely <grant.likely@linaro.org> Cc: Stable <stable@vger.kernel.org> # v3.18+
-
由 Geert Uytterhoeven 提交于
Currently OF_DYNAMIC and OF_OVERLAY are not visible to the user, and are selected automatically only when needed. Allow them to be enabled manually to improve device tree unit test coverage. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NGrant Likely <grant.likely@linaro.org>
-
由 Benjamin Herrenschmidt 提交于
The "sdc" node is missing the ranges property, it needs to be treated as having an empty one otherwise translation fails for its children. Fixes 746c9e9f, "of/base: Fix PowerPC address parsing hack" Tested-by: NSteven Rostedt <rostedt@goodmis.org> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: NGrant Likely <grant.likely@linaro.org> Cc: Stable <stable@vger.kernel.org> # v3.18+
-
- 25 3月, 2015 2 次提交
-
-
由 Wang Long 提交于
This patch just replace the string 'selftest' with 'unittest' in OF unittest and data and binding file. I have tested it successfully on ARM. Signed-off-by: NWang Long <long.wanglong@huawei.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Frank Rowand 提交于
If CONFIG_OF_UNITTEST=y then a kernel image make will always cause .version to be incremented, even if there are not source changes. This is caused by a lack of dependency tracking and checking for drivers/of/unittest-data/testcases.dtb.o. Signed-off-by: NFrank Rowand <frank.rowand@sonymobile.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
- 19 3月, 2015 4 次提交
-
-
由 Peter Hurley 提交于
This reverts commit 2fa645cb. The assumption that at least 1 preferred console will be registered when the stdout-path property is set is invalid, which can result in _no_ consoles. Signed-off-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Brian Norris 提交于
Commit 106937e8 ("of: fix handling of '/' in options for of_find_node_by_path()") caused a regression in OF handling of stdout-path. While it fixes some cases which have '/' after the ':', it breaks cases where there is more than one '/' *before* the ':'. For example, it breaks this boot string stdout-path = "/rdb/serial@f040ab00:115200"; So rather than doing sequentialized checks (first for '/', then for ':'; or vice versa), to get the correct behavior we need to check for the first occurrence of either one of them. It so happens that the handy strcspn() helper can do just that. Fixes: 106937e8 ("of: fix handling of '/' in options for of_find_node_by_path()") Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Cc: stable@vger.kernel.org # 3.19 Acked-by: NLeif Lindholm <leif.lindholm@linaro.org> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Brian Norris 提交于
There were regressions seen with commit 106937e8 ("of: fix handling of '/' in options for of_find_node_by_path()"), where we couldn't handle extra '/' before the ':'. Let's test for this now. Confirmed that this test fails without the previous patch and passes when patched. All other tests pass. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Acked-by: NLeif Lindholm <leif.lindholm@linaro.org> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Laurent Pinchart 提交于
The error code paths that require cleanup use a goto to jump to the cleanup code and return an error code. However, the error code variable res, which is initialized to -EINVAL when declared, is then overwritten with the return value of of_parse_phandle_with_args(), and reused as the return code from of_irq_parse_one(). This leads to an undetermined error being returned instead of the expected -EINVAL value. Fix it. Signed-off-by: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Cc: stable@vger.kernel.org # 3.13+ Signed-off-by: NRob Herring <robh@kernel.org>
-
- 18 3月, 2015 1 次提交
-
-
由 Wolfram Sang 提交于
I2C supports adding adapters using either a dynamic or fixed id. The latter is provided by aliases in the DT case. To prevent id collisions of those two types, install this function which gives us the highest fixed id, so we can then let the dynamically created ones come after this highest number. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 13 3月, 2015 1 次提交
-
-
由 Murali Karicheri 提交于
Calculate the dma_mask and coherent_dma_mask based on the dma-range values set in DT for the device. Limit the mask to lower of the default mask and mask calculated. Signed-off-by: NMurali Karicheri <m-karicheri2@ti.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com> CC: Joerg Roedel <joro@8bytes.org> CC: Grant Likely <grant.likely@linaro.org> CC: Rob Herring <robh+dt@kernel.org> CC: Will Deacon <will.deacon@arm.com> CC: Russell King <linux@arm.linux.org.uk> CC: Arnd Bergmann <arnd@arndb.de> CC: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
-
- 12 3月, 2015 1 次提交
-
-
由 Florian Fainelli 提交于
Export of_mdio_parse_addr() which allows parsing a given Ethernet PHY node MDIO address, verify it is within the allowed range, and return its value. This is going to be useful for the DSA code which needs to deal with multiple layers of MDIO buses. Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 10 3月, 2015 7 次提交
-
-
由 Peter Hurley 提交于
Add testcase variants with '/' in the options string to test for scan beyond end path name terminated by ':'. Signed-off-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Leif Lindholm 提交于
Ensure proper handling of paths with appended options (after ':'), where those options may contain a '/'. Fixes: 7914a7c5 ("of: support passing console options with stdout-path") Reported-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NLeif Lindholm <leif.lindholm@linaro.org> Cc: <stable@vger.kernel.org> # 3.19 Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Wang Long 提交于
This patch fix the wrong expected value of of_property_match_string in of_selftest_property_string. Signed-off-by: NWang Long <long.wanglong@huawei.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Wang Long 提交于
Remove the duplicate of_changeset_init. In of_selftest_changeset testcase, the "struct of_changeset chgset" is initialized twice, but only once is enough. so, drop the first initializtion code. Signed-off-by: NWang Long <long.wanglong@huawei.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Arnd Bergmann 提交于
The unittest fails to link if I2C or I2C_MUX is a loadable module: drivers/built-in.o: In function `selftest_i2c_mux_remove': unittest.c:(.text+0xb0ce4): undefined reference to `i2c_del_mux_adapter' This changes the newly added IS_ENABLED() checks to use IS_BUILTIN() instead, which evaluates to false if the other driver is a module. Reported-by: NChen Gang <gang.chen.5i5j@gmail.com> Signed-off-by: NArnd Bergmann <arnd@arndb.de> Fixes: d5e75500 ("of: unitest: Add I2C overlay unit tests.") Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Fabio Estevam 提交于
Commit 3e7f7626 ("of/overlay: Do not generate duplicate nodes") removed the only use of the 'grandchild' variable, which leads to the following build warning: drivers/of/overlay.c: In function 'of_overlay_apply_single_device_node': drivers/of/overlay.c:89:31: warning: unused variable 'grandchild' [-Wunused-variable] struct device_node *tchild, *grandchild; ^ Remove this unused variable. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
由 Peter Hurley 提交于
Support for devicetree serial consoles via 'stdout-path' causes bootconsoles to be disabled when the vt dummy console loads, since there is no preferred console (the preferred console is not added until the device is probed). Ensure there is at least a preferred console, even if never matched. Requires: "console: Fix console name size mismatch" Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NRob Herring <robh@kernel.org>
-
- 04 3月, 2015 1 次提交
-
-
由 Murali Karicheri 提交于
Add of_pci_dma_configure() to allow updating the DMA configuration of the PCI device using the configuration from DT of the parent of the root bridge device. Use the newly added APIs pci_get/put_host_bridge_device() for implementing this. [bhelgaas: fold in fix for host bridges with no parent OF device] Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> (AMD Seattle) Signed-off-by: NMurali Karicheri <m-karicheri2@ti.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com> Acked-by: NRob Herring <robh+dt@kernel.org> Acked-by: NWill Deacon <will.deacon@arm.com> CC: Joerg Roedel <joro@8bytes.org> CC: Grant Likely <grant.likely@linaro.org> CC: Russell King <linux@arm.linux.org.uk> CC: Arnd Bergmann <arnd@arndb.de>
-