| 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <console/console.h> |
| 4 | #include <bootblock_common.h> |
| 5 | #include "dock.h" |
| 6 | |
| 7 | static int dock_err; |
| 8 | |
| 9 | void bootblock_mainboard_early_init(void) |
| 10 | { |
| 11 | /* Minimal setup to detect dock */ |
| 12 | dock_err = pc87382_early(); |
| 13 | if (dock_err == 0) |
| 14 | dock_connect(); |
| 15 | } |
| 16 | |
| 17 | void bootblock_mainboard_init(void) |
| 18 | { |
| 19 | /* Console is not yet initialized in bootblock_mainboard_early_init, |
| 20 | so we print the dock information here */ |
| 21 | if (dock_err) |
| 22 | printk(BIOS_ERR, "DOCK: Failed to init pc87382\n"); |
| 23 | else |
| 24 | dock_info(); |
| 25 | } |