| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Unlike Linux, barebox has no CONFIG_FIXED_PHY or CONFIG_IRQ_DOMAIN.
The former is implied by CONFIG_PHYLIB and the latter is unneeded, so
revise the Kconfig option accordingly.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230503100609.1522959-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For easier patch merging and comparison with Linux move the usb
gadget files to where Linux has them. For now do a plain git mv
include/usb include/linux/usb, eventhough there might be some
files which are purely barebox specific.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The Ethernet interface device is just a child of the physical device with
no DT node assigned. As such, it lacks all DMA settings that may be
set in the DT. Fix this by using the hardware device instead.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230414145259.3644816-6-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It shouldn't matter for now, but DMA API should always be called for the
physical device, i.e. the struct device underlying the struct pci_device.
This the Ethernet device interface parent, so use that instead.
Cc: Denis Orlov <denorl2009@gmail.com>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230414145259.3644816-4-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
detected
Rather than generating an error, revert to the default link
configuration. Some configuration is performed during the port pre-enable
sequence.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.barebox.org/20230316134209.4068801-3-o.rempel@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Execute port enable code dynamically based on link detection status.
This enables proper MAC configuration during link detection events.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.barebox.org/20230316134209.4068801-2-o.rempel@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The required functionality is essential for cable hot plugging or
asynchronous link detection. In its current state, DSA will only operate
if the cable was connected prior to booting.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.barebox.org/20230316134209.4068801-1-o.rempel@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Building the driver for RISC-V instead of ARM, shows that the
headers of some symbols depended on were included indirectly
before. Fix this to enable RISC-V build.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230411071436.1630752-10-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
| |
Linux v6.3-rc1 renamed the zynq macb compatibles from cdns,zynq-gem to
xlnx,zynq-gem and cdns,zynqmp-gem to xlnx,zynqmp-gem. Adjust the
compatibles in the driver accordingly.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ds->edev_master is used in a lot places and if we can't populate,
because the Ethernet device wasn't found, we should abort instead of
crashing later on.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230315143522.1512531-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all at91 specific header files to include/mach/at91/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all ep93xx specific header files to include/mach/ep93xx/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all omap specific header files to include/mach/omap/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
drivers/net/usb/usbnet.c which is compiled with NET_USB=y uses
phy_device_connect() which is only available with PHYLIB=y. So select
PHYLIB from NET_USB and in turn remove the same select from some options
that depend on PHYLIB.
Fixes: 2263e27814f1 ("net: introduce phylib")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.barebox.org/20230314144909.2809581-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The SMI Realtek driver takes care of chip_data_sz as expected, but the
MDIO driver doesn't, leading to memory corruption. Fix this.
This issue is also present in the original Linux driver and will be fixed
there as well.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230307101446.2077676-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
| |
Line should normally not show up, but when it does, have it look nice.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230307101446.2077676-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The driver includes mfd/syscon.h and uses
syscon_regmap_lookup_by_phandle():
eqos-imx8 30bf0000.ethernet@30bf0000.of: probe failed: Function not implemented
Select MFD_SYSCON to fix this.
Fixes: b6fb740819 ("net: eqos: add i.MX8MP support")
Signed-off-by: Bastian Krause <bst@pengutronix.de>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230222122320.1494205-1-bst@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
struct device_d was renamed to struct device. Rename the remaining
occurences of device_d.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Denis Orlov <denorl2009@gmail.com>
Link: https://lore.barebox.org/20230210143924.915149-2-denorl2009@gmail.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This moves PCI bus-mastering enable from 'init' to 'open', allowing to
bring an interface up after bringing it down. Also add corresponding
dma_free_coherent() calls into 'close', getting rid of memory leaks.
Signed-off-by: Denis Orlov <denorl2009@gmail.com>
Link: https://lore.barebox.org/20230208081307.3190117-2-denorl2009@gmail.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This driver seems to work fine on ARM64 Virtual Machine in QEMU.
Signed-off-by: Denis Orlov <denorl2009@gmail.com>
Link: https://lore.barebox.org/20230208081307.3190117-1-denorl2009@gmail.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Same macro is already defined in <linux/phy.h>.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230130113405.2796838-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The pdev member is unused neither do have barebox support for 'struct
platform_device' so remove the usage.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.barebox.org/20230130234501.1122060-1-m.felsch@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
There is no reason to keep code from 'dma-mapping.h' in a separate file,
so merge it into 'dma.h'.
Signed-off-by: Denis Orlov <denorl2009@gmail.com>
Link: https://lore.barebox.org/20230210144745.915720-5-denorl2009@gmail.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds the platform glue for the Designware EQOS ethernet interface
as implemented on the i.MX8MP SoC.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230111182157.1702865-3-l.stach@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Both read and write operations for the regmap are supposed to return an
int, not a ssize_t and build warns about this. Fix it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230125075354.1760273-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
| |
We have drivers for both rtl8365mb and rtl8366rb and each uses a
different tagger. realtek-dsa didn't know that and caused a reference to
an unavailable symbol when one of them was disabled. Add IS_ENABLED()
guards to fix this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230125075354.1760273-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
This imports the Linux v6.1 state of the driver into barebox. This has
been tested with the RTL8365MB in (bitbanged) SMI mode.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230116134501.2006391-10-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
The barebox DSA support differentiates between a port_pre_enable, that's
called before connecting the PHY to drive a clock if nedeed and the
actual port_enable. For user ports, port_enable of the CPU port is
called, but not port_pre_enable. Fix this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230116134501.2006391-7-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
Unlike with regular user ports, the CPU port doesn't have a dev or index
member assigned, which leads to subtle breakage porting Linux drivers.
Use the new dsa_port_alloc() helper to fix this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230116134501.2006391-6-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
We'll reuse this helper in a follow-up commit for allocating the CPU
port's struct dsa_port, so prepare for this by creating a helper
function.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230116134501.2006391-5-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Linux calls the ops dsa_switch_ops and we have some members, which are
the same in both, so adopt the Linux naming.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230116134501.2006391-4-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With regmap formatting support now in place, adding I2C support is quite
trivial, so let's do it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230111132956.1153359-12-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With the move to regmap, it's straight-forward to add i2c support.
Prepare for this by making it possible to turn off the SPI parts.
No functional change.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230111132956.1153359-10-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now that we use regmap for the KSZ9477 driver, we can make the register
map available for introspection as a device file. As the KSZ driver has
a separate regmap for each of the three access sizes, we add a new
regmap_multi_register_cdev abstraction that multiplexes device file
access to the regmap with the best matching alignment.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230111132956.1153359-7-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Linux uses three regmaps for the KSZ9477 DSA driver, one for each of the
three access sizes supported by the chip. While this increases overhead
a bit, it'll allow us in future to extend the driver seamlessly for i2c
support.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230111132956.1153359-6-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The MSECOND/USECOND constants are in nanoseconds, while
readl_poll_timeout accepts microseconds. No functional change.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230110172720.35331-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The driver readily works in 32-bit mode as it takes care there
to write zero to the DMA_DESC_ADDRESS_HI field of descriptors.
In the receive path, a 32-bit integer is shifted by 32 though
leading to a (harmless) warning. Adjust the type to silence it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230110180126.73739-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A STM32MP1 platform using a KSZ switch with barebox' DSA
framework now throws a warning:
WARNING: ksz9477-spi ksz9563@00: Failed to set promisc mode.
Using different eth addresses may not work. error 95
DSA worked correctly though and the switch ports had their own
MAC addresses different from the CPU's mac address. Frame
ingress and egress indeed occurs with the switch port's MAC address.
Nevertheless, it's a good idea to set the promiscuous bit, so do this
now, if only to silence the warning.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230110153719.4037355-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Tested on an i.MX8MN board communicating with the switch
over I2C. The IC says KSZ9563RNXI, but is detected as KSZ9893:
ksz9477-i2c ksz85630: Found KSZ9893
ksz9477-i2c ksz85630: chip id: 0x00989360
This is the same in Linux, but switch works though. I2C support
will follow separately.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230110133817.3939707-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I have a KSZ8563RNXI-TR, which while it works, barebox reports as
"Found KSZ9893", which is a bit confusing. For non-KSZ9893, barebox
reports "Found KSZ9477 or compatible", so do likewise for KSZ9893.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230110133817.3939707-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|