summaryrefslogtreecommitdiff
path: root/sys/arch/hppa
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r--sys/arch/hppa/hppa/mainbus.c12
-rw-r--r--sys/arch/hppa/include/cpu.h3
-rw-r--r--sys/arch/hppa/include/iomod.h5
3 files changed, 9 insertions, 11 deletions
diff --git a/sys/arch/hppa/hppa/mainbus.c b/sys/arch/hppa/hppa/mainbus.c
index 2e97ac96d40..25ed311bca3 100644
--- a/sys/arch/hppa/hppa/mainbus.c
+++ b/sys/arch/hppa/hppa/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.18 2001/12/02 04:03:57 mickey Exp $ */
+/* $OpenBSD: mainbus.c,v 1.19 2001/12/02 04:10:25 mickey Exp $ */
/*
* Copyright (c) 1998-2001 Michael Shalayeff
@@ -104,9 +104,9 @@ mbus_add_mapping(bus_addr_t bpa, bus_size_t size, int cachable,
/* need a new mapping */
if (!(bmm[flex / 32] & (1 << (flex % 32)))) {
- spa = bpa & FLEX_MASK;
+ spa = bpa & HPPA_FLEX_MASK;
epa = ((u_long)((u_int64_t)bpa + size +
- ~FLEX_MASK - 1) & FLEX_MASK) - 1;
+ ~HPPA_FLEX_MASK - 1) & HPPA_FLEX_MASK) - 1;
#ifdef BTLBDEBUG
printf ("bus_mem_add_mapping: adding flex=%x "
"%qx-%qx, ", flex, spa, epa);
@@ -832,11 +832,11 @@ mbattach(parent, self, aux)
/*
* Local-Broadcast the HPA to all modules on the bus
*/
- ((struct iomod *)(pdc_hpa.hpa & FLEX_MASK))[FPA_IOMOD].io_flex =
- (void *)((pdc_hpa.hpa & FLEX_MASK) | DMA_ENABLE);
+ ((struct iomod *)(pdc_hpa.hpa & HPPA_FLEX_MASK))[FPA_IOMOD].io_flex =
+ (void *)((pdc_hpa.hpa & HPPA_FLEX_MASK) | DMA_ENABLE);
sc->sc_hpa = pdc_hpa.hpa;
- printf (" [flex %x]\n", pdc_hpa.hpa & FLEX_MASK);
+ printf (" [flex %x]\n", pdc_hpa.hpa & HPPA_FLEX_MASK);
/* PDC first */
bzero (&nca, sizeof(nca));
diff --git a/sys/arch/hppa/include/cpu.h b/sys/arch/hppa/include/cpu.h
index a0ee7649a93..562f5a302eb 100644
--- a/sys/arch/hppa/include/cpu.h
+++ b/sys/arch/hppa/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.22 2001/11/08 23:57:35 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.23 2001/12/02 04:10:25 mickey Exp $ */
/*
* Copyright (c) 2000-2001 Michael Shalayeff
@@ -98,6 +98,7 @@ extern const char *cpu_typename;
#define HPPA_FLEX_DATA 0xfff80001
#define HPPA_DMA_ENABLE 0x00000001
#define HPPA_FLEX_MASK 0xfffc0000
+#define HPPA_FLEX(a) (((a) & FLEX_MASK) >> 18)
#define HPPA_SPA_ENABLE 0x00000020
#define HPPA_NMODSPBUS 64
diff --git a/sys/arch/hppa/include/iomod.h b/sys/arch/hppa/include/iomod.h
index cebb469cca8..88d599665ee 100644
--- a/sys/arch/hppa/include/iomod.h
+++ b/sys/arch/hppa/include/iomod.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: iomod.h,v 1.8 2000/05/15 15:16:41 mickey Exp $ */
+/* $OpenBSD: iomod.h,v 1.9 2001/12/02 04:10:25 mickey Exp $ */
/*
* Copyright (c) 2000 Michael Shalayeff
@@ -126,9 +126,6 @@
#define FPA_IOMOD ((FPA_HIGH-FPA_LOW)/sizeof(struct iomod))
#define MAXMODBUS ((int)(FPA_IOMOD)) /* maximum modules/bus */
-#define FLEX_MASK 0xFFFC0000 /* (see below) */
-#define HPPA_FLEX(a) (((a) & FLEX_MASK) >> 18)
-
/* size of HPA space for any device */
#define IOMOD_HPASIZE 0x1000