From f5f7c84a58c61ff690bf9dd4260280e93353d4fe Mon Sep 17 00:00:00 2001 From: Hannah Williams Date: Wed, 31 May 2017 13:45:08 -0700 Subject: soc/intel/apollolake: Remove soc/pci_ids dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and add pci ids for GLK and APL from device/pci_ids.h Change-Id: If8101fe52591b09caadfe104ca8daab4258837c7 Signed-off-by: Hannah Williams Reviewed-on: https://review.coreboot.org/19999 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Furquan Shaikh --- src/soc/intel/apollolake/dsp.c | 9 ++++-- src/soc/intel/apollolake/graphics.c | 6 ++-- src/soc/intel/apollolake/include/soc/pci_ids.h | 43 -------------------------- src/soc/intel/apollolake/lpc.c | 9 ++++-- src/soc/intel/apollolake/northbridge.c | 9 ++++-- src/soc/intel/apollolake/p2sb.c | 9 ++++-- src/soc/intel/apollolake/pmc.c | 9 ++++-- src/soc/intel/apollolake/sd.c | 8 ++++- src/soc/intel/apollolake/sram.c | 9 ++++-- 9 files changed, 52 insertions(+), 59 deletions(-) delete mode 100644 src/soc/intel/apollolake/include/soc/pci_ids.h (limited to 'src/soc/intel/apollolake') diff --git a/src/soc/intel/apollolake/dsp.c b/src/soc/intel/apollolake/dsp.c index a2d21aa259..76547eef6c 100644 --- a/src/soc/intel/apollolake/dsp.c +++ b/src/soc/intel/apollolake/dsp.c @@ -16,7 +16,6 @@ #include #include #include -#include static struct device_operations dsp_dev_ops = { .read_resources = &pci_dev_read_resources, @@ -25,8 +24,14 @@ static struct device_operations dsp_dev_ops = { .scan_bus = &scan_static_bus, }; +static const unsigned short pci_device_ids[] = { + PCI_DEVICE_ID_INTEL_APL_AUDIO, + PCI_DEVICE_ID_INTEL_GLK_AUDIO, + 0, +}; + static const struct pci_driver apollolake_dsp __pci_driver = { .ops = &dsp_dev_ops, .vendor = PCI_VENDOR_ID_INTEL, - .device = PCI_DEVICE_ID_APOLLOLAKE_AUDIO + .devices = pci_device_ids, }; diff --git a/src/soc/intel/apollolake/graphics.c b/src/soc/intel/apollolake/graphics.c index 9963d2cff6..7123e4f16f 100644 --- a/src/soc/intel/apollolake/graphics.c +++ b/src/soc/intel/apollolake/graphics.c @@ -23,7 +23,6 @@ #include #include #include -#include #include uintptr_t fsp_soc_get_igd_bar(void) @@ -91,8 +90,9 @@ static const struct device_operations igd_ops = { }; static const unsigned short pci_device_ids[] = { - PCI_DEVICE_ID_APOLLOLAKE_IGD_HD_505, - PCI_DEVICE_ID_APOLLOLAKE_IGD_HD_500, + PCI_DEVICE_ID_INTEL_APL_IGD_HD_505, + PCI_DEVICE_ID_INTEL_APL_IGD_HD_500, + PCI_DEVICE_ID_INTEL_GLK_IGD, 0, }; diff --git a/src/soc/intel/apollolake/include/soc/pci_ids.h b/src/soc/intel/apollolake/include/soc/pci_ids.h deleted file mode 100644 index 25e7f94157..0000000000 --- a/src/soc/intel/apollolake/include/soc/pci_ids.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright (C) 2015 Intel Corp. - * (Written by Alexandru Gagniuc for Intel Corp.) - * - * 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. - */ - -#ifndef _SOC_APOLLOLAKE_PCI_IDS_H_ -#define _SOC_APOLLOLAKE_PCI_IDS_H_ - -#define PCI_DEVICE_ID_APOLLOLAKE_NB 0x5af0 /* 00:00.0 */ -#define PCI_DEVICE_ID_APOLLOLAKE_IGD_HD_505 0x5a84 /* 00:02.0 */ -#define PCI_DEVICE_ID_APOLLOLAKE_IGD_HD_500 0x5a85 /* 00:02.0 */ -#define PCI_DEVICE_ID_APOLLOLAKE_P2SB 0x5a92 /* 00:0d.0 */ -#define PCI_DEVICE_ID_APOLLOLAKE_PMC 0x5a94 /* 00:0d.1 */ -#define PCI_DEVICE_ID_APOLLOLAKE_HWSEQ_SPI 0x5a96 /* 00:0d.2 */ -#define PCI_DEVICE_ID_APOLLOLAKE_SRAM 0x5aec /* 00:0d.3 */ -#define PCI_DEVICE_ID_APOLLOLAKE_AUDIO 0x5a98 /* 00:0e.0 */ -#define PCI_DEVICE_ID_APOLLOLAKE_SATA 0x5ae0 /* 00:12.0 */ -#define PCI_DEVICE_ID_APOLLOLAKE_I2C0 0x5aac /* 00:16.0 */ -#define PCI_DEVICE_ID_APOLLOLAKE_I2C1 0x5aae /* 00:16.1 */ -#define PCI_DEVICE_ID_APOLLOLAKE_I2C2 0x5ab0 /* 00:16.2 */ -#define PCI_DEVICE_ID_APOLLOLAKE_I2C3 0x5ab2 /* 00:16.3 */ -#define PCI_DEVICE_ID_APOLLOLAKE_I2C4 0x5ab4 /* 00:17.0 */ -#define PCI_DEVICE_ID_APOLLOLAKE_I2C5 0x5ab6 /* 00:17.1 */ -#define PCI_DEVICE_ID_APOLLOLAKE_I2C6 0x5ab8 /* 00:17.2 */ -#define PCI_DEVICE_ID_APOLLOLAKE_I2C7 0x5aba /* 00:17.3 */ -#define PCI_DEVICE_ID_APOLLOLAKE_SPI0 0x5ac2 /* 00:19.0 */ -#define PCI_DEVICE_ID_APOLLOLAKE_SPI1 0x5ac4 /* 00:19.1 */ -#define PCI_DEVICE_ID_APOLLOLAKE_SPI2 0x5ac6 /* 00:19.2 */ -#define PCI_DEVICE_ID_APOLLOLAKE_LPC 0x5ae8 /* 00:1f.0 */ - -#endif /* _SOC_APOLLOLAKE_PCI_IDS_H_ */ diff --git a/src/soc/intel/apollolake/lpc.c b/src/soc/intel/apollolake/lpc.c index 810c4c9af3..67c87b1f22 100644 --- a/src/soc/intel/apollolake/lpc.c +++ b/src/soc/intel/apollolake/lpc.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -167,8 +166,14 @@ static struct device_operations device_ops = { .scan_bus = scan_lpc_bus, }; +static const unsigned short pci_device_ids[] = { + PCI_DEVICE_ID_INTEL_APL_LPC, + PCI_DEVICE_ID_INTEL_GLK_LPC, + 0, +}; + static const struct pci_driver soc_lpc __pci_driver = { .ops = &device_ops, .vendor = PCI_VENDOR_ID_INTEL, - .device = PCI_DEVICE_ID_APOLLOLAKE_LPC, + .devices = pci_device_ids, }; diff --git a/src/soc/intel/apollolake/northbridge.c b/src/soc/intel/apollolake/northbridge.c index 9519603300..4997c6f9a4 100644 --- a/src/soc/intel/apollolake/northbridge.c +++ b/src/soc/intel/apollolake/northbridge.c @@ -21,7 +21,6 @@ #include #include #include -#include static uint32_t get_bar(device_t dev, unsigned int index) { @@ -162,8 +161,14 @@ static struct device_operations northbridge_ops = { .enable = DEVICE_NOOP }; +static const unsigned short pci_device_ids[] = { + PCI_DEVICE_ID_INTEL_APL_NB, + PCI_DEVICE_ID_INTEL_GLK_NB, + 0, +}; + static const struct pci_driver northbridge_driver __pci_driver = { .ops = &northbridge_ops, .vendor = PCI_VENDOR_ID_INTEL, - .device = PCI_DEVICE_ID_APOLLOLAKE_NB + .devices = pci_device_ids, }; diff --git a/src/soc/intel/apollolake/p2sb.c b/src/soc/intel/apollolake/p2sb.c index 8056d14297..f0e584b27f 100644 --- a/src/soc/intel/apollolake/p2sb.c +++ b/src/soc/intel/apollolake/p2sb.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #define P2SB_E0 0xe0 @@ -67,8 +66,14 @@ static const struct device_operations device_ops = { .set_resources = DEVICE_NOOP, }; +static const unsigned short pci_device_ids[] = { + PCI_DEVICE_ID_INTEL_APL_P2SB, + PCI_DEVICE_ID_INTEL_GLK_P2SB, + 0, +}; + static const struct pci_driver pmc __pci_driver = { .ops = &device_ops, .vendor = PCI_VENDOR_ID_INTEL, - .device = PCI_DEVICE_ID_APOLLOLAKE_P2SB, + .devices = pci_device_ids, }; diff --git a/src/soc/intel/apollolake/pmc.c b/src/soc/intel/apollolake/pmc.c index ef39630aee..150f7ce395 100644 --- a/src/soc/intel/apollolake/pmc.c +++ b/src/soc/intel/apollolake/pmc.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -164,8 +163,14 @@ static const struct device_operations device_ops = { .init = &pmc_init, }; +static const unsigned short pci_device_ids[] = { + PCI_DEVICE_ID_INTEL_APL_PMC, + PCI_DEVICE_ID_INTEL_GLK_PMC, + 0, +}; + static const struct pci_driver pmc __pci_driver = { .ops = &device_ops, .vendor = PCI_VENDOR_ID_INTEL, - .device = PCI_DEVICE_ID_APOLLOLAKE_PMC, + .devices= pci_device_ids, }; diff --git a/src/soc/intel/apollolake/sd.c b/src/soc/intel/apollolake/sd.c index 2f38061b27..e2b5ab4fbe 100644 --- a/src/soc/intel/apollolake/sd.c +++ b/src/soc/intel/apollolake/sd.c @@ -75,8 +75,14 @@ static struct device_operations dev_ops = { #endif }; +static const unsigned short pci_device_ids[] = { + PCI_DEVICE_ID_INTEL_APL_SD, + PCI_DEVICE_ID_INTEL_GLK_SD, + 0, +}; + static const struct pci_driver pch_sd __pci_driver = { .ops = &dev_ops, .vendor = PCI_VENDOR_ID_INTEL, - .device = 0x5aca + .devices= pci_device_ids, }; diff --git a/src/soc/intel/apollolake/sram.c b/src/soc/intel/apollolake/sram.c index 44eb0ee79e..0225327550 100644 --- a/src/soc/intel/apollolake/sram.c +++ b/src/soc/intel/apollolake/sram.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -61,8 +60,14 @@ static const struct device_operations device_ops = { .enable_resources = pci_dev_enable_resources, }; +static const unsigned short pci_device_ids[] = { + PCI_DEVICE_ID_INTEL_APL_SRAM, + PCI_DEVICE_ID_INTEL_GLK_SRAM, + 0, +}; + static const struct pci_driver pmc __pci_driver = { .ops = &device_ops, .vendor = PCI_VENDOR_ID_INTEL, - .device = PCI_DEVICE_ID_APOLLOLAKE_SRAM, + .devices= pci_device_ids, }; -- cgit v1.2.3