"ifconfig" and "ip" from normal Linux userspace shows ethernet addresses
normally in lowercase. And the %pM format specifier in Linux does that,
too. Conform to this custom formatting.
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Enumeration values will only be shown if there are at least two of them.
With only one enumeration, it was just repeating what was previously printed
anyway.
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* some output sections started with "foo: bar", some with "foo = bar". Unify this.
* there was a fixed size to the "foo =" parameters, which wasn't fitting, this
was especially visible at "devinfo global"
* don't output "resources:", "driver:" and "bus:" lines if there are none
resources, drivers or busses involved.
* remove some empty lines
* harmonize differentiation between headlines (e.g. "resources:") and values
by indenting values slightly
* uppercase some texts
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The command 'devinfo' was first spitting out all devices, and then
also all drivers. This patch separates them into two commands,
'devinfo' as before, and also the new command 'drvinfo'
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
As stated in section 29.19.32 of SAMA5D3 Series datasheet, to move
from CS(n) to CS(n+1) the stride is 0x14 and not 0x10 as in the
other AT91 CPUs
Signed-off-by: Matteo Fortini <matteo.fortini@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The MB 77.07 is a small (80x80 mm) single-board computer
developed in Russia by the RC Module.
It was developed as an educational board for К1879ХБ1Я SoC
capabilities demonstration.
See http://www.module.ru/en/catalog/micro/micro_pc/ for details.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit adds minimal support for the UEMD SoCs
from RC Module (http://www.module.ru).
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The fec has a mdio bus. This adds support for a subnode
in which the phys on this bus can be specified.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
phys start with features initialized from the phy driver
and are eventually limited by of_set_phy_supported. This
does not work with the genphy driver which starts with
no features and overwrites phydev->supported with the
values read from hardware in config_init. This overwrites
the features adjusted by of_set_phy_supported.
To fix this let the genphy driver start with full features
which are then only limited in config_init, but never
extended.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
the phydev->supported field does not necessarily match the hardware
capabilities, it could be limited by the board to force the phy
to a lower speed. In this case make sure the gigabit advertise bits
are cleared on a gigabit phy.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
barebox can transparently handle phys specified in the devicetree.
Use this functionality in the orion-gbe driver. This requires:
- add a device to the orion-gbe ports. This has the port device_node
attached and is set as the parent of the ethernet device so that
the ethernet code finds the correct device_node
- In the mdio-mvebu driver attach the device_node of the mdio device
to the miibus device so that the phy code finds the correct node
- call phy_device_connect instead of of_phy_device_connect.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Use stdout-path instead of linux,stdout-path and use &uart format
instead of writing the full path.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Some USB ports only have one possiblitly for the phy_type and
the type is not specified in the devicetree in this case.
Rely on the reset default instead of failing.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We do not have usb_get_dev_index() function, so remove this declaration.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
When loading or saving a devicetree it seems logical to add the
filename to the option specifying the command. This is also slightly
easier to parse.
While at it add missing documentation for the -s option.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
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>
The oftree command is overloaded. This adds a dedicated command
which only dumps devicetrees to the console so that the corresponding
functionality in the oftree command can be removed in the next step.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Update cpuinfo to display the current CPU implementation
using the VR2 register defined in the architecture specification
v1.0
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The relocation code can now relocate from anywhere to
the RAM.
The old code assumed that the binary was copied to the RAM
by some PBL and then it just relocated the .text section
from the loaded address to the linked address.
Now, it first checks if vectors are somewhere else than the
linked address. If yes, there are copied to address 0 (or
to the exception vector base address if register EVBAR is
present).
Then, the .text section is relocated from its current location
to the RAM.
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The OpenRISC architecture specification v1.0 defines
new SPR registers. This patch adds registers definition
for group 0 and update bit definitions for the CPU
configuration register.
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
It's not always easy to know what is the size of a parition.
This patch adds the size of a memory range in human readable
format. We now have for example:
`---- cfi_flash0
`---- nor0
`---- 0x00000000-0x00ffffff ( 16 MiB): /dev/nor0
`---- 0x00000000-0x0001ffff ( 128 KiB): /dev/env0
`---- 0x00020000-0x0011ffff ( 1 MiB): /dev/fpga0
`---- 0x00120000-0x0019ffff ( 512 KiB): /dev/self0
`---- 0x001a0000-0x00d9ffff ( 12 MiB): /dev/linux
`---- 0x00da0000-0x00ffffff ( 2.4 MiB): /dev/elf
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Even when both the ethernet controller and the phy support certain
features a board may have additional limitations. Allow specifying
it in the devicetree.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We do not care about releasing the resources in the error
path, but at least check the return value of eth_register
and mdiobus_register.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
When the ethernet device has a device_node then try finding
the associated phy via the phy-handle property.
This makes the phy handling via devicetree transparent to the
ethernet drivers.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
When a mdio bus has a device node attached then register the phys
specified there. This makes it possible to lookup the phys using
phandles later.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The phy_map should be valid once a phy_device is registered. This
allows registering phys outside of mdiobus_scan.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
phy_device_connect combines searching for a phy with actually attaching
it to the ethernet device. Factor out a phy_device_attach function to
have a function for each purpose. This makes the logic of phy_device_connect
simpler.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The driver doesn't use interrupts and Linux driver crashes when emac
interrupts are enabled at boot: keep them disabled.
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Avoid unneeded delay when waiting for the completion of a mdio
operation and return as soon as possible.
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The mxs nand driver has a calculation for the ecc strength.
This calculation was not used for some common nands and it
was assumed that 2k page nands always have a ecc strength
of 8. This is not true since there are devices with 224 bytes
of oob instread of 64 bytes. These allow for a greater ecc
strength. Since the kernel relies on the calculation and
we have to be consistent with the kernel use the calculcation
in barebox aswell and just remove our assumptions.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The of_* commands take devicetree nodes as parameters. Add a
devicetree completion function to ease passing nodes to these
commands.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
the command specific complete callbacks only work when no
option is typed already. For example "devinfo <tab><tab>"
correctly completes the devices, but "devinfo -x <tab><tab>"
does nothing. That is because the options are passed to
the input string of the completion handlers. Skip the option
string by finding the last space in the input string. This
is not perfect since "devinfo -f<tab><tab>" still does not
work, but it's better than what we have now.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>