PERFORCE change 102515 for review

Kevin Lo kevlo at FreeBSD.org
Thu Jul 27 02:14:16 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=102515

Change 102515 by kevlo at kevlo_monet on 2006/07/27 02:13:50

	1) GPIO[13] uses to generate the PCI reset. 2) Set active low on the GPIO pin chosen to drive the PCI reset signal. See IXP42x Developer's Manual section 6.12 and Operating Manual for GW2348-4 Network Processor Section 2.4.

Affected files ...

.. //depot/projects/arm/src/sys/arm/xscale/ixp425/ixdp425_pci.c#3 edit

Differences ...

==== //depot/projects/arm/src/sys/arm/xscale/ixp425/ixdp425_pci.c#3 (text+ko) ====

@@ -60,10 +60,12 @@
 	
 	/* PCI Reset Assert */
 	reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOUTR);
+	reg &= ~(1U << GPIO_PCI_RESET);
 	GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOUTR, reg & ~(1U << GPIO_PCI_RESET));
 
 	/* PCI Clock Disable */
 	reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPCLKR);
+	reg &= ~GPCLKR_MUX14;
 	GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPCLKR, reg & ~GPCLKR_MUX14);
 
 	/*
@@ -78,6 +80,30 @@
 		(1U << GPIO_PCI_INTC) | (1U << GPIO_PCI_INTD));
 	GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOER, reg);
 
+	/*
+	 * Set GPIO interrupt type
+	 * 	PCI_INT_A, PCI_INTB, PCI_INT_C, PCI_INT_D: Active Low
+	 */
+	reg = GPIO_CONF_READ_4(sc, GPIO_TYPE_REG(GPIO_PCI_INTA));
+	reg &= ~GPIO_TYPE(GPIO_PCI_INTA, GPIO_TYPE_MASK);
+	reg |= GPIO_TYPE(GPIO_PCI_INTA, GPIO_TYPE_ACT_LOW);
+	GPIO_CONF_WRITE_4(sc, GPIO_TYPE_REG(GPIO_PCI_INTA), reg);
+
+	reg = GPIO_CONF_READ_4(sc, GPIO_TYPE_REG(GPIO_PCI_INTB));
+	reg &= ~GPIO_TYPE(GPIO_PCI_INTB, GPIO_TYPE_MASK);
+	reg |= GPIO_TYPE(GPIO_PCI_INTB, GPIO_TYPE_ACT_LOW);
+	GPIO_CONF_WRITE_4(sc, GPIO_TYPE_REG(GPIO_PCI_INTB), reg);
+
+	reg = GPIO_CONF_READ_4(sc, GPIO_TYPE_REG(GPIO_PCI_INTC));
+	reg &= ~GPIO_TYPE(GPIO_PCI_INTC, GPIO_TYPE_MASK);
+	reg |= GPIO_TYPE(GPIO_PCI_INTC, GPIO_TYPE_ACT_LOW);
+	GPIO_CONF_WRITE_4(sc, GPIO_TYPE_REG(GPIO_PCI_INTC), reg);
+
+	reg = GPIO_CONF_READ_4(sc, GPIO_TYPE_REG(GPIO_PCI_INTD));
+	reg &= ~GPIO_TYPE(GPIO_PCI_INTD, GPIO_TYPE_MASK);
+	reg |= GPIO_TYPE(GPIO_PCI_INTD, GPIO_TYPE_ACT_LOW);
+	GPIO_CONF_WRITE_4(sc, GPIO_TYPE_REG(GPIO_PCI_INTD), reg);
+
 	/* clear ISR */
 	GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPISR,
 			  (1U << GPIO_PCI_INTA) | (1U << GPIO_PCI_INTB) |
@@ -91,6 +117,7 @@
 
 	/* PCI Clock Enable */
 	reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPCLKR);
+	reg |= GPCLKR_MUX14;
 	GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPCLKR, reg | GPCLKR_MUX14);
 
 	/*
@@ -100,6 +127,7 @@
 	DELAY(100);
         /* PCI Reset deassert */
 	reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOUTR);
+	reg |= 1U << GPIO_PCI_RESET;
 	GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOUTR, reg | (1U << GPIO_PCI_RESET));
 	sc->sc_irq_rman.rm_type = RMAN_ARRAY;
 	sc->sc_irq_rman.rm_descr = "IXP425 PCI IRQs";


More information about the p4-projects mailing list