Patchwork Patch for Nokia-IP530, now with working PIRQ table, fix on the pirq_routing

login
register
about
Submitter marc bertens
Date 2010-05-27 12:53:59
Message ID <1274964839.28185.78.camel@andrala.reboot>
Download mbox | patch
Permalink /patch/1408/
State Accepted
Headers show

Comments

marc bertens - 2010-05-27 12:53:59
But now with the attached file.

On Thu, 2010-05-27 at 12:14 +0200, mbertens wrote:
> Signed-off-by: Marc Bertens <mbertens@xs4all.nl>
> 
> Part two now the PIRQ table for the Nokia IP530.
> 
> Changes made:
> - rebuild the table to get th eNICs and PCMCIA controllers get there
> correct IRQs assigned. 
> - Added a stub pirq_assign_irqs() due to the fact that it was missing at
> compilation time. This was discussed with Rudolf Marek (ruik)
> <r.marek@assembler.cz>
> 
> Marc
> 
> 
> On Thu, 2010-05-27 at 11:56 +0200, mbertens wrote:
> 
> > Hi all,
> > 
> > Here is the patch just for the pirq_routing() function. Its made
> > specific to the CONFIG_NORTHBRIDGE_INTEL_440BX if that is to generic 
> > please replace by CONFIG_BOARD_NOKIA_IP530. 
> > 
> > Put the following extras in the file; 
> > - added header accordingly "Common License Header" that was missing.
> > - corrected a printk() warning of the compiler.
> > - added the correction for the i440BX by AND the link value with 0x5F
> >  so that always the value is kept below 0x5F. That AND value should be
> >  0x03 i think because the link value cannot be greater than 3. But i'm
> >  not sure about that, thats why i used the current solution.
> > 
> > The other patches will follow to day.
> > 
> > Marc 
> > 
> > 
> > 
> > On Wed, 2010-05-26 at 15:14 -0600, Myles Watson wrote:
> > > On Wed, May 26, 2010 at 2:15 PM, mbertens <mbertens@xs4all.nl> wrote:
> > > > On Wed, 2010-05-26 at 11:00 -0600, Myles Watson wrote:
> > > >> +                     // fix made by Marc Bertens <mbertens@xs4all.nl>
> > > >> +                     if (link > 0x5f) {
> > > >> +                             // This is basically for the 440BX
> > > >> +                             link -= 0x5f;
> > > >> +                     }
> > > >>
> > > >> I'd prefer this to be guarded by
> > > >> #if CONFIG_NORTHBRIDGE_INTEL_440BX (or whatever the correct one is)
> > > > I was thinking of it to put it that way, but i'd. But i will make the
> > > > changes to the code.
> > > >>
> > 
> 
>

Patch

Index: src/mainboard/nokia/ip530/irq_tables.c
===================================================================
--- src/mainboard/nokia/ip530/irq_tables.c	(revision 5593)
+++ src/mainboard/nokia/ip530/irq_tables.c	(working copy)
@@ -31,15 +31,17 @@ 
 	0x122e,			/* Device */
 	0,			/* Miniport */
 	{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* u8 rfu[11] */
-	0x36,			/* Checksum */
+	0x08,			/* Checksum */
 	{
-		/* bus,        dev | fn,   {link, bitmap}, {link, bitmap}, {link, bitmap}, {link, bitmap}, slot, rfu */
-		{0x00, (0x07 << 3) | 0x0, {{0x00, 0x0ea8}, {0x00, 0x0ea8}, {0x00, 0x0ea8}, {0x63, 0x0ea8}}, 0x0, 0x0},
-		{0x00, (0x0c << 3) | 0x0, {{0x61, 0x06a8}, {0x62, 0x06a8}, {0x00, 0x06a8}, {0x00, 0x06a8}}, 0x0, 0x0},
-		{0x00, (0x0d << 3) | 0x0, {{0x60, 0x0ea8}, {0x61, 0x0ea8}, {0x00, 0x0ea8}, {0x00, 0x0ea8}}, 0x1, 0x0},
-		{0x00, (0x09 << 3) | 0x0, {{0x62, 0x0ea8}, {0x63, 0x0ea8}, {0x60, 0x0ea8}, {0x61, 0x0ea8}}, 0x2, 0x0},
-		{0x00, (0x0a << 3) | 0x0, {{0x63, 0x0ea8}, {0x00, 0x0ea8}, {0x00, 0x0ea8}, {0x00, 0x0ea8}}, 0x0, 0x0},
-		{0x01, (0x00 << 3) | 0x0, {{0x60, 0x0ea8}, {0x00, 0x0ea8}, {0x00, 0x0ea8}, {0x00, 0x0ea8}}, 0x0, 0x0},
+		/**
+		 *	Rebuild of the PIRQ table, to fix the non-working on-board NIC and PCMCIA controller.
+		 */
+		{ 0x00, (0x07 << 3) | 0x0, {{0x00, 0x1E20}, {0x00, 0x1E20}, {0x00, 0x1E20}, {0x63, 0x1E20}}, 0x0, 0x0 },
+		{ 0x00, (0x0d << 3) | 0x0, {{0x62, 0x1E20}, {0x00, 0x0000}, {0x00, 0x0000}, {0x00, 0x0000}}, 0x0, 0x0 },
+		{ 0x00, (0x0e << 3) | 0x0, {{0x63, 0x1E20}, {0x00, 0x0000}, {0x00, 0x0000}, {0x00, 0x0000}}, 0x0, 0x0 },
+		{ 0x02, (0x04 << 3) | 0x0, {{0x60, 0x1E20}, {0x00, 0x0000}, {0x00, 0x0000}, {0x00, 0x0000}}, 0x0, 0x0 },
+		{ 0x02, (0x05 << 3) | 0x0, {{0x61, 0x1E20}, {0x00, 0x0000}, {0x00, 0x0000}, {0x00, 0x0000}}, 0x0, 0x0 },
+		{ 0x00, (0x0f << 3) | 0x0, {{0x60, 0x1E20}, {0x61, 0x1E20}, {0x00, 0x0000}, {0x00, 0x0000}}, 0x0, 0x0 },
 	}
 };

@@ -47,3 +49,16 @@ 
 {
 	return copy_pirq_routing_table(addr);
 }
+
+/**
+ * This is function was missing in the build for some reason
+ * Rudolf Marek <r.marek@assembler.cz> adviced this stub function.
+ *
+ * This stub function is here until the point is solved in the
+ * main code of coreboot
+ */
+void pirq_assign_irqs(const unsigned char pIntAtoD[4])
+{
+	return;
+}
+