Subject: kernel compile error (bus_space_tag handling at txcsbus.c)
To: None <port-hpcmips@netbsd.org>
From: FUKAUMI Naoki <naoki@fukaumi.org>
List: port-hpcmips
Date: 12/01/2001 22:45:19
This is TX39XX kernel compile error on 2001/12/1 -current source.

/usr/src/sys/arch/hpcmips/tx/txcsbus.c: In function `__txcsbus_alloc_cstag':
/usr/src/sys/arch/hpcmips/tx/txcsbus.c:255: warning: assignment from incompatible pointer type
/usr/src/sys/arch/hpcmips/tx/txcsbus.c:258: warning: passing arg 1 of `hpcmips_init_bus_space' from incompatible pointer type
/usr/src/sys/arch/hpcmips/tx/txcsbus.c:258: warning: passing arg 2 of `hpcmips_init_bus_space' from incompatible pointer type

Patch is include below.

Sorry, I haven't enough knowledge of C-langage (pointer ? struct ?) and
Unix (NetBSD) bus_space_* handling.

Please check and modify it if my changes are wrong.

Index: txcsbus.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/hpcmips/tx/txcsbus.c,v
retrieving revision 1.6
diff -u -r1.6 txcsbus.c
--- txcsbus.c	2001/11/18 08:19:40	1.6
+++ txcsbus.c	2001/12/01 13:33:52
@@ -240,7 +240,7 @@
 	tx_chipset_tag_t tc = sc->sc_tc;
 	int cs = csh->cs;
 	int width = csh->cswidth;
-	bus_space_tag_t iot;
+	struct bus_space_tag_hpcmips *iot;
 	txreg_t reg;
 
  	if (!TX39_ISCS(cs) && !TX39_ISMCS(cs) && !TX39_ISCARD(cs)) {
@@ -253,8 +253,8 @@
 	}
 
 	iot = hpcmips_alloc_bus_space_tag();
-	sc->sc_cst[cs] = iot;
-	hpcmips_init_bus_space(iot, hpcmips_system_bus_space(),
+	sc->sc_cst[cs] = &iot->bst;
+	hpcmips_init_bus_space(iot, (struct bus_space_tag_hpcmips *)hpcmips_system_bus_space(),
 	    __csmap[cs].cs_name, __csmap[cs].cs_addr, __csmap[cs].cs_size);
 
 	/* CS bus-width (configurationable) */
@@ -341,5 +341,5 @@
 		}
 	}
 
-	return (iot);
+	return (&iot->bst);
 }


-- 
FUKAUMI Naoki