Permalink
Browse files

sync with -current:

Merge isa_machdep.c from netwinder and cats into footbridge/isa
  • Loading branch information...
1 parent 0f961d1 commit 481586b24205b820e96036d6955d9b0bc802ecef jdolecek committed Oct 18, 2002
@@ -1,4 +1,4 @@
-/* $NetBSD: isa_machdep.c,v 1.2.2.3 2002/09/06 08:33:43 jdolecek Exp $ */
+/* $NetBSD: isa_machdep.c,v 1.1.4.2 2002/10/18 10:55:06 jdolecek Exp $ */
/*-
* Copyright (c) 1996-1998 The NetBSD Foundation, Inc.
@@ -91,6 +91,7 @@
#include <machine/intr.h>
#include <machine/pio.h>
#include <machine/bootconfig.h>
+#include <machine/isa_machdep.h>
#include <dev/isa/isareg.h>
#include <dev/isa/isavar.h>
@@ -501,28 +502,33 @@ isa_intr_init(void)
static void *isa_ih;
isa_icu_init();
- isa_ih = intr_claim(IRQ_IN_L2, IPL_BIO, "isabus",
+ /* something break the build in an informative way */
+#ifndef ISA_FOOTBRIDGE_IRQ
+#warning Before using isa with footbridge you must define ISA_FOOTBRIDGE_IRQ
+#endif
+ isa_ih = intr_claim(ISA_FOOTBRIDGE_IRQ, IPL_BIO, "isabus",
isa_irqdispatch, NULL);
+
}
/* Static array of ISA DMA segments. We only have one on CATS */
#if NISADMA > 0
-struct arm32_dma_range cats_isa_dma_ranges[1];
+struct arm32_dma_range machdep_isa_dma_ranges[1];
#endif
void
-isa_cats_init(iobase, membase)
+isa_footbridge_init(iobase, membase)
u_int iobase, membase;
{
#if NISADMA > 0
extern struct arm32_dma_range *footbridge_isa_dma_ranges;
extern int footbridge_isa_dma_nranges;
- cats_isa_dma_ranges[0].dr_sysbase = bootconfig.dram[0].address;
- cats_isa_dma_ranges[0].dr_busbase = bootconfig.dram[0].address;
- cats_isa_dma_ranges[0].dr_len = (16 * 1024 * 1024);
+ machdep_isa_dma_ranges[0].dr_sysbase = bootconfig.dram[0].address;
+ machdep_isa_dma_ranges[0].dr_busbase = bootconfig.dram[0].address;
+ machdep_isa_dma_ranges[0].dr_len = (16 * 1024 * 1024);
- footbridge_isa_dma_ranges = cats_isa_dma_ranges;
+ footbridge_isa_dma_ranges = machdep_isa_dma_ranges;
footbridge_isa_dma_nranges = 1;
#endif
@@ -1,4 +1,4 @@
-/* $NetBSD: cats_machdep.c,v 1.1.2.7 2002/10/10 18:32:12 jdolecek Exp $ */
+/* $NetBSD: cats_machdep.c,v 1.1.2.8 2002/10/18 10:54:57 jdolecek Exp $ */
/*
* Copyright (c) 1997,1998 Mark Brinicombe.
@@ -906,7 +906,7 @@ consinit(void)
#if NISA > 0
/* Initialise the ISA subsystem early ... */
- isa_cats_init(DC21285_PCI_IO_VBASE, DC21285_PCI_ISA_MEM_VBASE);
+ isa_footbridge_init(DC21285_PCI_IO_VBASE, DC21285_PCI_ISA_MEM_VBASE);
#endif
footbridge_pci_bs_tag_init();
@@ -1,4 +1,4 @@
-# $NetBSD: files.cats,v 1.7.2.7 2002/10/10 18:32:13 jdolecek Exp $
+# $NetBSD: files.cats,v 1.7.2.8 2002/10/18 10:54:59 jdolecek Exp $
#
# CATS-specific configuration info
#
@@ -72,7 +72,7 @@ file arch/arm/footbridge/isa/isa_io.c isa
file arch/arm/footbridge/isa/isa_io_asm.S isa
# CATS boards have an EBSA285 based core with an ISA bus
-file arch/cats/isa/isa_machdep.c isa
+file arch/arm/footbridge/isa/isa_machdep.c isa
device sysbeep
attach sysbeep at pcppi with sysbeep_isa
@@ -1,8 +1,12 @@
-/* $NetBSD: isa_machdep.h,v 1.2.2.1 2002/01/10 19:41:11 thorpej Exp $ */
+/* $NetBSD: isa_machdep.h,v 1.2.2.2 2002/10/18 10:55:00 jdolecek Exp $ */
#ifndef _CATS_ISA_MACHDEP_H_
#define _CATS_ISA_MACHDEP_H_
-void isa_cats_init __P((u_int, u_int));
-
#include <arm/isa_machdep.h>
-#endif
+
+#ifdef _KERNEL
+#define ISA_FOOTBRIDGE_IRQ IRQ_IN_L2
+void isa_footbridge_init(u_int, u_int);
+#endif /* _KERNEL */
+
+#endif /* _CATS_ISA_MACHDEP_H_ */
@@ -1,4 +1,4 @@
-# $NetBSD: files.netwinder,v 1.13.2.7 2002/10/10 18:34:25 jdolecek Exp $
+# $NetBSD: files.netwinder,v 1.13.2.8 2002/10/18 10:55:01 jdolecek Exp $
#
# First try for arm-specific configuration info
#
@@ -71,7 +71,7 @@ file arch/arm/arm32/spl.S
file arch/arm/arm32/conf.c
# ISA support.
-file arch/netwinder/isa/isa_machdep.c isa
+file arch/arm/footbridge/isa/isa_machdep.c isa
file arch/arm/footbridge/isa/isa_io.c isa
file arch/arm/footbridge/isa/isa_io_asm.S isa
@@ -1,3 +1,13 @@
-/* $NetBSD: isa_machdep.h,v 1.2.2.1 2002/01/10 19:46:46 thorpej Exp $ */
+/* $NetBSD: isa_machdep.h,v 1.2.2.2 2002/10/18 10:55:03 jdolecek Exp $ */
+
+#ifndef _NETWINDER_ISA_MACHDEP_H_
+#define _NETWINDER_ISA_MACHDEP_H_
#include <arm/isa_machdep.h>
+
+#ifdef _KERNEL
+#define ISA_FOOTBRIDGE_IRQ IRQ_IN_L3
+void isa_footbridge_init(u_int, u_int);
+#endif /* _KERNEL */
+
+#endif /* _NETWINDER_ISA_MACHDEP_H_ */
Oops, something went wrong.

0 comments on commit 481586b

Please sign in to comment.