dan6470
dan6470

Reputation: 309

default baud rate - linux/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?

Upvotes: 9

Views: 8414

Answers (2)

New to Rails
New to Rails

Reputation: 2942

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

boot/include/configs/[board name].h -- used for specifying environment and CPU peripheral   default value
boot/common/[board name]_cmd_common.h               

Upvotes: 2

sessyargc.jp
sessyargc.jp

Reputation: 573

In the original text, it has been mentioned that the device setting seems to be ignored by the kernel.

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.

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.

Upvotes: 0

Related Questions