9ab6d92e96
This patch cleans soc/intel/{apollolake/cannonlake/skylake} by moving common soc code into common/block/gspi. BUG=b:78109109 BRANCH=none TEST=Build and boot KBL/CNL/APL platform. Change-Id: I877c7c48af928ca1e0399ec794d9400bc52edfcb Signed-off-by: Ravi Sarawadi <ravishankar.sarawadi@intel.com> Signed-off-by: Maulik V Vaghela <maulik.v.vaghela@intel.com> Signed-off-by: Subrata Banik <subrata.banik@intel.com> Reviewed-on: https://review.coreboot.org/26048 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
28 lines
806 B
C
28 lines
806 B
C
/*
|
|
* This file is part of the coreboot project.
|
|
*
|
|
* Copyright 2017 Google Inc.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
#include <intelblocks/gspi.h>
|
|
#include <soc/pci_devs.h>
|
|
|
|
int gspi_soc_bus_to_devfn(unsigned int gspi_bus)
|
|
{
|
|
switch (gspi_bus) {
|
|
case 0:
|
|
return PCH_DEVFN_GSPI0;
|
|
case 1:
|
|
return PCH_DEVFN_GSPI1;
|
|
}
|
|
return -1;
|
|
}
|