diff options
author | Stewart Smith <stewart@linux.ibm.com> | 2019-06-04 10:31:27 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2019-06-04 10:31:27 +1000 |
commit | 6995f7d1309d272a2cc59854e20f9df54acf4c6a (patch) | |
tree | 554a10718f8eab92c857857b50d12ff0cc7e335f /hw | |
parent | 16b7ae64103797b0ecab1dbb7c45df23b14810b9 (diff) | |
download | skiboot-6995f7d1309d272a2cc59854e20f9df54acf4c6a.zip skiboot-6995f7d1309d272a2cc59854e20f9df54acf4c6a.tar.gz skiboot-6995f7d1309d272a2cc59854e20f9df54acf4c6a.tar.bz2 |
Remove P7 remnants: hw/cec.c, apollo platform
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/Makefile.inc | 2 | ||||
-rw-r--r-- | hw/cec.c | 72 |
2 files changed, 1 insertions, 73 deletions
diff --git a/hw/Makefile.inc b/hw/Makefile.inc index e90f5cd..0e8c257 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 20706d1..0000000 --- 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 <skiboot.h> -#include <cec.h> -#include <interrupts.h> -#include <opal-api.h> -#include <opal-internal.h> - -/* - * 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); |