summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2015-06-03 08:41:43 +0000
committermpi <mpi@openbsd.org>2015-06-03 08:41:43 +0000
commitf6cf1346cdc1d2d80177012b446595fc9e9ee19d (patch)
treebea533b8112a8631328d49e3ba78bb9ec9080658
parentCheck for the correct bit in the interrupts property of the device-tree (diff)
downloadwireguard-openbsd-f6cf1346cdc1d2d80177012b446595fc9e9ee19d.tar.xz
wireguard-openbsd-f6cf1346cdc1d2d80177012b446595fc9e9ee19d.zip
Support for U4, missed in previous.
ok kettenis@, miod@, dlg@
-rw-r--r--sys/arch/macppc/pci/mpcpcibus.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/arch/macppc/pci/mpcpcibus.c b/sys/arch/macppc/pci/mpcpcibus.c
index e117270c3cc..5546ee0f632 100644
--- a/sys/arch/macppc/pci/mpcpcibus.c
+++ b/sys/arch/macppc/pci/mpcpcibus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpcpcibus.c,v 1.46 2013/08/07 07:29:19 mpi Exp $ */
+/* $OpenBSD: mpcpcibus.c,v 1.47 2015/06/03 08:41:43 mpi Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom
@@ -103,6 +103,7 @@ struct config_type config_offsets[] = {
{"uni-north", 0x00800000, 0x00c00000, 3 },
{"u3-agp", 0x00800000, 0x00c00000, 3 },
{"u3-ht", 0x00000cf8, 0x00000cfc, 3 },
+ {"u4-pcie", 0x00800000, 0x00c00000, 7 },
{"legacy", 0x00000cf8, 0x00000cfc, 0 },
{"IBM,27-82660", 0x00000cf8, 0x00000cfc, 0 },
{NULL, 0x00000000, 0x00000000, 0 },
@@ -445,7 +446,10 @@ mpc_gen_config_reg(void *cpv, pcitag_t tag, int offset)
pci_decompose_tag(cpv, tag, &bus, &dev, &fcn);
- if (cp->config_type & 1) {
+ if (cp->config_type & 4) {
+ reg = val | offset | 1;
+ reg |= (offset >> 8) << 28;
+ } else if (cp->config_type & 1) {
/* Config Mechanism #2 */
if (bus == 0) {
if (dev < 11)