默认波特率 - linux/u-boot
我正在使用 u-boot 开发嵌入式 Linux 系统。 U-boot 使用 console= bootarg 设置 ttyS0 串口的波特率,但我还想设置 ttyS[1-3] 的默认波特率(设置为 9600 以外的值)。
在此系统中,U-boot 将设备树(dts/dtb)传递给内核,但在那里设置波特率似乎不起作用。
需要注意的是,该系统类似于canyonlands板(ppc460ex)。
无论如何,在u-boot、内核或设备树中是否可以更改串行端口的默认波特率?
I'm working on the development of an embedded linux system using u-boot. U-boot sets the baud rate of the ttyS0 serial port with the console= bootarg, but I would also like to set the default baud rate of ttyS[1-3] (to something other than 9600).
In this system U-boot passes a device-tree (dts/dtb) to the kernel, but setting the baud rate there doesn't seem to be working.
To note, this system is similar to the canyonlands board (ppc460ex).
Is there anyway in u-boot, the kernel, or device-tree to change the default baud rate of the serial ports?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有时,以下文件中的值会覆盖 DTS 文件中给出的信息。
检查u-boot源代码中的以下文件
Sometimes the values in the below file overrides the information given in the DTS file.
Check the below file in the u-boot source code
原文中已经提到,设备设置似乎被内核忽略了。
如果您在设备树中硬编码新的波特率,则它可能会在引导过程中被覆盖。设备树在后续引导过程中实际传递到内核之前由 u-boot 更新。查看u-boot源代码中的ft_board_setup()。我自己一直在使用 u-boot 的 PowerPC 44X 分支,并且 fdt 代码更新“时钟频率”,但不更新串行设备的“当前速度”属性。您正在处理的分支可能有不同的代码库。
In the original text, it has been mentioned that the device setting seems to be ignored by the kernel.
If you are hard coding the new baud rate in the device-tree, it is possible that it is overwritten during the boot process. The device-tree gets updated by u-boot before actually being passed to the kernel during the subsequent boot process. Look at ft_board_setup() in u-boot source code. My self has been working with the the PowerPC 44X branch of u-boot and the fdt code updates the "clock-frequency" but not the "current-speed" attribute of the serial devices. The branch you are working on might have a different code base.