d2c57f2a0c
Drop the old, redundant code for mirroring LPC registers to DMI and make use of the new common code. Select the new Kconfig option for LPC DMI mirroring by the option SOC_INTEL_COMMON_PCH_BASE, which is selected by platforms starting with SPT, except APL and Xeon-SP. For Xeon-SP, select DMI and the new Kconfig directly. APL, even though it's younger than SPT, does not need mirroring. Test: Set LGMR address by calling `lpc_open_mmio_window` and check that both the PCI cfg and DMI LGMR register get written correctly. Tested successfully on clevo/cml-u. Change-Id: Ibd834f1474d986646bcebb754a17db97831a651f Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49593 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
33 lines
796 B
C
33 lines
796 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#include <console/console.h>
|
|
#include <arch/ioapic.h>
|
|
#include <intelblocks/lpc_lib.h>
|
|
#include <soc/iomap.h>
|
|
#include <soc/pcr_ids.h>
|
|
|
|
#include <chip.h>
|
|
|
|
void soc_get_gen_io_dec_range(uint32_t *gen_io_dec)
|
|
{
|
|
const config_t *config = config_of_soc();
|
|
|
|
gen_io_dec[0] = config->gen1_dec;
|
|
gen_io_dec[1] = config->gen2_dec;
|
|
gen_io_dec[2] = config->gen3_dec;
|
|
gen_io_dec[3] = config->gen4_dec;
|
|
}
|
|
|
|
void lpc_soc_init(struct device *dev)
|
|
{
|
|
printk(BIOS_SPEW, "pch: lpc_init\n");
|
|
|
|
/* FSP configures IOAPIC and PCHInterrupt Config */
|
|
printk(BIOS_SPEW, "IOAPICID 0x%x, 0x%x\n",
|
|
io_apic_read((void *)IO_APIC_ADDR, 0x00),
|
|
((io_apic_read((void *)IO_APIC_ADDR, 0x00) & 0x0f000000) >> 24));
|
|
}
|
|
|
|
void pch_lpc_soc_fill_io_resources(struct device *dev)
|
|
{
|
|
}
|