Only deal with isa dma stuff if this is available/needed. Fixes the build

of kernels when, e.g. the audio driver is disabled.

Per cube@'s suggestion.
This commit is contained in:
jmmv 2007-08-03 16:02:17 +00:00
parent 2fe103e7dd
commit b77d937244
3 changed files with 20 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ofisa_machdep.c,v 1.4 2005/12/11 12:19:05 christos Exp $ */
/* $NetBSD: ofisa_machdep.c,v 1.5 2007/08/03 16:02:17 jmmv Exp $ */
/*
* Copyright 1998
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ofisa_machdep.c,v 1.4 2005/12/11 12:19:05 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: ofisa_machdep.c,v 1.5 2007/08/03 16:02:17 jmmv Exp $");
#include "opt_compat_old_ofw.h"
@ -48,6 +48,8 @@ __KERNEL_RCSID(0, "$NetBSD: ofisa_machdep.c,v 1.4 2005/12/11 12:19:05 christos E
#include <dev/isa/isavar.h>
#include <dev/ofisa/ofisavar.h>
#include "isadma.h"
int
ofisa_get_isabus_data(phandle, iba)
int phandle;
@ -56,7 +58,9 @@ ofisa_get_isabus_data(phandle, iba)
iba->iba_iot = &isa_io_bs_tag;
iba->iba_memt = &isa_mem_bs_tag;
#if (NISADMA > 0)
iba->iba_dmat = &isa_bus_dma_tag;
#endif
iba->iba_ic = &isa_chipset_tag;
return (0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: hat.c,v 1.4 2005/12/11 12:19:05 christos Exp $ */
/* $NetBSD: hat.c,v 1.5 2007/08/03 16:02:17 jmmv Exp $ */
/*
* Copyright 1997
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: hat.c,v 1.4 2005/12/11 12:19:05 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: hat.c,v 1.5 2007/08/03 16:02:17 jmmv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -62,6 +62,8 @@ __KERNEL_RCSID(0, "$NetBSD: hat.c,v 1.4 2005/12/11 12:19:05 christos Exp $");
#include <dev/isa/isareg.h>
#include <dev/isa/isavar.h>
#include "isadma.h"
#include <shark/shark/shark_fiq.h>
#include <shark/shark/sequoia.h>
#include <shark/shark/hat.h>
@ -102,7 +104,9 @@ hatClkOff(void)
shark_fiqregs.fr_r13 = 0;
fiq_setregs(&shark_fiqregs);
#if (NISADMA > 0)
isa_dmathaw(&isa_chipset_tag); /* XXX */
#endif
return 0;
}
@ -118,7 +122,9 @@ hatClkOn(int count, void (*hatFn)(int), int arg,
hatWedgeFn = wedgeFn;
#if (NISADMA > 0)
isa_dmafreeze(&isa_chipset_tag); /* XXX */
#endif
fiq_getregs(&shark_fiqregs);

View File

@ -1,4 +1,4 @@
/* $NetBSD: shark_machdep.c,v 1.26 2006/10/26 22:49:36 bjh21 Exp $ */
/* $NetBSD: shark_machdep.c,v 1.27 2007/08/03 16:02:17 jmmv Exp $ */
/*
* Copyright 1997
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: shark_machdep.c,v 1.26 2006/10/26 22:49:36 bjh21 Exp $");
__KERNEL_RCSID(0, "$NetBSD: shark_machdep.c,v 1.27 2007/08/03 16:02:17 jmmv Exp $");
#include "opt_ddb.h"
@ -79,6 +79,8 @@ __KERNEL_RCSID(0, "$NetBSD: shark_machdep.c,v 1.26 2006/10/26 22:49:36 bjh21 Exp
#include <dev/ofisa/ofisavar.h>
#include <shark/shark/sequoia.h>
#include "isadma.h"
#include "wd.h"
#include "cd.h"
#include "sd.h"
@ -241,7 +243,9 @@ initarm(void *arg)
process_kernel_args();
ofw_configisadma(&isadmaphysbufs);
#if (NISADMA > 0)
isa_dma_init();
#endif
/* allocate a cache clean space */
if ((pclean = ofw_getcleaninfo()) != -1) {