Use SHELL_HELP macro for help strings to ensure consistency across
various shell modules and to save on flash usage.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Remove parts of the legacy implementation in eth_stm32_hal_common.c for
the loading of the MAC address when the device-tree is used. Use
net_eth_mac_load() for all these cases that were not destined for
production-ready products.
When cfg->mac_cfg.type == NET_ETH_MAC_DEFAULT, it means that neither
"zephyr,random-mac-address", "local-mac-address" or "nvmem-cells" were
used. For this case, keep the legacy property-less implementation to
avoid compilation errors and have a default, backward-compatible case.
Warning: this commit causes backward compatibility breakage for
implementations using "zephyr,random-mac-address" or "local-mac-address"
properties.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Adds support for using MCUmgr over UART (not via shell) in a raw
mode which does not include base64 and other SMP over console
encoding
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Use SHELL_HELP macro for help strings to ensure consistency across
various shell modules and to save on code size.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use SHELL_HELP macro for help strings to ensure consistency across
various shell modules and to save on code size.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Correct the behavior when printing interger menu values.
Current loop is not correct since it is waiting for a 0 value
to stop while for integer menu any value is possible.
Modify in order to loop until reaching the maximum number of
entries listed at the ctrl init time.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
"integer menu" ctrl type is longer than the 8 bytes long
typebuf hence rename the type into "int menu" and increase
the typebuf buffer in addition to increase alignment during
print of the ctrl values.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
curr_state is known to be false when reaching the STARTING state
check, making the explicit '!curr_state' condition redundant.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Add a kconfig to be used as a flag for indicating if it supports 64b
ticks and another flag which will enable the 64b api. The kconfig
indicating that it supports 64b is a dependency of the kconfig that
will enable the api.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Some counters, such as those that use fractional adders, tick at
resolutions greater than 4294967295Hz. This changes the freq in the common
info to a uint64_t. This adds a KConfig that can be selected by a driver.
This also has the counter ticks to sec (and vice versa) helper functions
call the get frequency for 64 bits if the kconfig is selected.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
__parse_ipv4_address() never reports errors and always returns 0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
The return value variable was initialized but always overwritten
before being evaluated.
Remove the redundant initialization to simplify the code.
No functional change.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
There are currently two other sdhc drivers that support this interrupt:
Infineon and Ambiq. Both those vendor HALs automatically mask the
interrupt after invoking the callback[1][2], expecting the user to
unmask it asynchronously once they've cleared the card's interrupt
condition.
The NXP usdhc driver doesn't do this and so is inconsistent with the
other two. This has caused bugs with higher-level drivers, such as the
AIROC Wi-Fi driver (#101100). Fix the issue by masking the interrupt
ourselves.
[1] 470f874ce4/mtb-hal-cat1/source/cyhal_sdhc.c (L1251-L1260)
[2] 5efc022852/mcu/apollo510/hal/mcu/am_hal_sdhc.c (L2256)Fixes#101100
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Moves clock selection/assignment from the clock driver to the
peripherals that subscribe to the clock. This allows multiple
devices such as PWM/Counters to share a peripheral clock.
Signed-off-by: John Batch <john.batch@infineon.com>
Adds making a peripheral clock connection to the initialization for
SDHC. Other updates to use the clk_dst field from the binding.
Signed-off-by: John Batch <john.batch@infineon.com>
Updates the Infineon Counter and PWM drivers based on the TCPWM device
to connect with a clock. This update allows multiple devices to connect
to the same peripheral clock, and supports the TCPWM architecture of the
PSC3 device family.
Corrects initialization of the PWM on the PSC3 family to select the
correct output type.
Signed-off-by: John Batch <john.batch@infineon.com>
Adds making a peripheral clock connection to the initialiazation for SCB
based drivers. These drivers are the UART/Serial driver, I2C driver, and
SPI driver.
Signed-off-by: John Batch <john.batch@infineon.com>
Add the `DEVICE_API` wrapper to the remaining `uart_driver_api` instances,
ensuring that each driver API is placed in its respective linker section.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
as we are only handeling rx interupts, we don't need
to call uart_irq_is_pending to check, we can just directly
use uart_irq_rx_ready.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
While in PRE_KERNEL stage, scmi_send_message_polling() attempts to acquire
the transmit channel mutex, which should not be allowed as the kernel is
not fully initialized at this point.
Since there's no multithreading at this point, there's no need to use a
mutex anyways. Therefore, perform mutex acquire()/release() only if not
in PRE_KERNEL phase.
Note that the return value of k_mutex_lock() is already suppressed via
an -EBUSY return value so no behavioral change here.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
In current implementation, the sending buffer size is 0x10000. This
will result in a very small amount of RAM available for the
application. Actually, the maximum required sending buffer size is
4KB.
Reduce the maximum sending buffer size by changing
`SEND_BUFFER_MAX_LENGTH` from 64KB to 4KB.
And add runtime assertions to prevent buffer overflows during firmware
upload.
- Change SEND_BUFFER_MAX_LENGTH from 0xFFFF to 4096 (4 KB)
* Reflects the actual maximum FW chunk size supported by hardware
* Reduces memory footprint from 64 KB to 4 KB
- Remove unnecessary +1 from send_buffer array size
- Add __ASSERT checks in fw_upload_v1_send_data() to validate
memcpy does not exceed buffer size
- Add __ASSERT checks in fw_upload_v3_send_data() to validate
memcpy does not exceed buffer size
This prevents potential buffer overflows when copying firmware data
and ensures the buffer size matches hardware capabilities.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
This commit adds support for the Xilinx AXI Ethernet Lite device,
also known as the emaclite.
The emaclite is a light-weight 10/100 MII Ethernet device.
It foregoes a DMA to reduce chip area.
Instead, it uses memory-mapped transmit/receive buffers.
A selection of features can optionally be enabled:
- a second ("pong") RX/TX Buffer
- MDIO support
- Interrupt support
This driver handles the MAC functionality of the core;
a driver for the MDIO part is introduced separately
as an MDIO driver.
Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
This commit adds support for the Xilinx AXI Ethernet Lite device,
also known as the emaclite.
The emaclite is a light-weight 10/100 MII Ethernet device.
It can optionally be configured to include an MDIO.
The MMIO interface is controlled via MMIO registers and requires
the software to busy-wait until completion.
Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
dai_ssp_set_clock_control_ver_1() never reports errors and always
returns 0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
RSI_ADC_PowerControl() enables the clock AND power on the ADC hardware
block.
The clock control should only access to the clock hardware block.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
RSI_ADC_ClkDivfactor() is called from system clock_control. But in fact, it
controls the internal division factor of the ADC hardware block.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
ADC_CONTEXT_USES_KERNEL_TIMER is required for ADC_CONTEXT_INIT_TIMER().
However, it should be defined in the Zephry driver, not in the Wiseconnect
integration.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Add IMSIC driver implementation with atomic mtopei claim using csr_swap
and EIE configuration for interrupt enable/disable.
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
Add the `DEVICE_API` wrapper to the remaining `gpio_driver_api` instances,
ensuring that each driver API is placed in its respective linker section.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Add the `DEVICE_API` wrapper to the remaining `flash_driver_api`
instances, ensuring that each driver API is placed in its respective
linker section.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Update kernel level and priority(same with scmi clock control)
On i.MX95, there is an irqsteer instance in display mix.
when the irqsteer is enabled, must power on display mix before
accessing registers of the irqsteer(call irqsteer_hw_init).
the irqsteer drivers's kernel level is PRE_KERNEL_1 and it's
priority is 40. So update kernel level to PRE_KERNEL_1 and update
priority to 30 to ensure that the arm scmi power domain driver
is initialized before initializing irqsteer driver.
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Verify that requested data can fit into the transmit buffer on send to
avoid out-of-bound memory writes.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>