PERFORCE change 155656 for review
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Mon Jan 5 15:46:23 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=155656
Change 155656 by nwhitehorn at 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_ */
More information about the p4-projects
mailing list