Printing the file descriptor does not give any information when
the network interface creation fails, so print errno here instead.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Aligns MAC registers to the latest reference manual.
Replaces NULL buffers as some SPI drivers will fail.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Enable VLAN support so that this driver can be used to test
the VLAN when using qemu_x86 board.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This option will configure MCUX block (by setting RMIISRC [19] bit to 1
in SIM_SOPT2 register) to use external clock source for RMII from
ENET_1588_CLKIN).
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Replace individual device instance definitions with the macro that
expands to the equivalent change.
F='struct device DEVICE_NAME_GET'
git grep -l "$F" \
| xargs sed -i -r \
-e "s@$F"'\(([^)]*)\);@DEVICE_DECLARE(\1);@'
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
User can now add extra Ethernet TAP parameters when starting QEMU.
This is useful if we want to set for example the MAC address
of the network interface.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The check for assertion on the "config_func" was added to
validate that the function pointer is valid. However, in
the code we are invoking the "config_func" and comparing
its output with NULL. This causes build failures with
CONFIG_ASSERT=1. Caused by PR-25393.
Tested on Nucleo F767Zi board.
Fixes#25427
Signed-off-by: Bilal Wasim <bilalwasim676@gmail.com>
All initialization of the Ethernet interface is done in the
eth_initialize function which is invoked by the boot code.
This function sets up DMA, programs the Ethernet module and
enables IRQs. However, this function does not setup "netif"
interface info which is done when the ethernet device is
enumerated by the NET stack via the "iface_api.init" func.
However, after the eth_initialize func is called, it is
possible that the system receives RX interrupts, and the
"rx_thread" accesses the "netif" pointer to get iface info.
However, because the "netif" info is not necessarily
populated at this time, we get a crash (as OS does NULL
access).
Fixed by enabling Ethernet IRQ after the interface is
properly setup.
Tested on Nucleo F767Zi board.
Fixes#25408
Signed-off-by: Bilal Wasim <bilalwasim676@gmail.com>
Several reviewers agreed that DT_HAS_NODE_STATUS_OKAY(...) was an
undesirable API for the following reasons:
- it's inconsistent with the rest of the DT_NODE_HAS_FOO names
- DT_NODE_HAS_FOO_BAR_BAZ(node) was agreed upon as a shorthand
for macros which are equivalent to
DT_NODE_HAS_FOO(node) && DT_NODE_HAS_BAR(node) &&
- DT_NODE_HAS_BAZ(node), and DT_HAS_NODE_STATUS_OKAY is an odd duck
- DT_NODE_HAS_STATUS(..., okay) was viewed as more readable anyway
- it is seen as a somewhat aesthetically challenged name
Replace all users with DT_NODE_HAS_STATUS(..., okay), which is
semantically equivalent.
This is mostly done with sed, but a few remaining cases were done by
hand, along with whitespace, docs, and comment changes. These special
cases include the Nordic SOC static assert files.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The driver-specific config_info structure referenced from the device
structure is marked const. Some drivers fail to preserve that
qualifier when casting the pointer to the driver-specific structure,
violating MISRA 11.8.
Changes produced by scripts/coccinelle/const_config_info.cocci.
Some changes proposed by the script are not included because they
reveal mutation of state through the const pointer, though the
code works as long as the driver-specific object is defined without
the const qualifier.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Instead of having a Kconfig property, if there is no local-mac-address
property in the devicetree than we'll generate a unique MAC address
based on unique ID registers on the SoC.
We remove the local-mac-address properties in the SoC dtsi files to
match the default behavior that existed before (ie, unique MAC address)
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Move from a Kconfig to select/initialize the MAC address to using the
"local-mac-address" property in devicetree. If the property is set the
drivers will initialize the mac-address from the devicetree (unless the
mac address is all 0's). The MAC address might get overwritten by
either a driver specific means or by the setting of
"zephyr,random-mac-address" in the devicetree.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Utilize the devicetree property "zephyr,random-mac-address" to determine
if a driver should use a random mac address and remove the associated
Kconfig options that enabled this feature.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Rather than having each driver have its own slightly different way of
generating a random mac address, add a helper function that they all can
call so we do it one way.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Use DT_INST_SPI_DEV_HAS_CS_GPIOS() in drivers to determine if we should
utilize CS_GPIO base SPI chipselect handling. This allows us to remove
Kconfig option for this feature.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Rename DT_HAS_NODE to DT_HAS_NODE_STATUS_OKAY so the semantics are
clear. As going forward DT_HAS_NODE will report if a NODE exists
regardless of its status.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Reworked sam_gmac driver to get pin ctrl/mux configuration information
from the device tree instead of via Kconfig and defines in soc_pinmap.h
We remove defines from soc_pinmap.h that are no longer needed due to
getting all that information from devicetree.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Use the new path access helpers to avoid hard-coding devicetree paths
in Kconfig, which is a bit messy.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Convert various DT_DTCM_* macros to use DT_CHOSEN(zephyr_dtcm) and
associated macros from devicetree.h.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert driver to use instance macro's instead of dts_fixup.h based
macros. This moves us closer to removing both dts_fixup.h and per
instance Kconfig symbols.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit adds a reference to the SAM E54 maximum queue count value
in the device tree for specifying the range of `ETH_SAM_GMAC_QUEUES`
configuration.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit adds the GMAC driver support for the Ethernet-capable SAM0
family devices (SAM E53 and E54 at this time).
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Fixed the ETH_SAM_GMAC_QUEUES config by adding if-statements per SoC
series.
Signed-off-by: Vincent van der Locht <vincent@vlotech.nl>
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This commit updates the Atmel SAM GMAC driver to select max frame size
value from the device tree. Now GMAC driver can operate with the three
different frame size options available.
The current supported values are: 1518, 1536 and 10240.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The current setup of physical layer forces RMII interface. The code was
refactored to have only one point to select proper phy interface. Now,
GMAC driver works with both RMII or MII interface. The phy connection
type is now selected by device tree. The default phy connection is RMII.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The NOCACHE_MEMORY can be enabled only for those MCU that support data
cache. The currently SoC that doesn't have data cache is SAM4E.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Improve data cache conditional build. Now data cache code is build
only if device have support to it. This enables GMAC driver for use
with devices that don't have data cache instructions.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This cleans up DMA flags by separating the necessary flags for devices
with one or multiple RX/TX queues.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Run the int_literal_to_timeout Coccinelle script to fix places where
it is clear that an integer duration is being passed where a timeout
value is required.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit updates the Atmel SAM GMAC driver to use the device tree
values for GMAC hardware configuration.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Replace all occurences of BUILD_ASSERT_MSG() with BUILD_ASSERT()
as a result of merging BUILD_ASSERT() and BUILD_ASSERT_MSG().
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
Convert older DT_INST_ macro use in litex drivers to the new
include/devicetree.h DT_INST macro APIs.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Just to get something to test for PM, via frdm_k64f board. So only this
board will get PM enabled.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
By changing the various *NET_DEVICE* macros. It is up to the device
drivers to either set a proper PM function or, if not supported or PM
disabled, to use device_pm_control_nop relevantly.
All existing macro calls are updated. Since no PM support was added so
far, device_pm_control_nop is used as the default everywhere.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The Atmel DFP headers define two "component typedef styles": RFO and
NTO; where the latter makes use of bit field structs to access hardware
registers.
The default component typedef style assumed by the DFP headers (i.e.
when `COMPONENT_TYPEDEF_STYLE` is not explicitly defined) is "RFO" and
this is indeed the component typedef style used throughout the Zephyr
Atmel SAM drivers, except in the particular instance which this commit
addresses.
The use of `GMAC_TA_Type` bit field struct, which is an "NTO" style
construct, is no longer possible with the latest DFPs because
conditional compilation checks for the bit field struct definitions
were added to restrict the use of such constructs to only when the
global component typedef style is set to "NTO".
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Convert older DT_INST_ macro use in silab drivers to the new
include/devicetree.h DT_INST macro APIs.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert older DT_INST_ macro use in stellaris drivers to the new
include/devicetree.h DT_INST macro APIs.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Starting a SMI write operation without waiting for completion of the
preceding SMI read operation cause the write operation to fail if
the time between the 2 operations it too short. This leads to the
PHY being in an unusable state on the MIMRT1060-EVK eval board.
In addition the value of the register was not used, as consequence
some bits were not preserved.
The solution is to do a read/modify/write to set only the
ref clock bit, which sets the PHY into 50MHz clock mode,
and keep the value of the other bits.
Signed-off-by: Armand Ciejak <armand@riedonetworks.com>
Force PHY normal operation in eth_mcux_phy_setup in case strap-in
pins configure the PHY in factory test mode.
Signed-off-by: Armand Ciejak <armand@riedonetworks.com>
This commit adds the "monitor task" to detect and report any changes
in the PHY link status to the operating system.
The monitor task is perodically executed to poll the link status from
the PHY and call `net_eth_carrier_{off,on}` based on the detected
link status change.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The `link_configure` function currently configures the `GMAC_UR`
register and forces the RMII interface.
This is not necessary because the `GMAC_UR` register is already
configured with an appropriate value based on `CONFIG_ETH_SAM_GMAC_MII`
in `gmac_init`.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit adds the PHY link status query function that can be used
for detecting the Ethernet connection.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Add interface name to link up/down information message
to help tracking which port is changing status.
Signed-off-by: Armand Ciejak <armandciejak@users.noreply.github.com>
Copy paste error, base address of second controller was set to the
same as the first one, corrected to ENET2.
Signed-off-by: Armand Ciejak <armandciejak@users.noreply.github.com>
With Ethernet controller base address is not straight forward
to figure out if it is ENET or ENET2l, using name is much better.
Signed-off-by: Armand Ciejak <armandciejak@users.noreply.github.com>
This will allow having a different PHY address for each controller.
It also avoids for the PHY address to be hard-coded in several
functions.
Signed-off-by: Armand Ciejak <armandciejak@users.noreply.github.com>
Add new config allowing to enable the second Ethernet port
on i.MX RT1060 SoC family.
Signed-off-by: Armand Ciejak <armandciejak@users.noreply.github.com>
This reverts commit 8739517107.
Pull Request #23437 was merged by mistake with an invalid manifest.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Replace all occurences of BUILD_ASSERT_MSG() with BUILD_ASSERT()
as a result of merging BUILD_ASSERT() and BUILD_ASSERT_MSG().
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
Add Virtual LAN support to stm32 Ethernet driver. Refactor the
eth_iface_init() and move device configuration settings to
eth_initialize() as the eth_iface_init() is called multiple
times (once / configured VLAN).
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The RX fragment debug print does not work (compile error)
if memory allocation debugging is enabled, so disable it
for time being.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The current design of the network-specific stack dumping APIs
is fundamentally unsafe. You cannot properly dump stack data
without information which is only available in the thread object.
In addition, this infrastructure is unnecessary. There is already
a core shell command which dumps stack information for all
active threads.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Instead of hardcoding the "zeth" network interface name, use the
name defined in Kconfig so that user can change it if needed.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Move auto-negotiate sequence from driver initialization to link up event
Previously when booting without ethernet cable connected the
initialization would fail and never recover.
Now we can connect the ethernet cable any time and multiple times.
This also drastically reduces boot time to main.
Logging Link up and Link down events.
Logging speed and duplex from eth_gecko logger instead of eth_gecko_phy.
Signed-off-by: Luuk Bosma <l.bosma@interay.com>
Do not use the content of the status register to write into the
override register because it may have unpredictable effect,
instead to a read/modify/write on the override register.
Signed-off-by: Armand Ciejak <armandciejak@users.noreply.github.com>
It is necessary to poll the ENET_EIR_MII bit before reading
the data register as explained in the i.MX RT1060 reference
manual in chapter 41.7.17.4.
Use PHY_* functions from NXP HAL to correctly access the PHY
registers.
Signed-off-by: Armand Ciejak <armandciejak@users.noreply.github.com>
Improve priority queue conditional build. Now priority queue code is
enabled only if device have support to it. This enables GMAC driver
for devices with only one queue for RX/TX.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The Atmel SAM SoC with ethernet port uses same GMAC driver. However,
there are differences between SoC GMAC implementation. Some SoCs have
priority queue and system can configure 0 up to 5, depending of SoC
version. This update current GMAC driver adding missing definitions.
Co-authored-by: Stephanos Ioannidis <root@stephanos.io>
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Add missing queue entries for sam gmac. This update the queue selection
to proper handle all supported SAM SoC that uses GMAC driver.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The first revision of the SAM E70 soc had three queues. The current
revision B has six queues. If we don't initialize all queues, the DMA
engine gets stuck when trying to read a descriptor from NULL. To enable
the initialization of the additional queues, the correct soc has to be
selected in the config options, f.ex. CONFIG_SOC_PART_NUMBER_SAME70Q21B
instead of CONFIG_SOC_PART_NUMBER_SAME70Q21.
Also rename GMAC_QUEUE_NO to GMAC_QUEUE_NUM as requested during review.
Signed-off-by: Daniel Glöckner <dg@emlix.com>
SMI initialization is required to enable PHY communication.
PHY setups needs to run after SMI initialization.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Same deal as in commit eddd98f811 ("kconfig: Replace some single-symbol
'if's with 'depends on'"), for the remaining cases outside defconfig
files. See that commit for an explanation.
Will do the defconfigs separately in case there are any complaints
there.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
If the Ethernet driver has VLAN enabled (only native_posix, mcux
or gmac has VLAN supported), then the iface pointer in ethernet
context should contain the main network interface. This is needed
so that the interface will get link address set to it properly.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The build infrastructure should not be adding the drivers subdirectory
to the include path. Fix the legacy uses that depended on that
addition.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Ethernet MAC present in Silicon Labs EFM32GG11B4xx and
EFM32GG11B8xx SoCs.
DMA based driver with support for link up/down detection.
Signed-off-by: Oane Kingma <o.kingma@interay.com>
TCP segment with several EOL TCP options causes echo server to block and
use 100% of CPU. This patch fixes that issue by using k_yield to let
also other threads to run.
Fixes#21949
Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
echo_server app doesn't compile (it uses minimal libc which lacks
unistd.h), let's switch to a more fine-grained include here.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
Do not enable hardware accelerated checksum calculation by
default. It does not work for frdm-k64f and is causing
confusion among users.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Don't sleep 50ms after each received packet, sleep only when there
wasn't anything to receive. Otherwise data could get stuck for a long
time if there was more than 20 packets coming in per second. The
read() call on a TUN/TAP device returns only a single packet per call.
Also remove the call to eth_stats_update_errors_rx() because this else
clause isn't actually a receive error, we're just waiting for more
packets.
Signed-off-by: Jonas Norling <jonas.norling@greeneggs.se>
How prompts work is better documented nowadays, and these comments might
not be that helpful if you don't know.
There are lots promptless symbols that don't have a comment.
Also fix up some comments in arch/Kconfig that seem misplaced/redundant,
and clean up some whitespace (no blank line after a comment makes it
look like it only applies to the symbol directly after it to me).
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Enable ETHERNET_HW_TX_CHKSUM_OFFLOAD, ETHERNET_HW_RX_CHKSUM_OFFLOAD,
ETHERNET_AUTO_NEGOTIATION_SET and the equivalent driver configuration
in eth_mcux driver.
Autonegoitiation was done at driver initialization.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
It is possible that the network interface is not yet initialized
when status of the PHY changes. In this case we must not call
net_eth_carrier_on() as that will cause a crash.
This was noticed with mimxrt1050_evk board.
Fixes: #21257
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Bool symbols implicitly default to 'n'.
A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though.
Also replace some
config
prompt "foo"
bool/int
with the more common shorthand
config
bool/int "foo"
See the 'Style recommendations and shorthands' section in
https://docs.zephyrproject.org/latest/guides/kconfig/index.html.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Set the network interface up / down according to link status.
This means that we call Ethernet carrier on/off function in
proper places.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit refactors kernel and arch headers to establish a boundary
between private and public interface headers.
The refactoring strategy used in this commit is detailed in the issue
This commit introduces the following major changes:
1. Establish a clear boundary between private and public headers by
removing "kernel/include" and "arch/*/include" from the global
include paths. Ideally, only kernel/ and arch/*/ source files should
reference the headers in these directories. If these headers must be
used by a component, these include paths shall be manually added to
the CMakeLists.txt file of the component. This is intended to
discourage applications from including private kernel and arch
headers either knowingly and unknowingly.
- kernel/include/ (PRIVATE)
This directory contains the private headers that provide private
kernel definitions which should not be visible outside the kernel
and arch source code. All public kernel definitions must be added
to an appropriate header located under include/.
- arch/*/include/ (PRIVATE)
This directory contains the private headers that provide private
architecture-specific definitions which should not be visible
outside the arch and kernel source code. All public architecture-
specific definitions must be added to an appropriate header located
under include/arch/*/.
- include/ AND include/sys/ (PUBLIC)
This directory contains the public headers that provide public
kernel definitions which can be referenced by both kernel and
application code.
- include/arch/*/ (PUBLIC)
This directory contains the public headers that provide public
architecture-specific definitions which can be referenced by both
kernel and application code.
2. Split arch_interface.h into "kernel-to-arch interface" and "public
arch interface" divisions.
- kernel/include/kernel_arch_interface.h
* provides private "kernel-to-arch interface" definition.
* includes arch/*/include/kernel_arch_func.h to ensure that the
interface function implementations are always available.
* includes sys/arch_interface.h so that public arch interface
definitions are automatically included when including this file.
- arch/*/include/kernel_arch_func.h
* provides architecture-specific "kernel-to-arch interface"
implementation.
* only the functions that will be used in kernel and arch source
files are defined here.
- include/sys/arch_interface.h
* provides "public arch interface" definition.
* includes include/arch/arch_inlines.h to ensure that the
architecture-specific public inline interface function
implementations are always available.
- include/arch/arch_inlines.h
* includes architecture-specific arch_inlines.h in
include/arch/*/arch_inline.h.
- include/arch/*/arch_inline.h
* provides architecture-specific "public arch interface" inline
function implementation.
* supersedes include/sys/arch_inline.h.
3. Refactor kernel and the existing architecture implementations.
- Remove circular dependency of kernel and arch headers. The
following general rules should be observed:
* Never include any private headers from public headers
* Never include kernel_internal.h in kernel_arch_data.h
* Always include kernel_arch_data.h from kernel_arch_func.h
* Never include kernel.h from kernel_struct.h either directly or
indirectly. Only add the kernel structures that must be referenced
from public arch headers in this file.
- Relocate syscall_handler.h to include/ so it can be used in the
public code. This is necessary because many user-mode public codes
reference the functions defined in this header.
- Relocate kernel_arch_thread.h to include/arch/*/thread.h. This is
necessary to provide architecture-specific thread definition for
'struct k_thread' in kernel.h.
- Remove any private header dependencies from public headers using
the following methods:
* If dependency is not required, simply omit
* If dependency is required,
- Relocate a portion of the required dependencies from the
private header to an appropriate public header OR
- Relocate the required private header to make it public.
This commit supersedes #20047, addresses #19666, and fixes#3056.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Use this short header style in all Kconfig files:
# <description>
# <copyright>
# <license>
...
Also change all <description>s from
# Kconfig[.extension] - Foo-related options
to just
# Foo-related options
It's clear enough that it's about Kconfig.
The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)
git ls-files '*Kconfig*' | \
xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Clean up space errors and use a consistent style throughout the Kconfig
files. This makes reading the Kconfig files more distraction-free, helps
with grepping, and encourages the same style getting copied around
everywhere (meaning another pass hopefully won't be needed).
Go for the most common style:
- Indent properties with a single tab, including for choices.
Properties on choices work exactly the same syntactically as
properties on symbols, so not sure how the no-indentation thing
happened.
- Indent help texts with a tab followed by two spaces
- Put a space between 'config' and the symbol name, not a tab. This
also helps when grepping for definitions.
- Do '# A comment' instead of '#A comment'
I tweaked Kconfiglib a bit to find most of the stuff.
Some help texts were reflowed to 79 columns with 'gq' in Vim as well,
though not all, because I was afraid I'd accidentally mess up
formatting.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Re-run with updated script to convert integer literal delay arguments to
k_sleep to use the standard timeout macros.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The zephyr/subsys/net/l2 include directory has been added through the
'zephyr_library_' API to modify the 'zephyr' library, when the
'zephyr_' API should have been used.
This patch fixes this problem. Using 'zephyr_library_' in this context
works by accident when 'zephyr' is the current library but has no
guarantees of working in the future.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This patch adds support for configuring the MAC address through the
Network Management API to the STM32 Ethernet driver.
Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
When randomly generating MAC addresses they will always be
locally administrated addresses, so the LAA bit should be set.
The LAA bit is the 2nd bit of the 1st byte of the MAC address
not the 2nd bit of the 4th byte.
Fixes: #16452
Signed-off-by: Erwin Rol <erwin@erwinrol.com>
This was only used on the Quark SoCs. It is no longer used, can no
longer be tested, and it's reliant upon the deprecated legacy PCI
subsystem. Remove it to prevent bitrot.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This commit adds support for a 6LoCAN Ethernet border translator.
CAN frames with the translator CAN address are translated and forwarded
to Ethernet. Ethernet frames with the first 34 bits matching the MAC
address of the translator are translated and forwarded to 6LoCAN.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
ETH_LITEETH is defined in drivers/ethernet/Kconfig.liteeth, which is
source'd within a menu that has 'depends on ETH_LITEETH', in
drivers/ethernet/Kconfig.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Liteeth exposes two memory regions:
* set of rx/tx buffers (aka slots) to exchange packets,
* control and status registers.
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
For STM32F7 MCU the actual implementation doesn't work when the
DMA buffers are placed in the SRAM.
This might be a problem with caches.
To overcome this problem, the buffer is moved to the DTCM.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
uint8_array values are now generated as structure initializers. Update
the code accordingly. The implementation assumes that existing
devicetree source does not provide the correct OUI so preserves the
in-driver override of the value provided by devicetree and its setting
for random/unique addresses.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
uint8_array values are now generated as structure initializers. Update
the code accordingly. The implementation assumes that existing
devicetree source does not provide the correct OUI so preserves the
in-driver override of the value provided by devicetree.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
move misc/util.h to sys/util.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move misc/printk.h to sys/printk.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move misc/__assert.h to sys/__assert.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move spi.h to drivers/spi.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move i2c.h to drivers/i2c.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move gpio.h to drivers/gpio.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move clock_control.h to drivers/clock_control.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move sys_io.h to sys/sys_io.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Convert DT_.*_GPIO_{CONTROLLER,PIN,FLAGS} ->
DT_.*_GPIOS_{CONTROLLER,PIN,FLAGS)
Used the following commands to make these conversions:
git grep -l DT_.*_GPIO_CONTROLLER | xargs sed -i 's/DT_\(.*\)_GPIO_CONTROLLER/DT_\1_GPIOS_CONTROLLER/g'
git grep -l DT_.*_GPIO_PIN | xargs sed -i 's/DT_\(.*\)_GPIO_PIN/DT_\1_GPIOS_PIN/g'
git grep -l DT_.*_GPIO_FLAGS | xargs sed -i 's/DT_\(.*\)_GPIO_FLAGS/DT_\1_GPIOS_FLAGS/g'
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Found a few annoying typos and figured I better run script and
fix anything it can find, here are the results...
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Change code from using now deprecated DT_<COMPAT>_<INSTANCE>_<PROP>
defines to using DT_INST_<INSTANCE>_<COMPAT>_<PROP>.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Change code from using now deprecated DT_<COMPAT>_<INSTANCE>_<PROP>
defines to using DT_INST_<INSTANCE>_<COMPAT>_<PROP>.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This is mainly testing purpose from native_posize ethernet
driver. Enable CONFIG_ETH_NATIVE_POSIX_VLAN_TAG_STRIP to have
VLAN tag strip feature on ethernet Rx frames.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Migrate from "legacy" PCI support (drivers/pci) to new PCI(e) support.
The e1000 driver is merely for testing with QEMU and so should not be
a model for the use of PCI(e) functions. Consult instead "real-world"
PCI(e) drivers like the NS16550 UART (drivers/serial/uart_ns16550.c).
Signed-off-by: Charles Youse <charles.youse@intel.com>
As part of the ll_reserve refactoring effort, the packet length now
includes header size as well. Before the refactor, when the packet
length was written to the device, it did not include the header size,
which is the required value as per the LM3S6965 datasheet. After the
refactor the packet length includes the header size as well. The
header size has to subtracted from the packet length before writing to
the device. Fixes#13943.
Signed-off-by: Vijay Kumar B <vijaykumar@zilogic.com>
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier. Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.
By default all files without license information are under the default
license of Zephyr, which is Apache version 2.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Rename reserved function names in drivers/ subdirectory. Update
function macros concatenatenating function names with '##'. As
there is a conflict between the existing gpio_sch_manage_callback()
and _gpio_sch_manage_callback() names, leave the latter unmodified.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
When building with -fno-inline, the compiler complains about
undefined reference to this function. This happens when
building for code coverage. Since this function is only called
within the file, mark it static also.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
In the conversion of net_pkt_read_new to net_pkt_read, we missed
changing the function in the eth_smsc911x and eswifi_offload.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Some places were still using the old allocator. Using the new one does
not change any behavior. This will help to remove the useless data_len
attribute in net_pkt which legacy allocator was still setting.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Remove magic numbers from Ethernet drivers and tests by defining
NET_ETH_MAX_DATAGRAM_SIZE and NET_ETH_MAX_FRAME_SIZE.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>