2020-05-05 22:49:26 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
2015-05-04 02:41:21 +02:00
|
|
|
|
2019-01-15 20:14:33 +01:00
|
|
|
#include <bootblock_common.h>
|
2019-03-01 12:43:02 +01:00
|
|
|
#include <device/pci_ops.h>
|
2015-05-04 02:41:21 +02:00
|
|
|
#include <southbridge/intel/i82801gx/i82801gx.h>
|
|
|
|
#include <northbridge/intel/pineview/pineview.h>
|
|
|
|
#include <superio/winbond/w83627thg/w83627thg.h>
|
|
|
|
#include <superio/winbond/common/winbond.h>
|
|
|
|
|
|
|
|
#define SERIAL_DEV PNP_DEV(0x4e, W83627THG_SP1)
|
|
|
|
|
2019-01-15 20:14:33 +01:00
|
|
|
void bootblock_mainboard_early_init(void)
|
2015-05-04 02:41:21 +02:00
|
|
|
{
|
|
|
|
/* Disable Serial IRQ */
|
2017-08-15 20:59:09 +02:00
|
|
|
pci_write_config8(PCI_DEV(0, 0x1f, 0), SERIRQ_CNTL, 0x00);
|
2015-05-04 02:41:21 +02:00
|
|
|
/* Decode range */
|
2019-04-12 20:10:45 +02:00
|
|
|
pci_or_config16(PCI_DEV(0, 0x1f, 0), LPC_IO_DEC, 0x0010);
|
2017-08-15 20:59:09 +02:00
|
|
|
pci_write_config16(PCI_DEV(0, 0x1f, 0), LPC_EN, CNF1_LPC_EN
|
|
|
|
| CNF2_LPC_EN | KBC_LPC_EN | COMA_LPC_EN
|
|
|
|
| COMB_LPC_EN);
|
2015-05-04 02:41:21 +02:00
|
|
|
|
2017-08-15 20:59:09 +02:00
|
|
|
pci_write_config32(PCI_DEV(0, 0x1f, 0), GEN2_DEC, 0x7c0291);
|
2019-01-11 16:06:19 +01:00
|
|
|
|
|
|
|
winbond_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
|
2015-05-04 02:41:21 +02:00
|
|
|
}
|
|
|
|
|
2019-01-11 16:06:19 +01:00
|
|
|
void mb_pirq_setup(void)
|
2015-05-04 02:41:21 +02:00
|
|
|
{
|
|
|
|
/* dev irq route register */
|
2017-08-15 20:59:09 +02:00
|
|
|
RCBA16(D31IR) = 0x0132;
|
|
|
|
RCBA16(D30IR) = 0x0146;
|
|
|
|
RCBA16(D29IR) = 0x0237;
|
|
|
|
RCBA16(D28IR) = 0x3201;
|
|
|
|
RCBA16(D27IR) = 0x0146;
|
2015-05-04 02:41:21 +02:00
|
|
|
|
2019-01-11 16:06:19 +01:00
|
|
|
/* Does not belong here, but is it needed? */
|
2018-12-15 23:46:48 +01:00
|
|
|
RCBA32(FD) |= FD_INTLAN;
|
2015-05-04 02:41:21 +02:00
|
|
|
}
|
|
|
|
|
2019-01-11 16:06:19 +01:00
|
|
|
void get_mb_spd_addrmap(u8 *spd_addrmap)
|
2015-05-04 02:41:21 +02:00
|
|
|
{
|
2019-01-11 16:06:19 +01:00
|
|
|
spd_addrmap[0] = 0x50;
|
|
|
|
spd_addrmap[1] = 0x51;
|
2015-05-04 02:41:21 +02:00
|
|
|
}
|