From f6cf1346cdc1d2d80177012b446595fc9e9ee19d Mon Sep 17 00:00:00 2001 From: mpi Date: Wed, 3 Jun 2015 08:41:43 +0000 Subject: [PATCH] Support for U4, missed in previous. ok kettenis@, miod@, dlg@ --- sys/arch/macppc/pci/mpcpcibus.c | 8 ++++++-- 1 file 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) -- 2.20.1