diff options
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/macppc/include/bus.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/macppc/include/bus.h b/sys/arch/macppc/include/bus.h index 0e3c3b0637a..b56a5f57750 100644 --- a/sys/arch/macppc/include/bus.h +++ b/sys/arch/macppc/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.12 2005/06/08 19:08:23 drahn Exp $ */ +/* $OpenBSD: bus.h,v 1.13 2007/02/07 03:20:37 dlg Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom. All rights reserved. @@ -253,6 +253,8 @@ bus_space_read_raw_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, volatile u_int16_t *s = __BA(tag, bsh, offset); u_int16_t *laddr = (void *)addr; + count = count >> 1; + while (count--) *laddr++ = *s++; __asm __volatile("eieio; sync"); @@ -265,6 +267,8 @@ bus_space_read_raw_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, volatile u_int32_t *s = __BA(tag, bsh, offset); u_int32_t *laddr = (void *)addr; + count = count >> 2; + while (count--) *laddr++ = *s++; __asm __volatile("eieio; sync"); @@ -292,6 +296,8 @@ bus_space_write_raw_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, volatile u_int16_t *d = __BA(tag, bsh, offset); const u_int16_t *laddr = (void *)addr; + count = count >> 1; + while (count--) *d++ = *laddr++; __asm __volatile("eieio; sync"); @@ -304,6 +310,8 @@ bus_space_write_raw_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, volatile u_int32_t *d = __BA(tag, bsh, offset); const u_int32_t *laddr = (void *)addr; + count = count >> 2; + while (count--) *d++ = *laddr++; __asm __volatile("eieio; sync"); |