Skip to content
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

drivers/clock_control: stm32u5: Wrong bus check in _get_rate() #45822

Merged

Conversation

erwango
Copy link
Member

@erwango erwango commented May 20, 2022

Checking that provided pclken->bus fits bus range in
clock_control_get_rate() is wrong as it could actually be a source
clock and hence not belong to this range.
Also, this kind of check is just not needed since this function should
not be used before call to clock_control_on() or clock_control_configure()
which do the required verification.

Fixes #45821

Signed-off-by: Erwan Gouriou [email protected]

@erwango erwango requested review from ABOSTM and FRASTM as code owners May 20, 2022 08:12
@erwango erwango added this to the v3.1.0 milestone May 20, 2022
@github-actions github-actions bot added the platform: STM32 ST Micro STM32 label May 20, 2022
@erwango erwango force-pushed the fix_u5_clock_device_test branch from 7bffe4a to 3b3e006 Compare May 20, 2022 09:40
Copy link
Collaborator

@FRASTM FRASTM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this for stm32u5 only ?

@erwango
Copy link
Member Author

erwango commented May 20, 2022

why this for stm32u5 only ?

Already done on other driver variants.

Checking that provided pclken->bus fits bus range in
clock_control_get_rate() is wrong as it could actually be a source
clock and hence not belong to this range.
Also, this kind of check is just not needed since this function should
not be used before call to clock_control_on() or clock_control_configure()
which do the required verification.

Signed-off-by: Erwan Gouriou <[email protected]>
@erwango erwango force-pushed the fix_u5_clock_device_test branch from 3b3e006 to d2bc33a Compare May 20, 2022 12:10
@mbolivar-nordic mbolivar-nordic merged commit af483c3 into zephyrproject-rtos:main May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

STM32U5: clock_control: Issue to get rate of alt clock source
6 participants