-
Notifications
You must be signed in to change notification settings - Fork 17
pm: Refine the PM/AON code #65
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
Conversation
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>
516b4ad to
dbf67b3
Compare
There was a problem hiding this 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>
dbf67b3 to
c35252a
Compare
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>
c35252a to
60f42e4
Compare
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>
60f42e4 to
4023f3f
Compare
No description provided.