-
Notifications
You must be signed in to change notification settings - Fork 7.7k
[RFC] API change: Device - Const-ify device driver instances. #24873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
carlescufi
merged 43 commits into
zephyrproject-rtos:master
from
tbursztyka:device_constify
Sep 2, 2020
Merged
[RFC] API change: Device - Const-ify device driver instances. #24873
carlescufi
merged 43 commits into
zephyrproject-rtos:master
from
tbursztyka:device_constify
Sep 2, 2020
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
dfb1b36
to
ec019c0
Compare
367da0b
to
4eaf4fc
Compare
13 tasks
4eaf4fc
to
316553b
Compare
316553b
to
d2de78a
Compare
d2de78a
to
823ac4a
Compare
tejlmand
added a commit
to tejlmand/nrfxlib
that referenced
this pull request
Oct 1, 2020
- nrf_security: update mbedtls heap to const struct device Zephyr upmerge introduces device bindings const struct as part of: zephyrproject-rtos/zephyr#24873 This const'ify mbedtls_heap.c init function. - mpls: Added `select MULTITHREADING_LOCK` to Kconfig With the changes related to: nrfconnect/sdk-nrf#2861 zephyrproject-rtos/zephyr#27398 The mpsl clock control is no longer needed, but mpsl still requires MULTITHREADING_LOCK, and is therefore moved to its right location. Signed-off-by: Torsten Rasmussen <[email protected]>
tejlmand
added a commit
to tejlmand/nrfxlib
that referenced
this pull request
Oct 2, 2020
- nrf_security: update mbedtls heap to const struct device Zephyr upmerge introduces device bindings const struct as part of: zephyrproject-rtos/zephyr#24873 This const'ify mbedtls_heap.c init function. - mpls: Added `select MULTITHREADING_LOCK` to Kconfig With the changes related to: nrfconnect/sdk-nrf#2861 zephyrproject-rtos/zephyr#27398 The mpsl clock control is no longer needed, but mpsl still requires MULTITHREADING_LOCK, and is therefore moved to its right location. - softdevice_controller: Mark 2M and Coded PHY as supported These helper configs were introduced in upstream zephyr. Signed-off-by: Torsten Rasmussen <[email protected]> Signed-off-by: Rubin Gerritsen <[email protected]>
tejlmand
added a commit
to tejlmand/fw-nrfconnect-nrf
that referenced
this pull request
Oct 2, 2020
sdk-zephyr: pull/354/head sdk-mcuboot: pull/120/head sdk-mcumgr: pull/10/head sdk-nrfxlib: pull/266/head Summary of changes needed for this upmerge: - modules: device: Const-ify all device driver instance pointers. See also ttps://github.com/zephyrproject-rtos/zephyr/pull/24873 - jenkins: remove --board-root zephyr/boards zephyr/boards are always part of sanity-check and with duplicate board checking with: zephyrproject-rtos/zephyr#27549 this now results in CI failures. - samples: whitelist -> allow sanitycheck: inclusive language change whitelist -> allow for all sample.yaml and testcase.yaml files - scripts: ncs_commands: add hal_quicklogic to _BLOCKED_PROJECTS This is a vendor HAL for an SoC family not supported in NCS. - doc: upmerge changes to docs Adjusted `CONFIG_BT_GATT_DIS` -> `CONFIG_BT_DIS` in docs. - samples: remove GATT infix in conf files for applications and samples - usb: hid: All hid_ops callbacks get device pointer. Updated usb_state.c to new hid_ops callbacks which includes the device pointer. - cmake: bintools elfconvert Updated according to new toolchain abstraction. - partition_manager: cmake: update regex for runner hex file The format of the runner yaml has changed. Update the regex used to replace the hex_file variable to match it. Signed-off-by: Håkon Øye Amundsen <[email protected]> Signed-off-by: Torsten Rasmussen <[email protected]>
tejlmand
added a commit
to tejlmand/nrfxlib
that referenced
this pull request
Oct 6, 2020
- nrf_security: update mbedtls heap to const struct device Zephyr upmerge introduces device bindings const struct as part of: zephyrproject-rtos/zephyr#24873 This const'ify mbedtls_heap.c init function. - mpls: Added `select MULTITHREADING_LOCK` to Kconfig With the changes related to: nrfconnect/sdk-nrf#2861 zephyrproject-rtos/zephyr#27398 The mpsl clock control is no longer needed, but mpsl still requires MULTITHREADING_LOCK, and is therefore moved to its right location. - softdevice_controller: Mark 2M and Coded PHY as supported These helper configs were introduced in upstream zephyr. Signed-off-by: Torsten Rasmussen <[email protected]> Signed-off-by: Rubin Gerritsen <[email protected]>
mbolivar-nordic
pushed a commit
to nrfconnect/sdk-nrfxlib
that referenced
this pull request
Oct 6, 2020
- nrf_security: update mbedtls heap to const struct device Zephyr upmerge introduces device bindings const struct as part of: zephyrproject-rtos/zephyr#24873 This const'ify mbedtls_heap.c init function. - mpls: Added `select MULTITHREADING_LOCK` to Kconfig With the changes related to: nrfconnect/sdk-nrf#2861 zephyrproject-rtos/zephyr#27398 The mpsl clock control is no longer needed, but mpsl still requires MULTITHREADING_LOCK, and is therefore moved to its right location. - softdevice_controller: Mark 2M and Coded PHY as supported These helper configs were introduced in upstream zephyr. Signed-off-by: Torsten Rasmussen <[email protected]> Signed-off-by: Rubin Gerritsen <[email protected]>
utzig
pushed a commit
to tejlmand/fw-nrfconnect-nrf
that referenced
this pull request
Oct 6, 2020
sdk-zephyr: a4ead98051404e3b63845d9944b0c689162f1db1 (PR nrfconnect#354) sdk-mcuboot: ec441e0a700280673e11f4e242ff5de696d4f962 (PR nrfconnect#120) sdk-mcumgr: b3716c64bde95ea5911a36001fd8f8d4b46eb310 (PR nrfconnect#10) sdk-nrfxlib: f1dd2ee (PR nrfconnect#266) Summary of changes needed for this upmerge: - modules: device: Const-ify all device driver instance pointers. See also zephyrproject-rtos/zephyr#24873 - jenkins: remove --board-root zephyr/boards zephyr/boards are always part of sanity-check and with duplicate board checking with: zephyrproject-rtos/zephyr#27549 this now results in CI failures. - samples: whitelist -> allow sanitycheck: inclusive language. change whitelist -> allow for all sample.yaml and testcase.yaml files. - scripts: ncs_commands: add hal_quicklogic to _BLOCKED_PROJECTS This is a vendor HAL for an SoC family not supported in NCS. - doc: upmerge changes to docs Adjusted `CONFIG_BT_GATT_DIS` -> `CONFIG_BT_DIS` in docs. - samples: remove GATT infix in conf files for applications and samples - usb: hid: All hid_ops callbacks get device pointer. Updated usb_state.c to new hid_ops callbacks which includes the device pointer. - cmake: bintools elfconvert Updated according to new toolchain abstraction. - partition_manager: cmake: update regex for runner hex file The format of the runner yaml has changed. Update the regex used to replace the hex_file variable to match it. - spm: align with updated API for setting irq state The API for setting IRQ state has changed. Update to align with the new functionailty. Ref: NCSDK-6463 - nrf_desktop: using CONFIG_SYSTEM_CLOCK_WAIT_FOR_STABILITY=y Updated nrf_desktop applications to use upstream SYSTEM_CLOCK_WAIT_FOR_STABILITY instead of CLOCK_CONTROL_NRF_K32SRC_BLOCKING. - dts/Kconfig: Remove HAS_DTS_I2C HAS_DTS_I2C is now selected by I2C and always used as I2C && HAS_DTS_I2C. It could then be purely removed. - drivers: mpsl: clock_control: Provide nrfx_clock shim Replace clock_control_mpsl with nrfx_clock implementation which is using mpsl_clock API. This way standard clock_control driver is used and only thin, straightforward nrfx_clock API is replaced with implementation which is utilizing mpsl_clock API. - mpsl: removing clock control in mpsl - applications: nrf_desktop: Disable mem protection in mcuboot Disable HW stack protection in MCUBoot. This seems to cause problems as region protection migrates to application and can cause faults during kernel initialization. Signed-off-by: Håkon Øye Amundsen <[email protected]> Signed-off-by: Torsten Rasmussen <[email protected]> Signed-off-by: Pawel Dunaj <[email protected]> Signed-off-by: Krzysztof Chruscinski <[email protected]>
mbolivar-nordic
pushed a commit
to nrfconnect/sdk-nrf
that referenced
this pull request
Oct 6, 2020
sdk-zephyr: a4ead98051404e3b63845d9944b0c689162f1db1 (PR #354) sdk-mcuboot: ec441e0a700280673e11f4e242ff5de696d4f962 (PR #120) sdk-mcumgr: b3716c64bde95ea5911a36001fd8f8d4b46eb310 (PR #10) sdk-nrfxlib: f1dd2ee (PR #266) Summary of changes needed for this upmerge: - modules: device: Const-ify all device driver instance pointers. See also zephyrproject-rtos/zephyr#24873 - jenkins: remove --board-root zephyr/boards zephyr/boards are always part of sanity-check and with duplicate board checking with: zephyrproject-rtos/zephyr#27549 this now results in CI failures. - samples: whitelist -> allow sanitycheck: inclusive language. change whitelist -> allow for all sample.yaml and testcase.yaml files. - scripts: ncs_commands: add hal_quicklogic to _BLOCKED_PROJECTS This is a vendor HAL for an SoC family not supported in NCS. - doc: upmerge changes to docs Adjusted `CONFIG_BT_GATT_DIS` -> `CONFIG_BT_DIS` in docs. - samples: remove GATT infix in conf files for applications and samples - usb: hid: All hid_ops callbacks get device pointer. Updated usb_state.c to new hid_ops callbacks which includes the device pointer. - cmake: bintools elfconvert Updated according to new toolchain abstraction. - partition_manager: cmake: update regex for runner hex file The format of the runner yaml has changed. Update the regex used to replace the hex_file variable to match it. - spm: align with updated API for setting irq state The API for setting IRQ state has changed. Update to align with the new functionailty. Ref: NCSDK-6463 - nrf_desktop: using CONFIG_SYSTEM_CLOCK_WAIT_FOR_STABILITY=y Updated nrf_desktop applications to use upstream SYSTEM_CLOCK_WAIT_FOR_STABILITY instead of CLOCK_CONTROL_NRF_K32SRC_BLOCKING. - dts/Kconfig: Remove HAS_DTS_I2C HAS_DTS_I2C is now selected by I2C and always used as I2C && HAS_DTS_I2C. It could then be purely removed. - drivers: mpsl: clock_control: Provide nrfx_clock shim Replace clock_control_mpsl with nrfx_clock implementation which is using mpsl_clock API. This way standard clock_control driver is used and only thin, straightforward nrfx_clock API is replaced with implementation which is utilizing mpsl_clock API. - mpsl: removing clock control in mpsl - applications: nrf_desktop: Disable mem protection in mcuboot Disable HW stack protection in MCUBoot. This seems to cause problems as region protection migrates to application and can cause faults during kernel initialization. Signed-off-by: Håkon Øye Amundsen <[email protected]> Signed-off-by: Torsten Rasmussen <[email protected]> Signed-off-by: Pawel Dunaj <[email protected]> Signed-off-by: Krzysztof Chruscinski <[email protected]>
Closed
mbolivar-nordic
added a commit
to mbolivar-nordic/zephyr
that referenced
this pull request
Jun 7, 2021
Pull request zephyrproject-rtos#24873 marked all the struct devices const. However, the linker scripts were never updated to actually allocate the struct devices in ROM. They're still in RAM, so the main benefit of this work has not been realized. Fix it. Signed-off-by: Martí Bolívar <[email protected]>
carlescufi
pushed a commit
that referenced
this pull request
Jun 9, 2021
Pull request #24873 marked all the struct devices const. However, the linker scripts were never updated to actually allocate the struct devices in ROM. They're still in RAM, so the main benefit of this work has not been realized. Fix it. Signed-off-by: Martí Bolívar <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: ARC
ARC Architecture
area: ARM
ARM (32-bit) Architecture
area: Boards
area: native port
Host native arch port (native_sim)
area: NIOS2
NIOS2 Architecture
area: X86
x86 Architecture (32-bit)
area: Xtensa
Xtensa Architecture
Breaking API Change
Breaking changes to stable, public APIs
platform: STM32
ST Micro STM32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a fix for #27399
(Part of #22941, take a look if unaware of the device driver model rework)
Making all device instances constant.
Note: ALL checkpatch warnings are due to original code and not from this PR, so nevermind.