summaryrefslogtreecommitdiffstats
path: root/drivers/of
Commit message (Collapse)AuthorAgeFilesLines
* of_path: Allow pointing directly to the partitionSascha Hauer2015-09-011-5/+9
| | | | | | | | We could only point to partitions in the device tree by using &norflash, "partname:barebox-environment". Allow to point to the partition directly without having to parse the partition labels. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* cdev: Add function to find cdev by device_nodeSascha Hauer2015-09-011-2/+2
| | | | | | | | | | This adds a device_node member to struct cdev and a function to find a cdev by device_node. This also removes the setting of cdev->dev->device_node in the of partition parser. We must not set the device since it may not refer to a partition but to a whole device with partitions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/vpl'Sascha Hauer2015-08-071-0/+206
|\
| * of_graph: add of_graph_port_is_availableSascha Hauer2015-07-131-0/+22
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: import of_graph functionsSascha Hauer2015-07-131-0/+167
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: base: implement of_get_next_childSascha Hauer2015-07-131-0/+17
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | of/base: fix typoJan Luebbe2015-07-091-1/+1
|/ | | | | Signed-off-by: Jan Luebbe <jluebbe@debian.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: export of_platform_device_createSascha Hauer2015-07-021-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fdt: of_unflatten_dtb(): remove left over "root" argument from inline docMarc Kleine-Budde2015-05-151-1/+0
| | | | | | | | | | | | | In commit d384b5639fc1 of: Drop devicetree merge support the signature of of_unflatten_dtb() was changed, but the inline documentation was forgotten to adjust. This patch removes the left over "root" argument from the doc. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2015-05-062-30/+11
|\
| * of_path: of_find_path(): add possibility to return .bb deviceMarc Kleine-Budde2015-04-232-21/+11
| | | | | | | | | | | | | | | | | | This patch adds a flags argument to the of_find_path() function. The only flag defined for now is OF_FIND_PATH_FLAGS_BB. When used on NAND devices, the function returns the bad block aware device (the ".bb" device). Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * environment: remove unused codeMarc Kleine-Budde2015-04-171-9/+0
| | | | | | | | | | | | | | | | This patch removes the LIST_HEAD of_partition_list and a struct definition from the code. This was present but unused, since the file was added to barebox. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | OF: gpio: Silence error message on -EPROBE_DEFERSebastian Hesselbarth2015-04-171-3/+5
|/ | | | | | | With deferred probing, -EPROBE_DEFER is not worth spilling an error. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/tegra'Sascha Hauer2015-03-091-4/+4
|\
| * of: make of_alias_get work on all types of DT pathsLucas Stach2015-03-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | of_alias_get assumed that a DT path is always the full node path, whic is not necessarily the case, as there are other valid path descriptions. All of them are handled by of_find_node_by_path. As there is already a preparsed list with all DT aliases that handles this case properly we can simply reuse that one. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | of/base: fix sparse warning, don't use integer 0 as NULL pointerMarc Kleine-Budde2015-03-031-2/+2
| | | | | | | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | of_path: of_find_path(): remove unused variable lenMarc Kleine-Budde2015-03-031-2/+2
|/ | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mxs'Sascha Hauer2015-02-041-2/+2
|\
| * of: Create platform_device when creating AMBA device failedSascha Hauer2015-01-281-2/+2
| | | | | | | | | | | | | | If creating an AMBA device failed, maybe because AMBA support is not compiled in, register the device as regular platform device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Fix spelling: pathes -> pathsWadim Egorov2015-01-281-1/+1
|/ | | | | Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sizes.h: move include/sizes.h to include/linux/sizes.hMasahiro Yamada2015-01-082-2/+2
| | | | | | | | | | | | | | This file originates in Linux. Linux has it under include/linux/ directory since commit dccd2304cc90. Let's move it to the same place as well in barebox. This commit was generated by the following commands: find -name '*.[chS]' | xargs sed -i -e 's:<sizes.h>:<linux/sizes.h>:' git mv include/sizes.h include/linux/ Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fdt: don't strip const qualifierLucas Stach2014-12-111-1/+1
| | | | | | | | Fixes: warning: assignment discards 'const' qualifier from pointer target type Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fdt: of_unflatten_dtb can work on const dataJan Luebbe2014-12-041-2/+2
| | | | | Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dt: factor out common codeJan Luebbe2014-11-201-22/+11
| | | | | | | | Currently, dt_struct is always checked with the same code after dt_struct_advance(). Move the check after the switch statement. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: use OFTREE_MEM_GENERIC for the sandboxJan Luebbe2014-11-071-1/+1
| | | | | Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/tegra'Sascha Hauer2014-11-052-0/+69
|\
| * of: import pci range parser from linuxLucas Stach2014-10-082-0/+69
| | | | | | | | | | Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | of: Add of_device_enable_and_register functionsTeresa Gámez2014-11-031-0/+43
|/ | | | | | | | | | | Function to enable and register a disabled device. The devices can be registered using the device node with of_device_enable_and_register() or with the device node name/path by using the of_device_enable_and_register_by_name() function. Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/openrisc'Sascha Hauer2014-10-021-1/+1
|\
| * openrisc: add initial device tree supportAntony Pavlov2014-09-091-1/+1
| | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/of'Sascha Hauer2014-10-021-8/+69
|\ \
| * | of: Added of_set_property_to_child_phandleTeresa Gámez2014-10-011-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | Set a property to a phandle of a child node. This may be used for selections like display-timings. Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: base: Add of_parse_phandle_fromTeresa Gámez2014-10-011-4/+24
| | | | | | | | | | | | | | | | | | | | | Added of_parse_phandle_from() to be able to use external root nodes. Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: base: Add of_find_node_by_phandle_fromTeresa Gámez2014-10-011-4/+24
| |/ | | | | | | | | | | | | | | Added of_find_node_by_phandle_from() to find nodes by phandle with a given root node. Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / of: fdt: fix typo in headerRaphaël Poggi2014-09-251-1/+1
|/ | | | | Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/net'Sascha Hauer2014-08-071-0/+1
|\
| * net: phy: Add minimal support for QSGMII PHYEzequiel Garcia2014-07-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on Linux's support by Thomas Petazzoni: commit b9d12085f2f531fdea67f0361564e0812696227c Author: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Date: Tue Apr 15 15:50:19 2014 +0200 net: phy: add minimal support for QSGMII PHY This commit adds the necessary definitions for the PHY layer to recognize "qsgmii" as a valid PHY interface. A QSMII interface, as defined at http://en.wikipedia.org/wiki/Media_Independent_Interface#Quad_Serial_Gigabit_Media_Independent_Interface, is "is a method of combining four SGMII lines into a 5Gbit/s interface. QSGMII, like SGMII, uses LVDS signalling for the TX and RX data and a single LVDS clock signal. QSGMII uses significantly fewer signal lines than four SGMII busses." This type of MAC <-> PHY connection might require special handling on the MAC driver side, so it should be possible to express this type of MAC <-> PHY connection, for example in the Device Tree. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: devicetree@vger.kernel.org Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2014-08-071-0/+2
|\ \ | | | | | | | | | | | | Conflicts: lib/Makefile
| * | of_mtd: add soft_bch and hw_oob_first ecc modesRaphaël Poggi2014-08-041-0/+2
| |/ | | | | | | | | Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/marvell'Sascha Hauer2014-08-073-0/+34
|\ \
| * | of: pci: import of_pci_get_devfn()Sebastian Hesselbarth2014-07-313-0/+34
| |/ | | | | | | | | | | | | | | | | Marvell MVEBU PCIe driver requires of_pcie_get_devfn(), import it from Linux. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/efi'Sascha Hauer2014-08-072-2/+3
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: .gitignore Makefile drivers/serial/Makefile
| * | Add initial EFI architecture supportSascha Hauer2014-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | | This adds support for running barebox in an EFI environment on X86 PC hardware. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: platform: Use PRINTF_CONVERSION_RESOURCE for printing resourcesSascha Hauer2014-07-111-1/+2
| |/ | | | | | | | | | | Avoids compiler warnings about wrong format specifiers Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / of_partition: devfs_add_partition returns an error pointerSascha Hauer2014-08-011-0/+4
|/ | | | | | | | Check for the return value of devfs_add_partition with IS_ERR. Otherwise we dereference a NULL pointer when devfs_add_partition fails. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/net'Sascha Hauer2014-07-041-0/+2
|\
| * of: net: respect phy-connection-type propertySebastian Hesselbarth2014-06-251-0/+2
| | | | | | | | | | | | | | | | | | ePAPR defines phy-connection-type as standard property for PHY interface between Ethernet device and PHY device. Add corresponding property check to of_get_phy_mode. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | drivers: of: import PCI bus specific translatorSebastian Hesselbarth2014-06-252-0/+86
|/ | | | | | | | | | | DT PCI address translation needs a special handling. This imports the corresponding translator into of/address.c but makes it selectable through Kconfig. Compared to the Linux version, we don't check for struct device_node's type which does not exist on Barebox but directly for device_type property set to "pci". Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: Drop devicetree merge supportSascha Hauer2014-05-221-32/+12
| | | | | | | | | | | | I assume I am the only person knowing that barebox is able to merge devicetrees. This feature seems broken for a while now since trying to merge devicetress results in: unflatten: too many end nodes Remove this feature to save the complexity. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/of'Sascha Hauer2014-05-053-14/+19
|\