blob: 9ddbaf9924cd540a385db84efae617018bdd915f [file] [log] [blame]
Michał Żygowski72f06ca2020-04-13 21:42:24 +02001/* SPDX-License-Identifier: GPL-2.0-only */
2
3#include <bootblock_common.h>
4#include <device/pci_ops.h>
5#include <northbridge/intel/sandybridge/sandybridge.h>
6#include <southbridge/intel/bd82x6x/pch.h>
7#include <superio/smsc/sch5545/sch5545.h>
8#include <superio/smsc/sch5545/sch5545_emi.h>
9
Michał Żygowski7e8b5972022-02-20 23:27:18 +010010#include <baseboard/sch5545_ec.h>
Michał Żygowski72f06ca2020-04-13 21:42:24 +020011
Michał Żygowski72f06ca2020-04-13 21:42:24 +020012void bootblock_mainboard_early_init(void)
13{
14 /*
15 * FIXME: the board gets stuck in reset loop in
16 * mainboard_romstage_entry. Avoid that by clearing SSKPD
17 */
Angel Ponsd9e58dc2021-01-20 01:22:20 +010018 pci_write_config32(HOST_BRIDGE, MCHBAR, CONFIG_FIXED_MCHBAR_MMIO_BASE | 1);
19 pci_write_config32(HOST_BRIDGE, MCHBAR + 4, 0);
Angel Pons528b4712021-03-27 19:15:59 +010020 mchbar_write16(SSKPD_HI, 0);
Michał Żygowski72f06ca2020-04-13 21:42:24 +020021
22 sch5545_early_init(0x2e);
23 /* Bare EC and SIO GPIO initialization which allows to enable serial port */
24 sch5545_emi_init(0x2e);
25 sch5545_emi_disable_interrupts();
26 sch5545_ec_early_init();
27
28 if (CONFIG(CONSOLE_SERIAL))
29 sch5545_enable_uart(0x2e, 0);
30}