Angel Pons | 5c59680 | 2020-04-03 01:21:01 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Mike Banon | e3229a5 | 2020-02-13 15:34:24 +0000 | [diff] [blame] | 2 | |
| 3 | #include <amdblocks/acpimmio.h> |
Elyes HAOUAS | 864d1cf | 2020-09-12 10:21:16 +0200 | [diff] [blame] | 4 | #include <arch/io.h> |
Mike Banon | e3229a5 | 2020-02-13 15:34:24 +0000 | [diff] [blame] | 5 | #include <bootblock_common.h> |
Mike Banon | e3229a5 | 2020-02-13 15:34:24 +0000 | [diff] [blame] | 6 | |
| 7 | void bootblock_mainboard_early_init(void) |
| 8 | { |
| 9 | int i; |
Mike Banon | e3229a5 | 2020-02-13 15:34:24 +0000 | [diff] [blame] | 10 | |
| 11 | /* Disable PCI-PCI bridge and release GPIO32/33 for other uses. */ |
| 12 | pm_write8(0xea, 0x1); |
| 13 | |
| 14 | /* On Larne, after LpcClkDrvSth is set, it needs some time to be stable, because of the buffer ICS551M */ |
| 15 | for (i = 0; i < 200000; i++) |
Arthur Heymans | a74504b | 2022-03-24 00:09:14 +0100 | [diff] [blame] | 16 | inb(0xcd6); |
Mike Banon | e3229a5 | 2020-02-13 15:34:24 +0000 | [diff] [blame] | 17 | } |