Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Apr 2010 20:47:25 GMT
From:      Rafal Jaworowski <raj@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 176876 for review
Message-ID:  <201004132047.o3DKlP9r001841@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@176876?ac=10

Change 176876 by raj@raj_fdt on 2010/04/13 20:47:13

	Move MPC85XX PCI interrupt config to a better place. Clean up.

Affected files ...

.. //depot/projects/fdt/sys/powerpc/mpc85xx/pci_fdt.c#3 edit

Differences ...

==== //depot/projects/fdt/sys/powerpc/mpc85xx/pci_fdt.c#3 (text+ko) ====

@@ -275,15 +275,6 @@
 		capptr = (cfgreg >> 8) & 0xff;
 	}
 
-	/*
-	 * XXX initializing PCI interrrupts should go elsewhere, platform_if
-	 * maybe?
-	 */
-#define PCI_INTRS 12
-	/* Configure PCI interrupt pins */
-	for (int i = 0; i < PCI_INTRS; i++)
-		powerpc_config_intr(PIC_IRQ_EXT(i), INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW);
-
 	node = ofw_bus_get_node(dev);
 	/*
 	 * Get PCI interrupt info.
@@ -582,11 +573,6 @@
 		intline = 10;
 	else {
 		if (intpin != 0) {
-#if 0
-			intline = intpin - 1;
-			intline += (bus != sc->sc_busnr) ? slot : 0;
-			intline = PIC_IRQ_EXT(intline & 3);
-#endif
 			err = fdt_pci_route_intr(bus, slot, func, intpin,
 			    &sc->sc_intr_info, &intline);
 			if (err == 0)
@@ -601,6 +587,10 @@
 		printf("PCI %u:%u:%u:%u: intpin %u: intline=%u\n",
 		    unit, bus, slot, func, intpin, intline);
 
+	if (intline != 0xff)
+		powerpc_config_intr(intline, INTR_TRIGGER_LEVEL,
+		    INTR_POLARITY_LOW);
+
 	return (intline);
 }
 
@@ -832,12 +822,6 @@
 	bus_addr_t *vap, *allocp;
 	int error;
 
-#if 0
-	error = bus_get_resource(sc->sc_dev, type, 1, &start, &size);
-	if (error)
-		return (error);
-#endif
-
 	end = start + size - 1;
 
 	switch (type) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004132047.o3DKlP9r001841>