Getting the kernel to let go of my UART!

Dustin Marquess dmarquess at gmail.com
Mon Jan 23 20:53:17 UTC 2017


On Mon, Jan 23, 2017 at 2:44 PM, Oleksandr Tymoshenko
<gonzo at bluezbox.com> wrote:
> Oleksandr Tymoshenko (gonzo at bluezbox.com) wrote:
>> Dustin Marquess (dmarquess at gmail.com) wrote:
>> > Okay, maybe the console thing was a red herring then.
>> >
>> > It's not marking it as a console at all anymore, but something is
>> > still locking the baud rate to 115200.  Even though stty and minicom
>> > are both set to 9600, anything set/received at 9600 doesn't work/is
>> > garbled.  If I set it to 115200, it works fine.  I had wrongly assumed
>> > it was because of it marking it as a console (since the console line
>> > in dmesg said 115200).
>> >
>> > Device map? enable_uart=1 aka core_freq= maybe? I'll try tinkering..
>>
>> It might be a problem with the driver itself. From a quick glance,
>> PL011 driver sets baudrate only if it has reference clock frequency
>> which doesn't seem to be the case for RPi. If reference clock
>> frequency is unknown divider register is left untouched.
>>
>> According to this document: http://elinux.org/RPiconfig you can
>> set initial baudrate in config.txt using init_uart_baud variable
>
> Also if you use u-boot divider register can be overridden by U-Boot
> intialization routine.

Okay, you're completely amazing and I definitely owe you some alcoholic drinks!

init_uart_baud=9600 did the trick completely.  I had completely
removed #define CONFIG_BCM283X_MU_SERIAL & #define CONFIG_PL01X_SERIAL
in U-boot to keep it from even touching the UART, and for good measure
I even commented-out the "puts("\r\nRPi3 PSCI monitor
installed\r\n");" in your PSCI monitor code (which probably wasn't
needed, but I wanted to keep the GPS module happy).. and sure enough,
after adding that config.txt setting, it works like a charm!

Thanks again!
-Dustin


More information about the freebsd-arm mailing list