soc/intel/{cnl,icl}: Add support to get LPSS controllers list from SOC

This implementation adds support to provide list of LPSS controllers
for a canonlake and icelake  platforms. It implements strong function
of get_soc_lpss_controllers defined under intel common block lpss
driver.

Change-Id: I36c87e2324caf8ed3e4bb3e3dc6f5d4edf3e8d46
Signed-off-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34136
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
Aamir Bohra 2019-07-08 18:23:37 +05:30 committed by Martin Roth
parent 141d909323
commit b9c18507ec
2 changed files with 31 additions and 0 deletions

View File

@ -18,6 +18,7 @@
#include <device/pci.h> #include <device/pci.h>
#include <fsp/api.h> #include <fsp/api.h>
#include <fsp/util.h> #include <fsp/util.h>
#include <intelblocks/lpss.h>
#include <intelblocks/xdci.h> #include <intelblocks/xdci.h>
#include <intelpch/lockdown.h> #include <intelpch/lockdown.h>
#include <soc/intel/common/vbt.h> #include <soc/intel/common/vbt.h>
@ -446,3 +447,10 @@ __weak void mainboard_silicon_init_params(FSP_S_CONFIG *params)
{ {
printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__); printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__);
} }
/* Return list of SOC LPSS controllers */
const pci_devfn_t *soc_lpss_controllers_list(size_t *size)
{
*size = ARRAY_SIZE(serial_io_dev);
return serial_io_dev;
}

View File

@ -18,6 +18,7 @@
#include <device/pci.h> #include <device/pci.h>
#include <fsp/api.h> #include <fsp/api.h>
#include <fsp/util.h> #include <fsp/util.h>
#include <intelblocks/lpss.h>
#include <intelblocks/xdci.h> #include <intelblocks/xdci.h>
#include <soc/intel/common/vbt.h> #include <soc/intel/common/vbt.h>
#include <soc/pci_devs.h> #include <soc/pci_devs.h>
@ -45,6 +46,21 @@ static void parse_devicetree(FSP_S_CONFIG *params)
params->SerialIoUartMode[i] = config->SerialIoUartMode[i]; params->SerialIoUartMode[i] = config->SerialIoUartMode[i];
} }
static const pci_devfn_t serial_io_dev[] = {
PCH_DEVFN_I2C0,
PCH_DEVFN_I2C1,
PCH_DEVFN_I2C2,
PCH_DEVFN_I2C3,
PCH_DEVFN_I2C4,
PCH_DEVFN_I2C5,
PCH_DEVFN_GSPI0,
PCH_DEVFN_GSPI1,
PCH_DEVFN_GSPI2,
PCH_DEVFN_UART0,
PCH_DEVFN_UART1,
PCH_DEVFN_UART2
};
/* UPD parameters to be initialized before SiliconInit */ /* UPD parameters to be initialized before SiliconInit */
void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd) void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd)
{ {
@ -229,3 +245,10 @@ __weak void mainboard_silicon_init_params(FSP_S_CONFIG *params)
{ {
printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__); printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__);
} }
/* Return list of SOC LPSS controllers */
const pci_devfn_t *soc_lpss_controllers_list(size_t *size)
{
*size = ARRAY_SIZE(serial_io_dev);
return serial_io_dev;
}