Angel Pons | 274a037 | 2020-04-03 01:23:27 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Jonathan Neuschäfer | 1c09cfa | 2018-04-19 16:23:55 +0200 | [diff] [blame] | 2 | |
Philipp Hug | 374d992 | 2018-09-13 22:16:36 +0200 | [diff] [blame] | 3 | #include <cbmem.h> |
Jonathan Neuschäfer | 1c09cfa | 2018-04-19 16:23:55 +0200 | [diff] [blame] | 4 | #include <console/console.h> |
Philipp Hug | 374d992 | 2018-09-13 22:16:36 +0200 | [diff] [blame] | 5 | #include <console/streams.h> |
6 | #include <console/uart.h> | ||||
Jonathan Neuschäfer | 1c09cfa | 2018-04-19 16:23:55 +0200 | [diff] [blame] | 7 | #include <program_loading.h> |
Philipp Hug | 374d992 | 2018-09-13 22:16:36 +0200 | [diff] [blame] | 8 | #include <soc/clock.h> |
9 | #include <soc/sdram.h> | ||||
Jonathan Neuschäfer | 1c09cfa | 2018-04-19 16:23:55 +0200 | [diff] [blame] | 10 | |
11 | void main(void) | ||||
12 | { | ||||
13 | console_init(); | ||||
14 | |||||
15 | /* TODO: Follow Section 6.3 (FSBL) of the FU540 manual */ | ||||
16 | |||||
Philipp Hug | 374d992 | 2018-09-13 22:16:36 +0200 | [diff] [blame] | 17 | clock_init(); |
18 | |||||
19 | // re-initialize UART | ||||
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 20 | if (CONFIG(CONSOLE_SERIAL)) |
Philipp Hug | 374d992 | 2018-09-13 22:16:36 +0200 | [diff] [blame] | 21 | uart_init(CONFIG_UART_FOR_CONSOLE); |
Philipp Hug | 374d992 | 2018-09-13 22:16:36 +0200 | [diff] [blame] | 22 | |
Philipp Hug | 9159572 | 2018-09-13 22:18:06 +0200 | [diff] [blame] | 23 | sdram_init(); |
24 | |||||
Philipp Hug | 4e7a473 | 2018-09-15 15:34:53 +0200 | [diff] [blame] | 25 | cbmem_initialize_empty(); |
26 | |||||
Jonathan Neuschäfer | 1c09cfa | 2018-04-19 16:23:55 +0200 | [diff] [blame] | 27 | run_ramstage(); |
28 | } |