Skip to content

platform: cavs: remove hw init in platform_init() on sof side - #7896

Merged
lgirdwood merged 3 commits into
thesofproject:mainfrom
RanderWang:remove_hw_setting_in_sof
Jul 13, 2023
Merged

lgirdwood merged 3 commits into
thesofproject:mainfrom
RanderWang:remove_hw_setting_in_sof

Conversation

@RanderWang

Copy link
Copy Markdown
Collaborator

It is for [FEATURE][Zephyr] Move all hw init code from platform_init() to Zephyr #5602

Tested on TGL RVP & UPX

@RanderWang RanderWang changed the title platform: cavs: remove hw init in platform_init() in sof side platform: cavs: remove hw init in platform_init() on sof side Jul 6, 2023

@lgirdwood lgirdwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lets delete the IP programming code after first checking its in Zephyr for each target.

Comment thread src/platform/intel/cavs/platform.c Outdated
Comment thread src/platform/intel/cavs/platform.c Outdated
These registers are set in power_init() in zephyr layer, so
remove redundant setting and remove hw setting in SOF layer.

Signed-off-by: Rander Wang <rander.wang@intel.com>
These hw clk settings are done in zephyr layer in power_init(),
so remove them in sof side.

The CONFIG_CAVS_LPRO_ONLY is for CoffeeLake only and doesn't affect
TigerLake, so the hw clk settings are the same for platform_init
and power_init(), then we can remove them.

Signed-off-by: Rander Wang <rander.wang@intel.com>
@RanderWang
RanderWang force-pushed the remove_hw_setting_in_sof branch from 81424f9 to 3acdf10 Compare July 7, 2023 02:31
@btian1

btian1 commented Jul 7, 2023

Copy link
Copy Markdown
Contributor

redundant code remove are always welcome, repeated operation may cause un-expected situation for DSP.

@RanderWang

Copy link
Copy Markdown
Collaborator Author

@lgirdwood removed HW setting, thanks!

Comment thread src/platform/intel/cavs/platform.c
@RanderWang
RanderWang force-pushed the remove_hw_setting_in_sof branch from 286e5b3 to 61e1fb1 Compare July 10, 2023 06:46
Comment thread src/platform/tigerlake/include/platform/lib/clk.h Outdated
CONFIG_CAVS_LPRO_ONLY is only for CoffeeLake and is not fit for current IPC4
main branch, so remove it to make code clean.

Signed-off-by: Rander Wang <rander.wang@intel.com>
@RanderWang
RanderWang force-pushed the remove_hw_setting_in_sof branch from 61e1fb1 to 87290fe Compare July 11, 2023 02:20
#if CONFIG_CAVS_LPRO_ONLY
#define CAVS_DEFAULT_RO SHIM_CLKCTL_RLROSCC
#define CAVS_DEFAULT_RO_FOR_MEM SHIM_CLKCTL_OCS_LP_RING
#else

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

So this commit was wrong? It seems to suggest that LPRO was also available for cAVS 2.0 034c54a

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I deleted CONFIG_CAVS_LPRO_ONLY which is for debugging only at the moment, choose n if unclear

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

yeah, that was just a renaming in 59c3315 so from those commits it looks like this was a debug option also available for TGL. It's ok if we remove it because we don't need or don't want it any more, but at least I don't see that it was only available for CFL

@RanderWang RanderWang Jul 13, 2023 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@lyakh I did involved in this feature and you may recall it. In 2019, we found a HW hang on HDA platform only on CFL and debugged it for almost a month, finally confirmed by HW team that we need to use LPO for HW restraint. But we don't need it for CML and successor HW platform.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ok, good, maybe it would just be a bit clearer if we said something like "remove this debug option because we don't need it any more" in the commit message - just by looking at the patch nothing in it explains why it's only relevant up to CFL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants