From owner-p4-projects@FreeBSD.ORG Mon Jan 5 15:46:23 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C44801065673; Mon, 5 Jan 2009 15:46:22 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84BB2106566B for ; Mon, 5 Jan 2009 15:46:22 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 729438FC14 for ; Mon, 5 Jan 2009 15:46:22 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n05FkMfr019780 for ; Mon, 5 Jan 2009 15:46:22 GMT (envelope-from nwhitehorn@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n05FkMbl019778 for perforce@freebsd.org; Mon, 5 Jan 2009 15:46:22 GMT (envelope-from nwhitehorn@freebsd.org) Date: Mon, 5 Jan 2009 15:46:22 GMT Message-Id: <200901051546.n05FkMbl019778@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to nwhitehorn@freebsd.org using -f From: Nathan Whitehorn To: Perforce Change Reviews Cc: Subject: PERFORCE change 155656 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 15:46:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=155656 Change 155656 by nwhitehorn@nwhitehorn_trantor on 2009/01/05 15:46:15 Adapt the CPC 9xx PCI driver to the new icell-independent interrupt map interface. As a status update on this project, we now boot SMP inside the Mambo simulator, and I don't know of any bugs at this time. Affected files ... .. //depot/projects/ppc-g5/sys/powerpc/powermac/cpcht.c#11 edit .. //depot/projects/ppc-g5/sys/powerpc/powermac/cpchtvar.h#4 edit Differences ... ==== //depot/projects/ppc-g5/sys/powerpc/powermac/cpcht.c#11 (text+ko) ==== @@ -11,7 +11,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY Benno Rice ``AS IS'' AND ANY EXPRESS OR + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, @@ -317,7 +317,7 @@ cpcpci_attach(device_t dev) { struct cpcpci_softc *sc; - phandle_t node, iparent; + phandle_t node; u_int32_t reg[2], busrange[2], config_base; struct cpcpci_range *rp, *io, *mem[2]; struct cpcpci_range fakeio; @@ -414,12 +414,6 @@ ofw_bus_setup_iinfo(node, &sc->sc_pci_iinfo, sizeof(cell_t)); - /* We need the number of interrupt cells to read the imap */ - sc->sc_icells = 2; - if (OF_getprop(node, "interrupt-parent", &iparent,sizeof(iparent)) > 0) - OF_getprop(iparent,"#interrupt-cells",&sc->sc_icells, - sizeof(sc->sc_icells)); - device_add_child(dev, "pci", device_get_unit(dev)); return (bus_generic_attach(dev)); @@ -611,15 +605,14 @@ { struct cpcpci_softc *sc; struct ofw_pci_register reg; - uint32_t pintr, mintr[2]; + uint32_t pintr, mintr; uint8_t maskbuf[sizeof(reg) + sizeof(pintr)]; sc = device_get_softc(bus); pintr = pin; if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, ®, - sizeof(reg), &pintr, sizeof(pintr), &mintr, - sizeof(mintr[0])*sc->sc_icells, maskbuf)) - return (mintr[0]); + sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), maskbuf)) + return (mintr); /* Maybe it's a real interrupt, not an intpin */ if (pin > 4) ==== //depot/projects/ppc-g5/sys/powerpc/powermac/cpchtvar.h#4 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (C) 2002 Benno Rice. + * Copyright (C) 2008 Nathan Whitehorn * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -11,7 +11,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY Benno Rice ``AS IS'' AND ANY EXPRESS OR + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, @@ -53,7 +53,6 @@ bus_space_tag_t sc_memt; bus_dma_tag_t sc_dmat; struct ofw_bus_iinfo sc_pci_iinfo; - int sc_icells; }; #endif /* _POWERPC_POWERMAC_CPCHTVAR_H_ */