From: Manish Lachwani <mlachwani@mvista.com>
To: Linux/MIPS Development <linux-mips@linux-mips.org>,
Ralf Baechle <ralf@linux-mips.org>
Subject: Support for the third ethernet port on Titan 1.2 (2.4)
Date: Wed, 20 Oct 2004 16:27:03 -0700 [thread overview]
Message-ID: <4176F447.2090006@mvista.com> (raw)
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;
}
reply other threads:[~2004-10-20 23:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4176F447.2090006@mvista.com \
--to=mlachwani@mvista.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.