Content-Length: 305289 | pFad | http://github.com/RT-Thread/rt-thread/pull/9908

AC fix GPIO and SCI drivers for RZ series by newflydd · Pull Request #9908 · RT-Thread/rt-thread · GitHub
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

fix GPIO and SCI drivers for RZ series #9908

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

newflydd
Copy link
Contributor

@newflydd newflydd commented Jan 13, 2025

拉取/合并请求描述:(PR description)

[

为什么提交这份PR (why to submit this PR)

  • 原来的renesas gpiosci 驱动无法适配RZN2L系列芯片
  • EtherKit开发板的GPIO驱动无法正常使用rt_pin_get函数,表达式不兼容
  • EtherKit开发板的SCI驱动无法正常使用串口,一个寄存器错误

你的解决方案是什么 (what is your solution)

  • 在Kconfig中添加SOC_FAMILY_RENESAS_RASOC_FAMILY_RENESAS_RZ的宏区分
  • 修改drv_gpio.c和drv_sci.c

请提供验证的bsp和config (provide the config and bsp)

  • BSP: bsp/renesas/ra6m3-hmi-board
  • BSP: EtherKit(官方开发板,尚未添加到主线bsp)
  • .config: 将所有SOC_FAMILY_RENESAS宏调整,区分为SOC_FAMILY_RENESAS_RASOC_FAMILY_RENESAS_RZ
  • action:

]

当前拉取/合并请求的状态 Intent for your PR

必须选择一项 Choose one (Mandatory):

  • 本拉取/合并请求是一个草稿版本 This PR is for a code-review and is intended to get feedback
  • 本拉取/合并请求是一个成熟版本 This PR is mature, and ready to be integrated into the repo

代码质量 Code Quality:

我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:

  • 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
  • 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other styles
  • 没有垃圾代码,代码尽量精简,不包含#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
  • 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
  • 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
  • 代码是高质量的 Code in this PR is of high quality
  • 已经使用formatting 等源码格式化工具确保格式符合RT-Thread代码规范 This PR complies with RT-Thread code specification
  • 如果是新增bsp, 已经添加ci检查到.github/workflows/bsp_buildings.yml 详细请参考链接BSP自查

@newflydd newflydd requested a review from Rbb666 as a code owner January 13, 2025 06:23
@github-actions github-actions bot added BSP BSP: Renesas BSP related with Renesas labels Jan 13, 2025
@@ -358,7 +358,11 @@ static int ra_uart_putc(struct rt_serial_device *serial, char c)
sci_uart_instance_ctrl_t *p_ctrl = (sci_uart_instance_ctrl_t *)param->sci_ctrl;

p_ctrl->p_reg->TDR = c;
#ifdef SOC_SERIES_R9A07G0
Copy link
Member

Choose a reason for hiding this comment

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

这块是否可以也统一使用 SOC_FAMILY_RENESAS_RZ 宏统一替换下?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这块是否可以也统一使用 SOC_FAMILY_RENESAS_RZ 宏统一替换下?

这一块特地跟加缪讨论过,这里使用SOC_FAMILY_RENESAS_RZ 宏似乎并不合适。经过查阅瑞萨的产品手册和各型号的寄存器手册,发现RZ家族还有很多其他架构的芯片。比如芯片型号R7S72100,属于RZ/A1H这一系列,它是CortexA91架构,不是R52架构,我查它的寄存器手册,就是沿用的RA系列的用法,使用SSR_b.TEND而不是CSR_b.TEND。经过跟加缪探讨,决定此处寄存器的fix,还是根据SOC来,而不是根据FAMILY来。

@Rbb666
Copy link
Member

Rbb666 commented Jan 13, 2025

感谢PR,麻烦作者清理下commit记录,保留有效commit记录即可

@github-actions github-actions bot added the action github action yml imporve label Jan 13, 2025
@newflydd
Copy link
Contributor Author

感谢PR,麻烦作者清理下commit记录,保留有效commit记录即可

rebase了,帮忙看看符不符合要求

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action github action yml imporve BSP: Renesas BSP related with Renesas BSP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/RT-Thread/rt-thread/pull/9908

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy