Skip to content

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

Closed

Description

@kv2019i

Is your feature request related to a problem? Please describe.
Much of the HW init code is already ignored in Zephyr builds in the Zephyr main() -> sof_main() -> primary_core_init() -> platform_init() code path, but not all. This work should be completed.

Examples like platform_init_hw() must be moved to Zephyr side and not the SOF definition should not be used when building for Zephyr.

This has created multiple problems for unit tests on Zephyr side (like for cAVS SSP driver, FYI @juimonen ).

Update 2023: this doesn't really affect "pure Zephyr" platforms unless we remove platform.h completely, but that's beyond scope of this item. So I filed #7248 to track the general discussion of platform.h fate and let's use this to track existing issues with HW init code in platform_init() or current hybrid platforms:

  • remove HW init from Intel cAVS platform

Activity

  1. added
    enhancementNew feature or request
    ZephyrIssues only observed with Zephyr integrated
    on Mar 25, 2022
  2. hlleng commented on Mar 30, 2022

    @hlleng
    Contributor
  3. added this to the v2.2 milestone on Apr 6, 2022
  4. lgirdwood commented on Apr 6, 2022

    @lgirdwood
    Member

    Making a v2.2 for Intel platforms. @dbaluta NXP likewise for v2.2 ?

  5. modified the milestones: v2.2, v2.6 on Feb 17, 2023
  6. kv2019i commented on Mar 10, 2023

    @kv2019i
    CollaboratorAuthor

    @dbaluta I don't see any clear overlap in platform/imx8/platform.c where SOF side platform code would be initializing hw that is already handle in Zephyr. IMX8 interrupt handling is one possible item, but I guess this is not overlapping with Zephyr yet (it's really handled on SOF side). Feel free to yet in the task tracking list.

  7. lgirdwood commented on May 10, 2023

    @lgirdwood
    Member

    @juimonen @dbaluta on track for v2.6 ?

  8. modified the milestones: v2.6, v2.7 on May 11, 2023
  9. kv2019i commented on Jun 20, 2023

    @kv2019i
    CollaboratorAuthor

    With #7702 merged, we can now close this.

  10. modified the milestones: v2.7, v2.8 on Aug 17, 2023
  11. kv2019i commented on Aug 17, 2023

    @kv2019i
    CollaboratorAuthor

    Moving this meta item to v2.8. For v2.7, we completed #7896 and start to be completed for Intel targets.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ZephyrIssues only observed with Zephyr integratedenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions