soc/sifive/fu540: Switch clock to 1GHz in romstage
Invoke clock_init in romstage for SiFive Unleashed. Change-Id: Ib869762d557e8fdf4c83a53698102df116d80389 Signed-off-by: Philipp Hug <philipp@hug.cx> Reviewed-on: https://review.coreboot.org/28602 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
committed by
Ronald G. Minnich
parent
c014ef5919
commit
374d992fc8
@@ -13,8 +13,13 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <cbmem.h>
|
||||
#include <console/console.h>
|
||||
#include <console/streams.h>
|
||||
#include <console/uart.h>
|
||||
#include <program_loading.h>
|
||||
#include <soc/clock.h>
|
||||
#include <soc/sdram.h>
|
||||
|
||||
void main(void)
|
||||
{
|
||||
@@ -22,5 +27,18 @@ void main(void)
|
||||
|
||||
/* TODO: Follow Section 6.3 (FSBL) of the FU540 manual */
|
||||
|
||||
/*
|
||||
* Flush console before changing clock/UART divisor to prevent garbage
|
||||
* being printed.
|
||||
*/
|
||||
console_tx_flush();
|
||||
|
||||
clock_init();
|
||||
|
||||
// re-initialize UART
|
||||
#if (IS_ENABLED(CONFIG_CONSOLE_SERIAL))
|
||||
uart_init(CONFIG_UART_FOR_CONSOLE);
|
||||
#endif
|
||||
|
||||
run_ramstage();
|
||||
}
|
||||
|
Reference in New Issue
Block a user