aboutsummaryrefslogtreecommitdiff
path: root/platforms
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2017-01-12 14:54:13 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-01-16 09:18:05 +1100
commita30758f6a32eafc31c0f5bb5929d1c615c7b43ce (patch)
tree935906efaf34a1cb7b09e2c8004f354cf59bcb44 /platforms
parentc3ea33f173ec3dc021d84372b50f1c13dd4b07ed (diff)
downloadskiboot-a30758f6a32eafc31c0f5bb5929d1c615c7b43ce.zip
skiboot-a30758f6a32eafc31c0f5bb5929d1c615c7b43ce.tar.gz
skiboot-a30758f6a32eafc31c0f5bb5929d1c615c7b43ce.tar.bz2
platform: add zz
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 <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'platforms')
-rw-r--r--platforms/ibm-fsp/Makefile.inc2
-rw-r--r--platforms/ibm-fsp/zz.c67
2 files changed, 68 insertions, 1 deletions
diff --git a/platforms/ibm-fsp/Makefile.inc b/platforms/ibm-fsp/Makefile.inc
index c5bec84..e9daab2 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 0000000..89d87b4
--- /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 <skiboot.h>
+#include <device.h>
+#include <fsp.h>
+#include <pci.h>
+#include <pci-cfg.h>
+#include <chip.h>
+#include <i2c.h>
+#include <timebase.h>
+#include <hostservices.h>
+
+#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,
+};