From patchwork Tue Jun 4 00:34:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 1109582 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45HtGZ0spXz9s6w for ; Tue, 4 Jun 2019 10:34:30 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45HtGY6fKPzDqSC for ; Tue, 4 Jun 2019 10:34:29 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 45HtGM0VTnzDqNJ for ; Tue, 4 Jun 2019 10:34:18 +1000 (AEST) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x540Ljit049819 for ; Mon, 3 Jun 2019 20:34:15 -0400 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0a-001b2d01.pphosted.com with ESMTP id 2swa8dgs88-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 03 Jun 2019 20:34:15 -0400 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 4 Jun 2019 01:34:14 +0100 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 4 Jun 2019 01:34:12 +0100 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x540YCKW14614622 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 4 Jun 2019 00:34:12 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E6FC9BE04F for ; Tue, 4 Jun 2019 00:34:11 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 30082BE05B for ; Tue, 4 Jun 2019 00:34:11 +0000 (GMT) Received: from birb.localdomain (unknown [9.81.213.108]) by b03ledav005.gho.boulder.ibm.com (Postfix) with SMTP for ; Tue, 4 Jun 2019 00:34:10 +0000 (GMT) Received: by birb.localdomain (Postfix, from userid 1000) id 4B3904EC6EE; Tue, 4 Jun 2019 10:34:06 +1000 (AEST) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Tue, 4 Jun 2019 10:34:05 +1000 X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19060400-0016-0000-0000-000009BDAE63 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011210; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000286; SDB=6.01212871; UDB=6.00637424; IPR=6.00993931; MB=3.00027172; MTD=3.00000008; XFM=3.00000015; UTC=2019-06-04 00:34:14 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19060400-0017-0000-0000-0000437B04EF Message-Id: <20190604003405.21991-1-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-03_19:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906040000 Subject: [Skiboot] [PATCH] Remove P7 remnants: hw/cec.c, apollo platform X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Stewart Smith --- hw/Makefile.inc | 2 +- hw/cec.c | 72 ---------------------------- platforms/ibm-fsp/Makefile.inc | 2 +- platforms/ibm-fsp/apollo-pci.c | 85 ---------------------------------- platforms/ibm-fsp/apollo.c | 50 -------------------- 5 files changed, 2 insertions(+), 209 deletions(-) delete mode 100644 hw/cec.c delete mode 100644 platforms/ibm-fsp/apollo-pci.c delete mode 100644 platforms/ibm-fsp/apollo.c 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, -};