ENC28J60 is a stand-alone Ethernet controller with SPI Interface
and integrated 10BASE-T PHY.
This driver was ported from linux-3.15.
The most notable barebox driver version changes:
* add device tree support;
* drop netif_msg_*() debug level checking;
* use IF_ENABLED for checking CONFIG_ENC28J60_WRITEVERIFY;
* add mii_bus support.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Suppose you have two network controllers.
The first one is ENC28J60 (it is in low power mode
after start) the second one is always-enabled eth1.
As ENC28J60 is in low power mode before enc28j60_eth_open()
is called. ENC28J60's mii traceiver is in low power mode too
so the mii traceiver's register are inaccessable.
Here is a sample log just after barebox start:
barebox:/ miitool
miibus0: registered phy as /dev/phy0
No MII transceiver present!.
miibus1: registered phy as /dev/phy1
phy1: eth1: negotiated 100baseTx-FD, link ok
barebox:/ miitool
No MII transceiver present!.
phy1: eth1: negotiated 100baseTx-FD, link ok
The 'No MII transceiver present!.' message is confusing here.
This patch fixes the problem so the miitool output
looks like this:
barebox:/ miitool
phy0: spieth0: No MII transceiver present!.
phy1: eth1: negotiated 100baseTx-FD, link ok
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The menutree doesn't select CONFIG_GLOB, but it depends on it. Without
it will just hang. So let it select it automatically. Also remove the
dependency of CONFIG_GLOB on CONFIG_HUSH, because glob() will run with
the simple shell as well.
Also let CONFIG_MENUTREE select on CONFIG_GLOB_SORT. While is not
strictly needed, many people use menu/00-foo menu/10-bar menu/20-barf
to sort their menu entries. So select it out of convenience.
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The rule in barebox is to name the directories after
the modules. As hummingboard is just one of the
carriers for the MicroSOM module, name the directory
accordingly.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Instead of repeating the same lowlevel init for every board
move it to it's own initcall.
Avoids code bloat and shaves off almost 1.5kB of uncompressed
barebox size for a default imx_v7_defconfig build.
For boards wherethe hostname setup was done in the postcore
initcall we move this to a device initcall to get it out of
the way.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Fix only two "interupt" misspellings in entire barebox codebase.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Fix misspellings of "persistent", including the renaming of a function
to "register_persistant_environment".
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Add new chip revisions for the new tap-out TO1.5 (i.MX6Q/D) and TO1.2
(i.MX6DL/S)
Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Also make this download chapter note the next branch.
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Note that I used "Appendix: " as text, because it looks like
python-sphinx doesn't know about appendices.
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
For some phyFLEX-i.MX6 modules the call __barebox_arm_head() was not removed.
With this function the barebox does not start.
Signed-off-by: Christian Hemp <christian.hemp@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The functions are already in the sandbox, just the #defines are
missing.
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
When compiled for ARCH=sandbox, we get a compiler warning
if we don't include the needed header file as well.
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This is a rewrite of the Documentation in reStructuredText format using
Sphinx as build system, see http://sphinx-doc.org/.
The documentation is built into static html pages with 'make docs'.
The pages can be found under Documentation/html after building.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Remove the barebox devicetree documentation. It will
be replaced with sphinx based documentation later.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This removes the documentation texts in Documentation/. It will
be replaced with sphinx based documentation later.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The doxygen documentation is long outdated. Remove it. It will
be replaced with sphinx based documentation later.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Enables all relevant errata workarounds for the
i.MX6 SoC.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Header only implementation, so they can be pulled
into the individual SoC cpu init functions.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This adds pinctrl drivers for Marvell Dove and Kirkwood SoCs based
on a common driver stub. This design is based on the corresponding
Linux driver and should ease additional drivers for Marvell Armada
SoCs.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We already have 'select COMMON_CLK' so 'select HAVE_CLK'
is redundant.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Marvell MVEBU SoC id and revision can be read out from any PCIe port
registers. This adds corresponding code to read out id and revision
and provides a helper function for drivers to use it.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Marvell MVEBU DT files contain some nodes mapped to PCI address space,
add the translator Kconfig to be able to iomap those node's addresses.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
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>
Also we can enable m24c02 eeprom chip in dts-file e.g.
&i2c0 {
status = "okay";
eeprom: m24c02@50 {
compatible = "spd";
reg = <0x50>;
};
};
Alas! qemu mips malta spd m24c02 eeprom chip emulation is not perfect:
the block read operation does not work properly.
Here is an example.
If we read eeprom content byte-by-byte then there is no problem:
barebox:/ for i in 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f ;
> do i2c_read -b 0 -a 0x50 -r $i -c 1 ; done
0x01
0x75
0x54
0x00
0x82
0x08
0x00
0x01
Compare this output with content of qemu.git/hw/mips/mips_malta.c:
static eeprom24c0x_t spd_eeprom = {
.contents = {
...
/* 00000008: */ 0x01,0x75,0x54,0x00,0x82,0x08,0x00,0x01,
But if we read several bytes at once the we have data corruption:
barebox:/ i2c_read -b 0 -a 0x50 -r 0x8 -c 8
0x01 0xff 0xff 0xff 0xff 0xff 0xff 0xff
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>