Commit graph

15 commits

Author SHA1 Message Date
Aurelien Jarno 185edca797 drivers: hwinfo: stm32: Add support for reading EUI64 on STM32W*
The STM32WB, STM32WB and STM32WBA families devices include a EUI64 ID
(called "IEEE 64-bit unique device ID register" in the reference manual
that is distinct from the standard device ID. Add support for reading
it, noting that it is stored in little endian format in the registers.

On other families the weak implementation takes over and returns
-ENOSYS.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-04-30 19:29:10 -05:00
Marc Desvaux 3392eb6af3 drivers: hwinfo: modification into hwinfo_get_reset_cause()
add retrieve flag SB into hwinfo_get_reset_cause()
add Clear flag SB into clear_reset_cause()

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-04-17 10:15:35 +02:00
Kenneth J. Miller 41db73dc80 Revert "drivers: hwinfo: modification into hwinfo_get_reset_cause()"
This reverts commit b523e33c48.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-03-31 09:18:54 +02:00
Marc Desvaux b523e33c48 drivers: hwinfo: modification into hwinfo_get_reset_cause()
add retrieve flag SB into hwinfo_get_reset_cause()
add Clear flag SB into clear_reset_cause()

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-03-30 09:50:55 +02:00
Francois Ramu 8d5ff8cb68 drivers: hwinfo stm32h5 device must disable icache to access UID_BASE
Reading the UID_BASE_ADDRESS requires disabling the icache
of the stm32h5x mcu.
Else a bus fault error occurs reading Address: 0x8fff800-0x8fff808
Enable afterwards.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-03-29 10:04:39 +02:00
Erwan Gouriou 50473ec0a9 drivers: hwinfo: stm32: Deal with iwdgX and wwdgX instances
On some STM32 series (H7, MP1), iwdg and wwdg have multiple instances.
Due to current driver implementation, these wdg instances were not
checked in the function.

Fixes #53002

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-12-19 09:22:28 +00:00
Gerard Marull-Paretas fb60aab245 drivers: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all drivers to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 19:58:21 +02:00
Arvin Farahmand 98a0ccd5c5 drivers: hwinfo: Add reset cause support
Add `hwinfo_get_reset_cause` and `hwinfo_clear_reset_cause` to retrieve
and to clear cause of system reset on supported platforms.

Different platforms can provide different causes of reset, however
there is a great deal of overlap. `enum reset_cause` can be expanded in
the future to support additional reasons, as additional platforms are
supported.

Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
2021-06-08 10:16:17 +02:00
Martin Jäger 39d388287f drivers: hwinfo: stm32: use generic LL headers
Use generic LL headers instead of depending on soc.h.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-11-30 15:50:03 +01:00
Kumar Gala a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Peter Bigot 8c749ffc0a drivers: hwinfo: update stm32 implementation byte order
The unique identifier for this platform is a 96-bit value, where the
upper 56 bits provide an ASCII encoding of the lot number, and the
lower 40 bits provide the wafer number and X, Y position on the wafer.
Extract the value into big-endian form for device-independent
interpretation.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-20 19:04:26 +02:00
Anas Nashif f901e26de9 cleanup: include/: move hwinfo.h to drivers/hwinfo.h
move hwinfo.h to drivers/hwinfo.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>
2019-06-27 22:55:49 -04:00
Patrik Flykt 4344e27c26 all: Update reserved function names
Update reserved function names starting with one underscore, replacing
them as follows:
   '_k_' with 'z_'
   '_K_' with 'Z_'
   '_handler_' with 'z_handl_'
   '_Cstart' with 'z_cstart'
   '_Swap' with 'z_swap'

This renaming is done on both global and those static function names
in kernel/include and include/. Other static function names in kernel/
are renamed by removing the leading underscore. Other function names
not starting with any prefix listed above are renamed starting with
a 'z_' or 'Z_' prefix.

Function names starting with two or three leading underscores are not
automatcally renamed since these names will collide with the variants
with two or three leading underscores.

Various generator scripts have also been updated as well as perf,
linker and usb files. These are
   drivers/serial/uart_handlers.c
   include/linker/kobject-text.ld
   kernel/include/syscall_handler.h
   scripts/gen_kobject_list.py
   scripts/gen_syscall_header.py

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-03-11 13:48:42 -04:00
Alexander Wachter 1ed18b8988 drivers: hwinfo: change stm32 device id driver from HAL to LL
Use LL drivers instead of HAL driver because LL driver is available
for all soc while HAL driver is not.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-03-09 16:05:20 -05:00
Alexander Wachter 8f3e6ab5d2 drivers: hwinfo: add driver support for STM32 device ID
Add driver support for STM32 ID device.
This device has an ID of 12 bytes.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-02-03 12:07:20 -05:00