summaryrefslogtreecommitdiffstats
path: root/hw/nx-compress.c
diff options
context:
space:
mode:
authorHaren Myneni <haren@linux.vnet.ibm.com>2017-07-17 19:47:39 -0700
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-08-01 12:39:43 +1000
commitb3623e67badbb7021900068e18b517dfd462009b (patch)
tree27f40b259f5aebefa58d06da0836aa1689481948 /hw/nx-compress.c
parentb0dce19d3e3d783fc5c96745fee16f6940918832 (diff)
downloadblackbird-skiboot-b3623e67badbb7021900068e18b517dfd462009b.tar.gz
blackbird-skiboot-b3623e67badbb7021900068e18b517dfd462009b.zip
NX: Organize NX compression code to include 842 and gzip support
P9 NX also supports gzip compression. So this patch creates nx-compress.c and reorg nx-842.c code so that common functions that are needed for both 842 and gzip compression will be moved in to nx-compress.c. This patch does not change the actual functionality. Signed-off-by: Haren Myneni <hmyneni@us.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/nx-compress.c')
-rw-r--r--hw/nx-compress.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/hw/nx-compress.c b/hw/nx-compress.c
new file mode 100644
index 00000000..2ea2734f
--- /dev/null
+++ b/hw/nx-compress.c
@@ -0,0 +1,34 @@
+/* Copyright 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 <skiboot.h>
+#include <chip.h>
+#include <xscom.h>
+#include <io.h>
+#include <cpu.h>
+#include <nx.h>
+
+void nx_create_compress_node(struct dt_node *node)
+{
+ u32 gcid, pb_base;
+
+ gcid = dt_get_chip_id(node);
+ pb_base = dt_get_address(node, 0, NULL);
+
+ prlog(PR_INFO, "NX%d: 842 at 0x%x\n", gcid, pb_base);
+
+ nx_enable_842(node, gcid, pb_base);
+}
OpenPOWER on IntegriCloud