Skip to content

Conversation

@kwd-doodling
Copy link
Contributor

No description provided.

Adjust prj.conf:
  - Eanble PM for all boards, not only ish_5_6_0.
  - Enable debug logs of ISH PM logging module.
  - Enlarge stack size of all threads.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR reorganizes the power management (PM) and driver subsystem architecture, moving functionality from inline definitions to a more modular structure with dedicated CMakeLists and separate compilation units.

  • Refactors PM code structure with dedicated CMakeLists files for modular compilation
  • Moves BSP SEDI functionality into separate directories with proper build system integration
  • Adds comprehensive PM testing infrastructure with D0ix state testing capabilities

Reviewed Changes

Copilot reviewed 29 out of 32 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
zephyr/CMakeLists.txt Replaces inline driver compilation with modular subdirectory structure
zephyr/drivers/*/CMakeLists.txt Creates dedicated build files for each driver subsystem
zephyr/bsp_sedi/CMakeLists.txt Establishes BSP SEDI as separate compilation unit with proper includes
zephyr/bsp_sedi/pm/CMakeLists.txt Adds PM-specific build configuration with conditional compilation
zephyr/iut_test/test_zephyr/pm/test_pm.c Introduces comprehensive PM testing with D0ix state validation
bsp_sedi/soc/intel_ish/pm/sedi_pm.c Refactors PM implementation with improved logging and ISR handling
bsp_sedi/soc/intel_ish/pm/aon/include/*.h Reorganizes header structure for better modularity

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

No functional changes; this is a structural/code organization refactor to
improve maintainability and clarity.
- Add ish_ prefix for potential name conflicts with others.
- Move header files into pm/aon/include

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
This makes it easier to put them into aon section in linker script.
Add ish_ prefix to functions of ish_ipapg.S and put them into
.text.ish_ipapg linker section.
Remove packed attributes of aon share, and reference it directly in pm.c.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
Avoid calling Zephyr APIs as it's a SEDI driver.
- Export PM APIs in header: sedi_pm_reset, sedi_pm_isr, sedi_pm_init.
- Replace multiple static ISRs (pcie_dev_isr, pmu_wakeup_isr, reset_prep_isr)
  with a single exported sedi_pm_isr(void *arg) that dispatches based on IRQ.
- Change init function to int sedi_pm_init(void). Remove Zephyr's SYS_INIT.
- Reduce and reorganize includes; move printk under PM_DEBUG_PRINTS guard.
- No behavior changes to power/reset logic beyond ISR/init refactoring.
- Replace printk callings with SEDI log APIs.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
@kwd-doodling kwd-doodling marked this pull request as ready for review September 3, 2025 08:00
@kwd-doodling kwd-doodling changed the title pm: re-arrange pm: refine the PM/AON code Sep 3, 2025
@kwd-doodling kwd-doodling changed the title pm: refine the PM/AON code pm: Refine the PM/AON code Sep 3, 2025
They use zephyr functions to implement logging and assert functions for
BSP SEDI.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
Simplify source selection, modularize BSP and driver cmake, and prepare
for easier maintenance and feature toggles.
- Refactor top-level zephyr/CMakeLists.txt to support out-of-tree style
  library handling and introduce helper functions/macros.
- Move BSP SEDI build into zephyr/bsp_sedi.
- Split drivers and subsys into dedicated cmake subdirectories under
  zephyr/drivers and zephyr/subsys.
- Add zephyr/bsp_sedi/pm CMakeLists.txt and integrate PM AON sources when
  CONFIG_PM is enabled.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
This could be reverted afte new zephyr patches on this branch have been
merged to zephyr.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
@kwd-doodling kwd-doodling merged commit 5d061ea into main Sep 17, 2025
5 checks passed
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.

3 participants