Subject: Re: R140 soon with 8 MB RAM, new snapshot?
To: None <kjetil@thomassen.priv.no>
From: Ben Harris <bjh21@netbsd.org>
List: port-arm26
Date: 07/03/2001 01:03:14
On Wed, 27 Jun 2001, Kjetil B. Thomassen wrote:

> > At the moment, no.  I'd like to add proper support for the PowerROM, which
> > shouldn't be hard, since we've already got support for podule loaders in
> > general (I needed this to get the Ethernet address out of my EtherLan
> > cards).  If you don't mind testing things, I'll try to do some work on
> > this soon.
>
> Testing is the main reason I decided to upgrade at least one of them to 8
> MB,

Right, this looks pretty simple.  Could you:

- Send me the "Cardxx" entries from Resources:$.Resources.SCSIDriver.Msg1,
  as mentioned in your correspondence with Gary Partis, and
- Try out the following patch (with "powerrom* at podulebus0 slot ?" in
  your kernel config), which attempts to ask a PowerROM what card it's on?

If you can't compile arm26 kernels yet, I'll make one for you.

Index: sys/arch/arm26/conf/files.arm26
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/arm26/conf/files.arm26,v
retrieving revision 1.32
diff -u -r1.32 files.arm26
--- sys/arch/arm26/conf/files.arm26	2001/06/08 20:13:27	1.32
+++ sys/arch/arm26/conf/files.arm26	2001/07/03 00:00:41
@@ -177,6 +177,10 @@
 attach	eh at podulebus
 file	arch/arm26/podulebus/if_eh.c		eh

+# PowerROM test driver
+device	powerrom: podloader
+attach	powerrom at podulebus
+file	arch/arm26/podulebus/powerrom.c		powerrom

 # Memory disk for installation (or ROM versions?)
 file	dev/md_root.c				memory_disk_hooks
Index: sys/arch/arm26/podulebus/powerrom.c
===================================================================
RCS file: powerrom.c
diff -N powerrom.c
--- /dev/null	Mon Jul  2 03:15:06 2001
+++ powerrom.c	Tue Jul  3 03:00:41 2001
@@ -0,0 +1,37 @@
+/*	$NetBSD$	*/
+
+/* Test driver to see if we can talk to PowerROMs */
+
+#include <sys/param.h>
+
+__KERNEL_RCSID(0, "$NetBSD$");
+
+#include <sys/device.h>
+#include <sys/systm.h>
+#include <dev/podulebus/podulebus.h>
+#include <dev/podulebus/podules.h>
+
+int  powerrom_match(struct device *, struct cfdata *, void *);
+void powerrom_attach(struct device *, struct device *, void *);
+
+struct cfattach powerrom_ca = {
+	sizeof(struct device), powerrom_match, powerrom_attach
+};
+
+int
+powerrom_match(struct device *parent, struct cfdata *cf, void *aux)
+{
+	struct podulebus_attach_args *pa = aux;
+
+	return (pa->pa_product == PODULE_ALSYSTEMS_SCSI);
+}
+
+void
+powerrom_attach(struct device *parent, struct device *self, void *aux)
+{
+	struct podulebus_attach_args *pa = aux;
+
+	if (podulebus_initloader(pa) == 0)
+		printf(": card id = 0x%x", podloader_callloader(pa, 0, 0));
+	printf("\n");
+}

-- 
Ben Harris                                                   <bjh21@netbsd.org>
Portmaster, NetBSD/arm26               <URL:http://www.netbsd.org/Ports/arm26/>