__bswap_ in zephyr/sys/byteorder.h conflicts with __bswap_ in host's
byteswap.h. byteswap.h from host compiler used in posix_native_64 boards
causes a compilation issue.
This commit renames __bswap_ to BSWAP_ to prevent collision.
Before this commit a compilation error can be created by adding #include
<byteswap.h> to samples/net/sockets/echo/src/socket_echo.c
This does not change external API to byteorder.h, but does change
internal implementation which some other source files depend on.
Replaced manual byteswap operations in devmem_service.c with APIs from
byteorder.h which automatically converts to CPU endianess when necessary.
Fixes#44324
Signed-off-by: Jonathan Hamberg <jonathanhamberg@gmail.com>
rand32.h does not make much sense, since the random subsystem
provides more APIs than just getting a random 32 bits value.
Rename it to random.h and get consistently with other
subsystems.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
There's no need to use APPLICATION level. In case of the IPM console
test, priorities have been adjusted to make sure sender/receiver are
initialized in the correct order.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Remove unneeded board configurations since those now selected with
selecting PCH SMBUS driver.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Using depends_on instead of platform_allow helps to add new boards and
makes test description more clean.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script. Some artifacts
on string length are due to how ruamel dumps content.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Remove "-machine Q35" from QEMU_EXTRA_FLAGS since this is now the
default qemu_x86_64 configuration.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Move smbus_utils.h header from generic includes to the driver's area
in order to have in include/zephyr/drivers only smbus.h header.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add tests with some configuration option disabled:
CONFIG_SMBUS_INTEL_PCH_HOST_NOTIFY and
CONFIG_SMBUS_INTEL_PCH_SMBALERT.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The callbacks API was similar to gpio / espi callbacks API. Refactor
it to use more intuitive names for set / remove callbacks.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add SMBus unit tests which emulate SMBus controller and connected test
peripheral device. This allows to test also rare SMBus protocols like
Process Call and Block Process Call.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add test testing Intel PCH SMBus driver using Qemu x86_64 with
machine q35 SMBus controller emulation and default "eeprom"-like
peripheral.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>