| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
Rather than doing DMA on the input buffer address get a proper DMA
address from the mapping functions.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
The fec receive buffers are coherently mapped, no need to dma_sync on
them.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If MFD_SYSCON is disabled in .config then socfpga_designware_eth probe
fails with this message:
socfpga_designware_eth ff702000.ethernet: Could not get sysmgr-syscon node
Thanks to Steffen for hint!
Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since commit a4cee7207a1 ("net: phy: micrel: Add workaround for bad
autoneg") by Philipp Zabel <p.zabel@pengutronix.de>:
Based on kernel commit d2fd719bcb0e ("net/phy: micrel: Add workaround
for bad autoneg") by Nathan Sullivan <nathan.sullivan@ni.com>:
Very rarely, the KSZ9031 will appear to complete autonegotiation, but
will drop all traffic afterwards. When this happens, the idle error
count will read 0xFF after autonegotiation completes. Reset the PHY
when in that state.
is it possible that we get the link to late and barebox reports "Network is
down". The problem is that ksz9031_config_init is called again in an
error case. In this case autoneg will restart but waiting for finish is
missing.
Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Tested-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Timeout of 1ms is too low for case when device operates in Full Speed
mode. This causes most incoming frames to be lost.
Since timeout is only used to get out of polling loop in case of no
response from hardware, increasing it should be safe for all platforms.
Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Tested-By: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
| |
Linux also has struct file_operations which are something different.
Rename our file_operations to cdev_operations which better matches
what we have.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
While cpsw is probe dt, it accepts only slaves nodes with "phy_id" property.
In case of fixed-link there are no "phy_id" property and probe would be failed.
This patch avoid the failure due to missing "phy_id" in case of fixed-link.
Signed-off-by: Andreas Schmidt <mail@schmidt-andreas.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
We only want to register a slave when a valid phy is available.
Instead of manually calling mdiobus_scan() and phy_register_device()
we can let this do from phy_device_connect() which also works for
fixed phys.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Implement the missing reading of the fixed link parameters from
the devicetree properties.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we point to a PHY node by phandle, that PHY might well be on a MDIO
bus that hasn't been scanned when we look for the PHY. Fortunately we
know exactly where to look for the PHY, so make sure to scan the bus
at the right address.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If the EEPROM content isn't valid, there is no point in registering the
EEPROM device, as it will reject any read attempt anyway.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The EEPROM device will contain an invalid signature if it has been
populated from iNVM. Since the iNVM enum type has been removed, the
only way to tell if a signature check makes sense is to look at the
EEPROM valid status.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There is no point in registering the emulated EEPROM device if only the
iNVM is available with no external flash attached to the i210, as in
practice it's only shadowing the iNVM.
When the EEPROM is populated from iNVM, the signature is not valid, which
causes other parts of the driver to fall over. To fix this just ignore
the EEPROM in that case.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes: 95c346ccaa6d (net/e1000: don't access the (simulated)
eeprom when it is invalid)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| | |
By returning early if the MAC type isn't e1000_igb.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
Actual read value was lost and only by accident worked properly.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
| |
As the eth_device and mii_bus structs are allocated inside the
dw_eth_dev struct a forward declaration isn't enough.
Fixes: c1f902841ce3 (net: designware: move probe to generic driver)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of silently using a wrong value, check if drvdata is defined
before use.
Print a warning if there is no drvdata found.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
Add a driver for the SoCFPGA-specific version of the designware ethernet ip core.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The designware ethernet core is used on multiple different SoCs.
The linux kernel has a generic driver and SoC-specific drivers.
Do the same here.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The .id member of the struct device for the invm device is not
initialized and so implicitly zero. This yields:
register_device: already registered invm0
for the second i210 during probe.
So use the parent's id to initialize the id for invm, too, as is already
done for the corresponding e1000-nor device.
Fixes: a74b97f009c6 ("e1000: Expose i210's iNVM as a cdev")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Calling mdiobus_detect() for a bus that serves as a parent for a MDIO
bus multiplexer would result in parent bus being populated with
devices that are present on downstream bus that multiplexer happens to
be "pointing" at that moment. To avoid that introduce 'is_multiplexed'
flag to struct mii_bus and change mdiobus_detect to ignore busses for
which that flag is set.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Port Linux version driver to Barebox, to support such device found in
various revisions of ZII's VF610 development board.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Port mdio-mux.c from Linux kernel to Barebox, to support adding
dirvers that rely on that infrastructure/API.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Port of_mdio_find_bus() from Linux kernel. This function is used in
MDIO multiplexor infrastructure added in following commit.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
If the flash is in secure mode it is not possible to modify its
contents. So log that useful information at probe time.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| | |
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some supported flash devices (e.g. SST25VF040) are write protected after
power up. If the device holds a valid firmware image the i210 can handle
that just fine. If however there is no firmware programmed, a procedure
is needed to remove this protection before an image can be flashed.
So implement the needed callbacks to make the commands protect and
unprotect do the right thing.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Erasing the whole flash takes approximately 7s on one of my test
machines. Expand the timeout accordingly.
Note however that it is in general not allowed to hold the flash
semaphore for so long and "firmware might implement a timeout
mechanism and take ownership of the relevant [lock]" after one second.
So a chip erase should better only be done when firmware doesn't make
use of the flash.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There used to be four places that all emit the same error message. Even
if in a given context not all four of them can be relevant, there are
always two possible locations where the message can origin from.
So make the output slightly different in all places to ease future
debugging.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The shadow RAM that is used to serve read requests from the eeprom
interface isn't valid in all cases. Catch these by returning an error in
the eeprom read function and make eeprom validation dependant on
working access.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
Provide some info about flash/eeprom state at boot up
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When the flash doesn't hold a valid firmware image there are still
some things (like accessing the flash) possible. Don't return an error
code in this case but return 0 instead. This way the driver is
regularily bound and just doesn't provide a network interface.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This device uses e1000_read_eeprom to provide access to the emulated
eeprom on e1000-igb. Only reading is implemented for now.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
The iNVM storage is 2 Kib containing 64 32bit words (0-63).
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
An i210 (aka e1000_igb) supports two different non-volatile storages for
configuration. There is a built-in one-time programmable storage called
iNVM and an optional external SPI-Flash. If a flash is populated and
contains a valid configuration image the iNVM is not used (if I
understood the documentation correctly). Still the iNVM can be useful if
the flash is not configured. Also the iNVM contains manufacturing
identification information.
So it makes sense to provide the invm device even if a flash is present.
This patch also cleans up some confusion that suggests that invm is a
way to access the (simulated) eeprom structures and drops some unused
enum values.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Bring functions in a more natural order which allows to drop a few
forward declarations.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Nothing in the documentation suggests that the time to get a semaphore
depends on the size of the (optional) eeprom and I doubt there is a
relation. Given that 2048 is the maximal value for word_size unless a
flash is used to emulate the eeprom, pick 2049 as alternative arbitrary
value that probably doesn't result in regressions.
This drops the only user of ->word_size outside of eeprom.c which allows
easier restructurings there in the future.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
| |
While working on the e1000 driver I noticed a few coding style misdeeds.
These are fixed here.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From ed1cbcd05d5efeb4012d77a9a4ab9c1da0449bdc Mon Sep 17 00:00:00 2001
From: Clement Leger <clement.leger@kalray.eu>
Date: Tue, 10 Oct 2017 14:29:49 +0200
Subject: [PATCH] Marvell: implement marvell_of_reg_init
Implement marvell_of_reg_init in order to use marvell,reg-init property
from device-tree. The code is taken from Linux kernel and slighlty
modify to fit barebox structures.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
xzalloc() either returns memory or panics, so checking for NULL is useless.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|