summaryrefslogtreecommitdiffstats
path: root/drivers/of
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|\
| * of_path: Allow to specify path with phandle onlySascha Hauer2014-04-281-0/+3
| | | | | | | | | | | | | | | | Instead of just allowing to specify an OF path with additional partname: property allow to specify a phandle to the partition directly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: move of_find_device_by_node_path to drivers/of/of_path.cSascha Hauer2014-04-282-14/+14
| | | | | | | | | | | | | | As it's generic helper function which should not stay in driver specific code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: partition: set device_node of the newly created partitionSascha Hauer2014-04-281-0/+2
| | | | | | | | | | | | So that we can find the devicenode for a partition. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | OF: barebox-env: Use bb device on NANDSascha Hauer2014-04-281-0/+19
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: nand: create bb devices automaticallySascha Hauer2014-04-281-3/+0
|/ | | | | | | | When a mtd device can have bad blocks we want to create a bb device, so do this automatically. This allows us to drop bb device creation from the environment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of_gpio: return error if no device foundSascha Hauer2014-04-091-3/+3
| | | | | | | of_get_named_gpio_flags used to return 'ret' when no device is found, but 'ret' is zero here. Return an error instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: Add support for "stdout-path" propertySascha Hauer2014-03-311-2/+5
| | | | | | | | ePAPR 1.1 specifies the "stdout-path" property, but barebox currently only handles the "linux,stdout-path" property. Add parsing for the new property name. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers/of/base.c: Fix sparse warningsAlexander Shiyan2014-02-171-4/+4
| | | | | | | | | | drivers/of/base.c:70:20: warning: symbol 'root_node' was not declared. Should it be static? drivers/of/base.c:72:20: warning: symbol 'of_aliases' was not declared. Should it be static? drivers/of/base.c:1724:20: warning: symbol 'of_chosen' was not declared. Should it be static? drivers/of/base.c:1725:12: warning: symbol 'of_model' was not declared. Should it be static? Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* environment: Use accessor functions for default environment pathSascha Hauer2014-01-271-1/+1
| | | | | | | | | default_environment_path only exists when CONFIG_ENV_HANDLING is enabled. Boards would have to #ifdef this if they wanted to use default_environment_path. Use accessor functions instead which can be ifdeffed on a single place. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: find also nodes by mixture of alias and pathJan Weitzel2014-01-101-1/+22
| | | | | | | | Let of_find_node_by_path_or_alias also find a node starting with an alias followed by a path like "i2c0/tps@24" Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: platform: Fix possible crashAlexander Shiyan2014-01-101-3/+3
| | | | | | | | "dev" may uninitialized or points to incorrect device. While at it make the message more informative. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: gpio: Fix Kconfig variables to depend onAntony Pavlov2013-12-121-2/+2
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/tegra'Sascha Hauer2013-12-061-1/+1
|\
| * gpio: reduce noise when parsing DTLucas Stach2013-12-041-1/+1
| | | | | | | | | | | | | | | | | | Some GPIOs are optional, so it might not be an error if we can not find a DT property. Do the same thing as the Linux kernel and only print a debug message not an error. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2013-12-062-1/+6
|\ \
| * | of: gpio: Add Kconfig variable to depend onSascha Hauer2013-11-252-1/+6
| |/ | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / OF: parse OF clock providers after populateSebastian Hesselbarth2013-11-111-0/+1
|/ | | | | | | | This adds a call to of_clk_init right after platform devices have been populated. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: fdt: reorder fdt_header initializationSascha Hauer2013-11-081-2/+2
| | | | | | | | No functional change, just reorder the initialization of the different offset/size members of fdt_header in increasing order to make it easier to read. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: fdt: Fix fdt size_dt_structSascha Hauer2013-11-081-2/+1
| | | | | | size_dt_struct was calculated too big, we have to substract ofs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: simplify phandle lookupSascha Hauer2013-10-221-8/+3
| | | | | | | | | Instead of populating an extra list containing all phandles just iterate over the whole tree. This is done as preparation for more dynamic devicetrees where parts are loaded at runtime. Here we don't want to keep the list of phandles in sync. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>