Fix 'busname' to attach nodes correctly.

This commit is contained in:
takemura 2001-05-01 00:25:16 +00:00
parent a6b4c8d3da
commit a8304325bf
5 changed files with 16 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: vrgiu.c,v 1.20 2001/04/30 11:42:19 takemura Exp $ */
/* $NetBSD: vrgiu.c,v 1.21 2001/05/01 00:25:17 takemura Exp $ */
/*-
* Copyright (c) 1999-2001
* Shin Takemura and PocketBSD Project. All rights reserved.
@ -201,7 +201,7 @@ vrgiu_attach(parent, self, aux)
/*
* hpcio I/F
*/
haa.haa_busname = "hpcio";
haa.haa_busname = HPCIO_BUSNAME;
haa.haa_sc = sc;
haa.haa_getchip = vrgiu_getchip;
while (config_found(self, &haa, vrgiu_print)) ;

View File

@ -1,4 +1,4 @@
/* $NetBSD: button.c,v 1.2 2001/04/30 11:42:17 takemura Exp $ */
/* $NetBSD: button.c,v 1.3 2001/05/01 00:25:16 takemura Exp $ */
/*-
* Copyright (c) 1999-2001
@ -77,8 +77,11 @@ button_match(parent, match, aux)
struct cfdata *match;
void *aux;
{
struct hpcio_attach_args *haa = aux;
platid_mask_t mask;
if (strcmp(haa->haa_busname, HPCIO_BUSNAME))
return 0;
if (match->cf_loc[HPCIOIFCF_PLATFORM] == 0)
return 0;
mask = PLATID_DEREF(match->cf_loc[HPCIOIFCF_PLATFORM]);

View File

@ -1,4 +1,4 @@
/* $NetBSD: hpcioman.c,v 1.1 2001/04/30 11:42:17 takemura Exp $ */
/* $NetBSD: hpcioman.c,v 1.2 2001/05/01 00:25:17 takemura Exp $ */
/*-
* Copyright (c) 1999-2001 The NetBSD Foundation, Inc.
@ -65,8 +65,11 @@ struct cfattach hpcioman_ca = {
int
hpcioman_match(struct device *parent, struct cfdata *cf, void *aux)
{
struct hpcio_attach_args *haa = aux;
platid_mask_t mask;
if (strcmp(haa->haa_busname, HPCIO_BUSNAME))
return 0;
/* select platform */
mask = PLATID_DEREF(cf->cf_loc[HPCIOIFCF_PLATFORM]);

View File

@ -1,4 +1,4 @@
/* $NetBSD: hpciovar.h,v 1.1 2001/04/30 11:42:17 takemura Exp $ */
/* $NetBSD: hpciovar.h,v 1.2 2001/05/01 00:25:17 takemura Exp $ */
/*-
* Copyright (c) 2001 TAKEMURA Shin.
@ -54,6 +54,7 @@ struct hpcio_attach_args {
void *haa_sc;
hpcio_chip_t (*haa_getchip)(void*, int);
};
#define HPCIO_BUSNAME "hpcioif"
#define hpcio_portread(hc, port) \
((*(hc)->hc_portread)((hc), (port)))

View File

@ -1,4 +1,4 @@
/* $NetBSD: pwctl.c,v 1.2 2001/04/30 11:42:17 takemura Exp $ */
/* $NetBSD: pwctl.c,v 1.3 2001/05/01 00:25:17 takemura Exp $ */
/*-
* Copyright (c) 1999-2001
@ -89,8 +89,11 @@ pwctl_match(parent, match, aux)
struct cfdata *match;
void *aux;
{
struct hpcio_attach_args *haa = aux;
platid_mask_t mask;
if (strcmp(haa->haa_busname, HPCIO_BUSNAME))
return 0;
if (match->cf_loc[HPCIOIFCF_PLATFORM] == 0)
return 0;
mask = PLATID_DEREF(match->cf_loc[HPCIOIFCF_PLATFORM]);