9
0
Fork 0
Commit Graph

190 Commits

Author SHA1 Message Date
Jan Luebbe 5471ece663 of/base: fix typo
Signed-off-by: Jan Luebbe <jluebbe@debian.org>
2015-06-14 12:17:08 +02:00
Jan Luebbe f14b51e950 partition: do not overwrite an existing DT node pointer
This is necessary to find EEPROM devices using the device tree nodes.

Signed-off-by: Jan Luebbe <jluebbe@debian.org>
2015-06-14 12:17:07 +02:00
Sascha Hauer 3975737a7d Merge branch 'for-next/misc' 2015-05-06 21:36:13 +02:00
Marc Kleine-Budde 885a1cf27e of_path: of_find_path(): add possibility to return .bb device
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>
2015-04-23 08:12:28 +02:00
Marc Kleine-Budde 724d8847ed environment: remove unused code
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>
2015-04-17 07:31:35 +02:00
Sebastian Hesselbarth c6a9698dc1 OF: gpio: Silence error message on -EPROBE_DEFER
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>
2015-04-17 07:23:47 +02:00
Sascha Hauer fa20ea45e0 Merge branch 'for-next/tegra' 2015-03-09 08:32:26 +01:00
Lucas Stach 35d5ab939f of: make of_alias_get work on all types of DT paths
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>
2015-03-04 11:34:08 +01:00
Marc Kleine-Budde f6b8bb42ca of/base: fix sparse warning, don't use integer 0 as NULL pointer
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-03 08:25:53 +01:00
Marc Kleine-Budde c681e4a45b of_path: of_find_path(): remove unused variable len
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-03 08:23:46 +01:00
Sascha Hauer 7b0f932bcd Merge branch 'for-next/mxs' 2015-02-04 19:09:15 +01:00
Wadim Egorov f0f6a7477b Fix spelling: pathes -> paths
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 10:02:56 +01:00
Sascha Hauer c42178d9fc of: Create platform_device when creating AMBA device failed
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>
2015-01-28 08:18:44 +01:00
Masahiro Yamada d8753571b2 sizes.h: move include/sizes.h to include/linux/sizes.h
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>
2015-01-08 14:00:26 +01:00
Lucas Stach e91702bd61 fdt: don't strip const qualifier
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>
2014-12-11 08:37:09 +01:00
Jan Luebbe 48ba0a1afd fdt: of_unflatten_dtb can work on const data
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-12-04 08:24:05 +01:00
Jan Luebbe 78f20990ce dt: factor out common code
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>
2014-11-20 14:43:06 +01:00
Jan Luebbe ea5abfb5c1 of: use OFTREE_MEM_GENERIC for the sandbox
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-07 08:01:48 +01:00
Sascha Hauer 7b4cc54579 Merge branch 'for-next/tegra' 2014-11-05 15:47:39 +01:00
Teresa Gámez 3249a71b26 of: Add of_device_enable_and_register functions
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>
2014-11-03 15:44:18 +01:00
Lucas Stach 2840294a51 of: import pci range parser from linux
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:01 +02:00
Sascha Hauer 6209c24274 Merge branch 'for-next/openrisc' 2014-10-02 08:54:42 +02:00
Sascha Hauer 9d7cd03e2a Merge branch 'for-next/of' 2014-10-02 08:54:42 +02:00
Teresa Gámez e5707ec702 of: Added of_set_property_to_child_phandle
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>
2014-10-01 08:13:02 +02:00
Teresa Gámez d1d7876499 of: base: Add of_parse_phandle_from
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>
2014-10-01 08:13:02 +02:00
Teresa Gámez 55475204cd of: base: Add of_find_node_by_phandle_from
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>
2014-10-01 08:13:02 +02:00
Raphaël Poggi 25bffd8a9a of: fdt: fix typo in header
Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-25 08:12:01 +02:00
Antony Pavlov 9a585cd732 openrisc: add initial device tree support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Cc: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-09 10:20:30 +02:00
Sascha Hauer 80779337ef Merge branch 'for-next/net' 2014-08-07 13:13:35 +02:00
Sascha Hauer 38c3b2455e Merge branch 'for-next/misc'
Conflicts:
	lib/Makefile
2014-08-07 13:13:31 +02:00
Sascha Hauer f1ee4e8b73 Merge branch 'for-next/marvell' 2014-08-07 06:14:59 +02:00
Sascha Hauer 8a11a59b37 Merge branch 'for-next/efi'
Conflicts:
	.gitignore
	Makefile
	drivers/serial/Makefile
2014-08-07 06:14:56 +02:00
Raphaël Poggi 6696e95bf5 of_mtd: add soft_bch and hw_oob_first ecc modes
Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-04 20:52:14 +02:00
Sascha Hauer 79fa5783b8 of_partition: devfs_add_partition returns an error pointer
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>
2014-08-01 08:31:47 +02:00
Ezequiel Garcia 6e71e070da net: phy: Add minimal support for QSGMII PHY
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>
2014-07-31 07:37:12 +02:00
Sebastian Hesselbarth 846da3d7df of: pci: import of_pci_get_devfn()
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>
2014-07-31 07:29:22 +02:00
Sascha Hauer 1dff7e414d Add initial EFI architecture support
This adds support for running barebox in an EFI environment
on X86 PC hardware.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-16 10:46:18 +02:00
Sascha Hauer d908766208 of: platform: Use PRINTF_CONVERSION_RESOURCE for printing resources
Avoids compiler warnings about wrong format specifiers

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-11 08:15:35 +02:00
Sascha Hauer 874b8ac790 Merge branch 'for-next/net' 2014-07-04 17:27:11 +02:00
Sebastian Hesselbarth f2b9c6b6d4 drivers: of: import PCI bus specific translator
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>
2014-06-25 08:44:49 +02:00
Sebastian Hesselbarth de20089ea8 of: net: respect phy-connection-type property
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>
2014-06-25 08:31:26 +02:00
Sascha Hauer d384b5639f of: Drop devicetree merge support
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>
2014-05-22 08:09:13 +02:00
Sascha Hauer 9bb76883c1 Merge branch 'for-next/of' 2014-05-05 13:32:37 +02:00
Sascha Hauer 3781d93b06 OF: barebox-env: Use bb device on NAND
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-28 11:49:01 +02:00
Sascha Hauer 1a8800458b mtd: nand: create bb devices automatically
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>
2014-04-28 11:45:09 +02:00
Sascha Hauer 66d0f93d5c of_path: Allow to specify path with phandle only
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>
2014-04-28 11:31:39 +02:00
Sascha Hauer 12c7f5d560 of: move of_find_device_by_node_path to drivers/of/of_path.c
As it's generic helper function which should not stay in driver
specific code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-28 11:30:53 +02:00
Sascha Hauer 601dcf7644 of: partition: set device_node of the newly created partition
So that we can find the devicenode for a partition.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-28 10:20:10 +02:00
Sascha Hauer 80bfa0b7cb of_gpio: return error if no device found
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>
2014-04-09 22:26:26 +02:00
Sascha Hauer e2fa0cca06 of: Add support for "stdout-path" property
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>
2014-03-31 09:16:12 +02:00