[dm][serial] Update serial for DM#11055
Conversation
Signed-off-by: GuEe-GUI <2991707448@qq.com>
Signed-off-by: GuEe-GUI <2991707448@qq.com>
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
📌 Code Review Assignment🏷️ Tag: componentsReviewers: Maihuanyi Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2025-12-16 12:08 CST)
📝 Review Instructions
|
|
depens on #11047 |
|
@Rbb666 可以开始审核了 |
There was a problem hiding this comment.
Pull request overview
This PR adds Device Manager (DM) support to the RT-Thread serial driver subsystem. The changes introduce multiple new serial drivers compatible with the DM framework while updating existing serial utilities.
Key changes:
- Replaces atomic function from
rt_hw_atomic_addtort_atomic_addin serial_dm.c - Fixes TTY device check to return NULL instead of asserting for non-UART devices
- Adds new serial drivers: 8250 family (OFW, PCI, DWC, early), virtual serial (graphic+input), HVC early serial, and ARM PL011
Reviewed changes
Copilot reviewed 24 out of 26 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| components/drivers/serial/serial_tty.c | Changed assertion to graceful NULL return for non-UART devices |
| components/drivers/serial/serial_dm.c | Replaced rt_hw_atomic_add with rt_atomic_add, improved comment style |
| components/drivers/serial/device/virtual/* | New virtual serial driver using framebuffer and input devices |
| components/drivers/serial/device/serial-pl011.c | New ARM PL011 UART driver with DM support |
| components/drivers/serial/device/serial-early-hvc.c | New HVC hypervisor console early driver |
| components/drivers/serial/device/8250/* | New 8250 UART family drivers (core, OFW, PCI, DW, early) |
| components/drivers/serial/device/Kconfig | Configuration options for new serial drivers |
| components/drivers/serial/Kconfig | Added DM serial device configuration |
Critical Issues Found:
- 🔴 Incorrect register read/write syntax in 8250-pci.c (lines 55, 65)
- 🔴 Wrong inb() function call syntax in core.c (line 242)
- 🔴 Potential API incompatibility with rt_atomic_add replacement
Just return if is not a tty device, don't assert Signed-off-by: GuEe-GUI <2991707448@qq.com>
917d69d to
710e3ad
Compare
1. 8250 serila family (OFW, PCI, DWC, early) 2. Virtual serial (by graphic and input) 3. HVC early serial 4. ARM PL011 serial Signed-off-by: GuEe-GUI <2991707448@qq.com>
|
@Rbb666 AI相关要求已修改 |
拉取/合并请求描述:(PR description)
[
]
当前拉取/合并请求的状态 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