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

driver: ssp: Refactor SSP driver to use SSP_IP_VER for version checks #78470

Conversation

dnikodem
Copy link
Collaborator

This commit updates the SSP driver to use the newly defined SSP_IP_VER macros for IP version checks instead of relying on CONFIG_SOC_* macros. The change ensures better readability and maintainability by centralizing the IP version definitions and comparisons.

@dnikodem dnikodem force-pushed the update_macro_definition_for_ssp_driver branch 2 times, most recently from 24c0646 to 3253bd3 Compare October 8, 2024 10:28
@dnikodem dnikodem marked this pull request as ready for review October 8, 2024 11:29
#define SSP_IP_VER SSP_IP_VER_2_0
#elif defined(CONFIG_SOC_INTEL_ACE30)
#define SSP_IP_VER SSP_IP_VER_3_0
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

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

just suggestion:

#else 
#error ...unknown HW...
#endif 

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, this is a good idea - I will change it. Thanks

@dnikodem dnikodem force-pushed the update_macro_definition_for_ssp_driver branch 2 times, most recently from 617598f to 5423804 Compare October 15, 2024 08:13
@dnikodem dnikodem force-pushed the update_macro_definition_for_ssp_driver branch from 5423804 to 760973b Compare October 17, 2024 09:32
@dnikodem dnikodem force-pushed the update_macro_definition_for_ssp_driver branch from 760973b to fbe9fe6 Compare October 29, 2024 11:38
tmleman
tmleman previously approved these changes Oct 29, 2024
LaurentiuM1234
LaurentiuM1234 previously approved these changes Nov 1, 2024
@dkalowsk dkalowsk added this to the v4.1.0 milestone Nov 1, 2024
Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

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

Thanks @dnikodem , look good . One minor inline for one more place to convert, please check.

@@ -1980,12 +1985,12 @@ static int dai_ssp_parse_tlv(struct dai_intel_ssp *dp, const uint8_t *aux_ptr, s
case SSP_LINK_CLK_SOURCE:
#ifdef CONFIG_SOC_SERIES_INTEL_ADSP_ACE
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be changed as well? #ifdef SSP_IP_VER >= SSP_IP_VER_1_5

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, good catch, thanks :)

This commit updates the SSP driver to use the newly defined
SSP_IP_VER macros for IP version checks instead of relying
on CONFIG_SOC_* macros. The change ensures better readability
and maintainability by centralizing the IP version definitions
and comparisons.

Signed-off-by: Damian Nikodem <[email protected]>
@dnikodem dnikodem dismissed stale reviews from LaurentiuM1234 and tmleman via e796e59 November 4, 2024 09:39
@dnikodem dnikodem force-pushed the update_macro_definition_for_ssp_driver branch from fbe9fe6 to e796e59 Compare November 4, 2024 09:39
@nashif nashif merged commit f556a76 into zephyrproject-rtos:main Nov 16, 2024
23 checks passed
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.

9 participants