This repository has been archived by the owner on Apr 13, 2019. It is now read-only.
sifive-serial: register uart port as console before adding it #137
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The console can be set up (by the kernel) as soon as
uart_add_one_port
is called. So we have to register the uart port as a console before that. Otherwisesifive_serial_console_setup
fails and there is no console at all.I have run into this problem (early console works fine but the normal console is never activated) with a single-core rocket (sifive/freedom@cd9a525) including the UART running on an fpga with
console=ttySI0,115200
in the cmdline. With this patch, linux boots and runs fine, but I don't know much about the linux uart system, so take it with a grain of salt.