-
Notifications
You must be signed in to change notification settings - Fork 5.3k
bsp: k230: add sysctl driver #10281
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
bsp: k230: add sysctl driver #10281
Conversation
📌 Code Review Assignment🏷️ Tag: bsp_k230Path: Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2025-05-15 08:50 UTC)
📝 Review Instructions
|
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 pull request adds drivers for sysctl functionality on the K230 board including reset, power, boot, and clock controls.
- Introduces enums, structures, and API prototypes for sysctl reset, power, and boot operations.
- Implements sysctl boot functions in C, along with SConscript build scripts for each driver module.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| bsp/k230/drivers/interdrv/sysctl/sysctl_reset/sysctl_rst.h | New header defining reset enums, structure, and reset APIs. |
| bsp/k230/drivers/interdrv/sysctl/sysctl_reset/SConscript | SConscript for compiling the reset driver. |
| bsp/k230/drivers/interdrv/sysctl/sysctl_power/sysctl_pwr.h | New header for power management APIs and power domain definitions. |
| bsp/k230/drivers/interdrv/sysctl/sysctl_power/SConscript | SConscript for compiling the power driver. |
| bsp/k230/drivers/interdrv/sysctl/sysctl_clock/SConscript | SConscript for compiling the clock driver. |
| bsp/k230/drivers/interdrv/sysctl/sysctl_boot/sysctl_boot.h | New header defining boot-related structures, enums, and API prototypes. |
| bsp/k230/drivers/interdrv/sysctl/sysctl_boot/sysctl_boot.c | Implementation of boot functions, including boot mode selection and reset. |
| bsp/k230/drivers/interdrv/sysctl/sysctl_boot/SConscript | SConscript for compiling the boot driver. |
| bsp/k230/drivers/interdrv/sysctl/SConscript | Main SConscript aggregating all sysctl component builds. |
Comments suppressed due to low confidence (1)
bsp/k230/drivers/interdrv/sysctl/sysctl_reset/SConscript:13
- [nitpick] Using the variable name 'list' shadows Python's built-in type. Consider renaming it (e.g., 'file_list') to avoid potential confusion.
list = os.listdir(cwd)
|
|
||
| void sysctl_boot_set_spi2axi(void) | ||
| { | ||
| sysctl_boot->soc_boot_ctl |= 1 < 2; |
Copilot
AI
May 15, 2025
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.
In the sysctl_boot_set_spi2axi() function, the '<' operator is used instead of the intended bitwise shift operator '<<'. This likely does not set the correct bit, so it should be changed to '1 << 2'.
| sysctl_boot->soc_boot_ctl |= 1 < 2; | |
| sysctl_boot->soc_boot_ctl |= 1 << 2; |
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.
fixed
SystemCtrl includes: - boot - clock - power - reset These drivers are built-in by default. Signed-off-by: Wang Chen <unicorn_wang@outlook.com>
18c2a23 to
a090daf
Compare
添加 sysctl 部分的驱动,包括
这些驱动都是 bsp 运行必须的,所以默认参与编译,不可 dsable。
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
你的解决方案是什么 (what is your solution)
请提供验证的bsp和config (provide the config and bsp)
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up