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

soc: nuvoton: npcx: refactor npcx soc hierarchy for future chip support #87446

Merged
merged 1 commit into from
Apr 7, 2025

Conversation

alvsun
Copy link
Collaborator

@alvsun alvsun commented Mar 21, 2025

This commit refactors the NPCX SoC hierarchy to improve maintainability and enable future support for upcoming chips.

Key changes include:

  1. Introduced a new npcxn subdirectory under common/ to consolidate shared components across the npcxn series.
  2. Renamed and reorganized register access files for improved consistency.
  3. Updated relevant Kconfig files, header files, and CMakeLists for the new structure.

@alvsun alvsun force-pushed the npcx_k3_extend branch 2 times, most recently from b7854a3 to e18f0ba Compare March 21, 2025 03:39
@alvsun alvsun marked this pull request as ready for review March 21, 2025 05:08
@zephyrbot zephyrbot added the platform: Nuvoton NPCX Nuvoton NPCX label Mar 21, 2025
Comment on lines 12 to 23
config SOC_FAMILY_VARIANT_NPCXN
bool
select SOC_FAMILY_NPCX

config SOC_FAMILY_VARIANT_NPCKN
bool
select SOC_FAMILY_NPCX

config SOC_FAMILY_VARIANT
string
default "npcxn" if SOC_FAMILY_VARIANT_NPCXN
default "npckn" if SOC_FAMILY_VARIANT_NPCKN
Copy link
Collaborator

Choose a reason for hiding this comment

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

do not add Kconfigs which use existing identifiers like SOC_FAMILY

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@@ -1,11 +1,14 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_include_directories(.)
set(SOC_FAMILY_VARIANT ${CONFIG_SOC_FAMILY_VARIANT})
Copy link
Collaborator

Choose a reason for hiding this comment

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

this set isn't needed, use renamed variable directly

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

This commit refactors the NPCX SoC hierarchy to improve maintainability and
enable future support for upcoming chips.

Key changes include:
1. Introduced a new `npcxn` subdirectory under `common/` to consolidate
shared components across the npcxn series.
2. Renamed and reorganized register access files for improved consistency.
3. Updated relevant Kconfig files, header files, and CMakeLists
for the new structure.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
@alvsun alvsun requested a review from nordicjm March 31, 2025 01:54
@kartben kartben merged commit dd57806 into zephyrproject-rtos:main Apr 7, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants