diff options
author | 1998-08-25 07:45:28 +0000 | |
---|---|---|
committer | 1998-08-25 07:45:28 +0000 | |
commit | 9ffe515171047d32dd86d60b52dd1d0299dc1bf3 (patch) | |
tree | e69b46e01a1dbcb0d329a33126fab6bcf22b95fa | |
parent | Make faultbuf a struct (diff) | |
download | wireguard-openbsd-9ffe515171047d32dd86d60b52dd1d0299dc1bf3.tar.xz wireguard-openbsd-9ffe515171047d32dd86d60b52dd1d0299dc1bf3.zip |
Use symbolic names
-rw-r--r-- | sys/arch/powerpc/include/pio.h | 10 | ||||
-rw-r--r-- | sys/arch/powerpc/powerpc/clock.c | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/sys/arch/powerpc/include/pio.h b/sys/arch/powerpc/include/pio.h index 64259e455e2..4d411f3bef6 100644 --- a/sys/arch/powerpc/include/pio.h +++ b/sys/arch/powerpc/include/pio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pio.h,v 1.2 1998/08/06 15:03:57 pefo Exp $ */ +/* $OpenBSD: pio.h,v 1.3 1998/08/25 07:45:28 pefo Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom, Opsycon AB and RTMX Inc, USA. @@ -169,7 +169,7 @@ __inlrb(a) #define inlrb(a) (__inlrb((volatile u_int32_t *)(a))) #define in32rb(a) inlrb(a) -#ifdef DEBUG +#ifdef DEBUG_SPEC static __inline void __flash_led(bits, count) int bits; @@ -181,13 +181,13 @@ __flash_led(bits, count) } bits &= 3; count += count; - v |= (*(volatile u_int8_t *)0x800001f4) & ~3; + v |= (*(volatile u_int8_t *)(MPC106_V_ISA_IO_SPACE + 0x01f4)) & ~3; while(count--) { v ^= bits; for(i = 100000; i > 0; i--) - *(volatile u_int8_t *)0x800001f4 = v; + *(volatile u_int8_t *)(MPC106_V_ISA_IO_SPACE + 0x01f4) = v; } - *(u_int8_t *)0x800001f4 &= ~3; + *(u_int8_t *)(MPC106_V_ISA_IO_SPACE + 0x01f4) &= ~3; } #endif /* DEBUG */ diff --git a/sys/arch/powerpc/powerpc/clock.c b/sys/arch/powerpc/powerpc/clock.c index c4ed7db7457..27c8149319d 100644 --- a/sys/arch/powerpc/powerpc/clock.c +++ b/sys/arch/powerpc/powerpc/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $ */ +/* $OpenBSD: clock.c,v 1.4 1998/08/25 07:46:58 pefo Exp $ */ /* $NetBSD: clock.c,v 1.1 1996/09/30 16:34:40 ws Exp $ */ /* @@ -37,6 +37,8 @@ #include <machine/pio.h> +#include <powerpc/pci/mpc106reg.h> + void resettodr(); /* * Initially we assume a processor with a bus frequency of 12.5 MHz. @@ -330,7 +332,7 @@ power4e_getclock(sec, min, hour, day, mon, year) int *mon; int *year; { - int clkbase = 0xc00f1ff8; + int clkbase = MPC106_V_PCI_MEM_SPACE + 0x000f1ff8; outb(clkbase, inb(clkbase) | 0x40); /* stop update */ *sec = inb(clkbase + 1); |