From patchwork Thu Jan 12 03:54:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver O'Halloran X-Patchwork-Id: 714211 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tzX813y3Wz9vF7 for ; Thu, 12 Jan 2017 14:59:29 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="TvPnLkfF"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3tzX812dzxzDqS5 for ; Thu, 12 Jan 2017 14:59:29 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="TvPnLkfF"; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3tzX2k5MgHzDqNM for ; Thu, 12 Jan 2017 14:54:54 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="TvPnLkfF"; dkim-atps=neutral Received: by mail-pf0-x242.google.com with SMTP id y143so1314665pfb.1 for ; Wed, 11 Jan 2017 19:54:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RdNcj9EzoPSrnfdvldJvBtLs3pEPsaMQRTQXqWPrW8A=; b=TvPnLkfF1OUslxPBIVzPzY5n9c0YZkxaGl5WQROn6y/ypEhq/MTJlE647hxBHI9dy+ /eeV1W+tQvlZM6h/5KbNkiwojtMps9uXR7EAI2m8W73Ar1CtoqiBtCLfaNVKl8pSC8xE mcMyPHdac5n7haTC5liRvh/xnrjV1ZdtQYbtS/FPsb7hB143B8rKUkF49JnM0GzXdavf fEsCAq8EiTzLecKqqCBkJon4zET9xCTizY8TY5tIicfQq5a3pki+ARLmka7MX15OtrP4 75Pm5EUKyG3MCEJZ74ovDfKzSKG3cd5Xb1GqM/uDj3HASbjB3wAWpwpTMJgf63Ugnb3S s59g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RdNcj9EzoPSrnfdvldJvBtLs3pEPsaMQRTQXqWPrW8A=; b=fO+g2JTSun30I3z9JgpL6TBKaJs7fNYMpV+tILFrm373i9bwDAC0GH4MX6Fx+qoWaa +HXb78JPU6h49w+br2JpxJFRQNP+Dt+hErCsNEA0dY+gjGyuA3sw7O8pFIIKrO6WIHEu m5atgcPik49OLUddW8HX61jQl6lTCeasLjfeCF70Stroz5nNxZmQSWyMNa/QtaVKjcQ8 Aa4mSTzjS3kXRSr3qDwbUJYRN02uy6cMJmNG+emnmv5nlZi7/wazhlJqYWopHgsRNYDV +jAEaYf87Tn1BrZ1Ael+YxDsL/8RjXpPPiNg2V558Io7jBCc2KJX8xFyCgBGLCdFBjGy GyYg== X-Gm-Message-State: AIkVDXJmHBYsAtzRLgQKsW7LdwylLsp4TkFbZEQsaobNm9ORrnxF2SipdBReRAjIlNVsgA== X-Received: by 10.99.178.21 with SMTP id x21mr14903943pge.48.1484193293127; Wed, 11 Jan 2017 19:54:53 -0800 (PST) Received: from flat-canetoad.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id r78sm16971004pfe.55.2017.01.11.19.54.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 19:54:52 -0800 (PST) From: Oliver O'Halloran To: skiboot@lists.ozlabs.org Date: Thu, 12 Jan 2017 14:54:13 +1100 Message-Id: <1484193253-25307-14-git-send-email-oohall@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484193253-25307-1-git-send-email-oohall@gmail.com> References: <1484193253-25307-1-git-send-email-oohall@gmail.com> Subject: [Skiboot] [PATCH 14/14] platform: add zz X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Adds a new platform for P9 FSP machines. Currently this is just a barebones FSP platform with the firenze/apollo PCI specific stuff removed. Signed-off-by: Oliver O'Halloran --- platforms/ibm-fsp/Makefile.inc | 2 +- platforms/ibm-fsp/zz.c | 67 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 platforms/ibm-fsp/zz.c diff --git a/platforms/ibm-fsp/Makefile.inc b/platforms/ibm-fsp/Makefile.inc index c5bec84e0682..e9daab2bc4a7 100644 --- a/platforms/ibm-fsp/Makefile.inc +++ b/platforms/ibm-fsp/Makefile.inc @@ -1,7 +1,7 @@ SUBDIRS += $(PLATDIR)/ibm-fsp IBM_FSP_OBJS = common.o lxvpd.o apollo.o apollo-pci.o \ - firenze.o firenze-pci.o + firenze.o firenze-pci.o zz.o IBM_FSP = $(PLATDIR)/ibm-fsp/built-in.o $(IBM_FSP): $(IBM_FSP_OBJS:%=$(PLATDIR)/ibm-fsp/%) diff --git a/platforms/ibm-fsp/zz.c b/platforms/ibm-fsp/zz.c new file mode 100644 index 000000000000..89d87b4ee305 --- /dev/null +++ b/platforms/ibm-fsp/zz.c @@ -0,0 +1,67 @@ +/* Copyright 2016 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 +#include +#include + +#include "ibm-fsp.h" +#include "lxvpd.h" + +static bool zz_probe(void) +{ + /* FIXME: make this neater when the dust settles */ + if (dt_node_is_compatible(dt_root, "ibm,zz-1s2u") || + dt_node_is_compatible(dt_root, "ibm,zz-1s4u") || + dt_node_is_compatible(dt_root, "ibm,zz-2s4u")) + return true; + + return false; +} + +static uint32_t ibm_fsp_occ_timeout(void) +{ + /* Use a fixed 60s value for now */ + return 60; +} + +DECLARE_PLATFORM(zz) = { + .name = "ZZ", + .probe = zz_probe, + .init = ibm_fsp_init, + .exit = ibm_fsp_exit, + .cec_power_down = ibm_fsp_cec_power_down, + .cec_reboot = ibm_fsp_cec_reboot, + /* FIXME: correct once PCI slot into is available */ + .pci_setup_phb = NULL, + .pci_get_slot_info = NULL, + .pci_probe_complete = NULL, + .nvram_info = fsp_nvram_info, + .nvram_start_read = fsp_nvram_start_read, + .nvram_write = fsp_nvram_write, + .occ_timeout = ibm_fsp_occ_timeout, + .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, +};