diff --git a/hw/Makefile.inc b/hw/Makefile.inc index e90f5cd3eb24..0e8c257fb80a 100644 --- a/hw/Makefile.inc +++ b/hw/Makefile.inc @@ -1,6 +1,6 @@ # -*-Makefile-*- SUBDIRS += hw -HW_OBJS = xscom.o chiptod.o cec.o lpc.o lpc-uart.o psi.o +HW_OBJS = xscom.o chiptod.o lpc.o lpc-uart.o psi.o HW_OBJS += homer.o slw.o occ.o fsi-master.o centaur.o imc.o HW_OBJS += nx.o nx-rng.o nx-crypto.o nx-compress.o nx-842.o nx-gzip.o HW_OBJS += phb3.o sfc-ctrl.o fake-rtc.o bt.o p8-i2c.o prd.o diff --git a/hw/cec.c b/hw/cec.c deleted file mode 100644 index 20706d1d3a8b..000000000000 --- a/hw/cec.c +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright 2013-2014 IBM Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include -#include -#include - -/* - * Note: This file os only used on P7/P7+ - */ -#define MAX_IO_HUBS 0x80 - -static struct io_hub *cec_iohubs[MAX_IO_HUBS]; - -struct io_hub *cec_get_hub_by_id(uint32_t hub_id) -{ - if (hub_id >= MAX_IO_HUBS) - return NULL; - return cec_iohubs[hub_id]; -} - -void cec_register(struct io_hub *hub) -{ - assert(hub->hub_id < MAX_IO_HUBS); - cec_iohubs[hub->hub_id] = hub; -} - -void cec_reset(void) -{ - unsigned int i; - - /* Reset IO Hubs */ - for (i = 0; i < MAX_IO_HUBS; i++) { - if (!cec_iohubs[i] || !cec_iohubs[i]->ops->reset) - continue; - cec_iohubs[i]->ops->reset(cec_iohubs[i]); - } -} - -static int64_t opal_pci_get_hub_diag_data(uint64_t hub_id, - void *diag_buffer, - uint64_t diag_buffer_len) -{ - struct io_hub *hub = cec_get_hub_by_id(hub_id); - - if (!opal_addr_valid(diag_buffer)) - return OPAL_PARAMETER; - - if (!hub) - return OPAL_PARAMETER; - - if (!hub->ops->get_diag_data) - return OPAL_UNSUPPORTED; - - return hub->ops->get_diag_data(hub, diag_buffer, diag_buffer_len); -} -opal_call(OPAL_PCI_GET_HUB_DIAG_DATA, opal_pci_get_hub_diag_data, 3); diff --git a/platforms/ibm-fsp/Makefile.inc b/platforms/ibm-fsp/Makefile.inc index c4b55a313dd9..653222fd7263 100644 --- a/platforms/ibm-fsp/Makefile.inc +++ b/platforms/ibm-fsp/Makefile.inc @@ -1,6 +1,6 @@ SUBDIRS += $(PLATDIR)/ibm-fsp -IBM_FSP_OBJS = common.o lxvpd.o apollo.o apollo-pci.o \ +IBM_FSP_OBJS = common.o lxvpd.o \ firenze.o firenze-pci.o zz.o IBM_FSP = $(PLATDIR)/ibm-fsp/built-in.a $(IBM_FSP): $(IBM_FSP_OBJS:%=$(PLATDIR)/ibm-fsp/%) diff --git a/platforms/ibm-fsp/apollo-pci.c b/platforms/ibm-fsp/apollo-pci.c deleted file mode 100644 index a6e8d38725b5..000000000000 --- a/platforms/ibm-fsp/apollo-pci.c +++ /dev/null @@ -1,85 +0,0 @@ -/* Copyright 2013-2015 IBM Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include -#include -#include -#include - -#include "ibm-fsp.h" -#include "lxvpd.h" - -/* Debugging option */ -#define APOLLO_PCI_DBG(fmt, a...) \ - prlog(PR_DEBUG, "APOLLO-PCI: " fmt, ##a) -#define APOLLO_PCI_INFO(fmt, a...) \ - prlog(PR_INFO, "APOLLO-PCI: " fmt, ##a) -#define APOLLO_PCI_ERR(fmt, a...) \ - prlog(PR_ERR, "APOLLO-PCI: " fmt, ##a) - -void apollo_pci_setup_phb(struct phb *phb, unsigned int index) -{ - struct dt_node *ioc_node; - - /* Grab the device-tree node of the IOC */ - ioc_node = phb->dt_node->parent; - if (!ioc_node) { - APOLLO_PCI_DBG("No IOC devnode for PHB%04x\n", - phb->opal_id); - return; - } - - /* - * Process the pcie slot entries from the lx vpd lid - * - * FIXME: We currently assume chip 1 always, this will have to be - * fixed once we understand the right way to get the BRxy/BRxy "x" - * "x" value. It's not working well. I found 2 different root ports - * on Firebird-L has been assigned to same slot label. - */ - lxvpd_process_slot_entries(phb, ioc_node, 1, - index, sizeof(struct lxvpd_pci_slot)); -} - -void apollo_pci_get_slot_info(struct phb *phb, struct pci_device *pd) -{ - struct pci_slot *slot; - struct lxvpd_pci_slot *s = NULL; - - if (pd->dev_type != PCIE_TYPE_ROOT_PORT && - pd->dev_type != PCIE_TYPE_SWITCH_UPPORT && - pd->dev_type != PCIE_TYPE_SWITCH_DNPORT && - pd->dev_type != PCIE_TYPE_PCIE_TO_PCIX) - return; - - /* Create PCIe slot */ - slot = pcie_slot_create(phb, pd); - if (!slot) - return; - - /* Root complex inherits methods from PHB slot */ - if (!pd->parent && phb->slot) - memcpy(&slot->ops, &phb->slot->ops, sizeof(struct pci_slot_ops)); - - /* Patch PCIe slot */ - s = lxvpd_get_slot(slot); - if (s) { - lxvpd_extract_info(slot, s); - slot->ops.add_properties = lxvpd_add_slot_properties; - } -} diff --git a/platforms/ibm-fsp/apollo.c b/platforms/ibm-fsp/apollo.c deleted file mode 100644 index d98699df31a4..000000000000 --- a/platforms/ibm-fsp/apollo.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright 2013-2014 IBM Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#include -#include -#include -#include -#include - -#include "ibm-fsp.h" -#include "lxvpd.h" - -static bool apollo_probe(void) -{ - return dt_node_is_compatible(dt_root, "ibm,apollo"); -} - - -DECLARE_PLATFORM(apollo) = { - .name = "Apollo", - .probe = apollo_probe, - .init = ibm_fsp_init, - .exit = ibm_fsp_exit, - .cec_power_down = ibm_fsp_cec_power_down, - .cec_reboot = ibm_fsp_cec_reboot, - .pci_setup_phb = apollo_pci_setup_phb, - .pci_get_slot_info = apollo_pci_get_slot_info, - .nvram_info = fsp_nvram_info, - .nvram_start_read = fsp_nvram_start_read, - .nvram_write = fsp_nvram_write, - .elog_commit = elog_fsp_commit, - .start_preload_resource = fsp_start_preload_resource, - .resource_loaded = fsp_resource_loaded, - .sensor_read = ibm_fsp_sensor_read, - .terminate = ibm_fsp_terminate, -};