Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: "Brian R. Gaeke" <brg@dgate.org>
To: linux-mips@linux-mips.org
Subject: drivers/tc patch for DS5000/200
Date: Thu, 2 Dec 2004 18:22:04 -0600	[thread overview]
Message-ID: <20041203002203.GB26830@sartre.insightbb.com> (raw)


Hi linux-mips list,

First, I want to say, Linux/MIPS is great stuff - thanks for all your
hard work, folks!

Now, it is my understanding that, having a pre-REX PROM, the DECstation
5000/200 would not be able to successfully execute the REX calls
(rex_gettcinfo(), rex_slot_address()) in drivers/tc/tc.c.  Therefore,
I have found it necessary to use a patched kernel in my efforts to boot
Linux on VMIPS (http://www.dgate.org/vmips), which has lately gained some
(limited) DECstation 5000/200 emulation capabilities.

If you find this patch useful, you're quite welcome to it.  I'm also
interested in hearing from anyone who has access to a 5000/200 who can
tell me whether I'm right or wrong, as I only have old manuals and
header files to work from.

-Brian Gaeke

-- 
Brian R. Gaeke, brg at dgate.org -- GnuPG encrypted mail gleefully accepted

Index: tc.c
===================================================================
RCS file: /home/cvs/linux/drivers/tc/tc.c,v
retrieving revision 1.7.2.8
diff -u -a -d -p -r1.7.2.8 tc.c
--- tc.c	11 Aug 2003 11:52:38 -0000	1.7.2.8
+++ tc.c	3 Dec 2004 00:14:56 -0000
@@ -32,6 +32,7 @@ MODULE_LICENSE("GPL");
 slot_info tc_bus[MAX_SLOT];
 static int num_tcslots;
 static tcinfo *info;
+static tcinfo ds5000_200_info;
 
 unsigned long system_base;
 
@@ -196,8 +197,18 @@ void __init tc_init(void)
 		tc_bus[i].flags = FREE;
 	}
 
-	info = (tcinfo *) rex_gettcinfo();
-	slot0addr = (unsigned long)KSEG1ADDR(rex_slot_address(0));
+	if (mips_machtype != MACH_DS5000_200) {
+		info = (tcinfo *) rex_gettcinfo();
+		slot0addr = (unsigned long)KSEG1ADDR(rex_slot_address(0));
+	} else {
+		/* Hardcode these, because the old PROM lacks gettcinfo(). */
+		ds5000_200_info.revision = 0;
+		ds5000_200_info.parity = 0;
+		ds5000_200_info.clk_period = 40;
+		ds5000_200_info.slot_size = 4;
+		info = &ds5000_200_info;
+		slot0addr = 0xbe000000;
+	}
 
 	switch (mips_machtype) {
 	case MACH_DS5000_200:

             reply	other threads:[~2004-12-03  0:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-03  0:22 Brian R. Gaeke [this message]
2004-12-03  2:46 ` drivers/tc patch for DS5000/200 Maciej W. Rozycki

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=20041203002203.GB26830@sartre.insightbb.com \
    --to=brg@dgate.org \
    --cc=linux-mips@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox