* Support for the third ethernet port on Titan 1.2 (2.4)
@ 2004-10-20 23:27 Manish Lachwani
0 siblings, 0 replies; only message in thread
From: Manish Lachwani @ 2004-10-20 23:27 UTC (permalink / raw)
To: Linux/MIPS Development, Ralf Baechle
Hello Ralf
Attached patch initializes port #2 of the titan 1.2 GE subsystem in 2.4
Thanks
Manish Lachwani
--- drivers/net/titan_ge.c.orig 2004-10-20 15:41:35.000000000 -0700
+++ drivers/net/titan_ge.c 2004-10-20 16:04:16.000000000 -0700
@@ -522,6 +522,8 @@
ack &= ~(0x3);
if (port_num == 1)
ack &= ~(0x300);
+ if (port_num == 2)
+ ack &= ~(0x30000);
/* Interrupts have been disabled */
TITAN_GE_WRITE(TITAN_GE_INTR_XDMA_IE, ack);
@@ -972,6 +974,53 @@
TITAN_GE_WRITE(0x494c, reg_data);
}
+ /*
+ * Titan 1.2 does support port #2
+ */
+ if (port_num == 2) {
+ /*
+ * Descriptors in SRAM
+ */
+ reg_data = TITAN_GE_READ(0x48a0);
+
+ reg_data |= 0x100000;
+ reg_data |= (0xff << 10) | (2*(0xff + 1));
+
+ TITAN_GE_WRITE(0x48a0, reg_data);
+ /*
+ * BAV2,BAV and DAV settings for the Rx FIFO
+ */
+ reg_data1 = TITAN_GE_READ(0x48a4);
+ reg_data1 |= ( (0x10 << 20) | (0x10 << 10) | 0x1);
+ TITAN_GE_WRITE(0x48a4, reg_data1);
+
+ reg_data &= ~(0x00100000);
+ reg_data |= 0x200000;
+
+ TITAN_GE_WRITE(0x48a0, reg_data);
+
+ reg_data = TITAN_GE_READ(0x4958);
+ reg_data |= 0x100000;
+
+ TITAN_GE_WRITE(0x4958, reg_data);
+ reg_data |= (0xff << 10) | (2*(0xff + 1));
+ TITAN_GE_WRITE(0x4958, reg_data);
+
+ /*
+ * BAV2, BAV and DAV settings for the Tx FIFO
+ */
+
+ reg_data1 = TITAN_GE_READ(0x495c);
+ reg_data1 = ( (0x1 << 20) | (0x1 << 10) | 0x10);
+
+ TITAN_GE_WRITE(0x495c, reg_data1);
+
+ reg_data &= ~(0x00100000);
+ reg_data |= 0x200000;
+
+ TITAN_GE_WRITE(0x4958, reg_data);
+ }
+
if (port_num == 2) {
reg_data = TITAN_GE_READ(0x48a0);
@@ -1094,6 +1143,9 @@
reg_data1 |= 0x300;
}
+ if (port_num == 2)
+ reg_data1 |= 0x30000;
+
TITAN_GE_WRITE(TITAN_GE_INTR_XDMA_IE, reg_data1);
TITAN_GE_WRITE(0x003c, 0x300);
@@ -1974,6 +2026,13 @@
printk(KERN_ERR "Error registering the TITAN Ethernet"
"driver for port 1\n");
+ /*
+ * Titan 1.2 does support port #2
+ */
+ if (titan_ge_init(2))
+ printk(KERN_ERR "Error registering the TITAN Ethernet"
+ "driver for port 2\n");
+
return 0;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-20 23:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-20 23:27 Support for the third ethernet port on Titan 1.2 (2.4) Manish Lachwani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox