| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: bus.h,v 1.16.10.1 2009/09/29 23:53:14 snj Exp $ */ | | 1 | /* $NetBSD: bus.h,v 1.16.10.2 2009/09/29 23:54:36 snj Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | | 8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, |
9 | * NASA Ames Research Center. | | 9 | * NASA Ames Research Center. |
10 | * | | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | | 11 | * Redistribution and use in source and binary forms, with or without |
12 | * modification, are permitted provided that the following conditions | | 12 | * modification, are permitted provided that the following conditions |
13 | * are met: | | 13 | * are met: |
14 | * 1. Redistributions of source code must retain the above copyright | | 14 | * 1. Redistributions of source code must retain the above copyright |
| @@ -68,27 +68,27 @@ | | | @@ -68,27 +68,27 @@ |
68 | | | 68 | |
69 | #ifdef BUS_SPACE_DEBUG | | 69 | #ifdef BUS_SPACE_DEBUG |
70 | #define BUS_SPACE_ALIGNED_ADDRESS(p, t) \ | | 70 | #define BUS_SPACE_ALIGNED_ADDRESS(p, t) \ |
71 | ((((u_long)(p)) & (sizeof(t)-1)) == 0) | | 71 | ((((u_long)(p)) & (sizeof(t)-1)) == 0) |
72 | #define BUS_SPACE_ALIGNED_POINTER(p, t) BUS_SPACE_ALIGNED_ADDRESS(p, t) | | 72 | #define BUS_SPACE_ALIGNED_POINTER(p, t) BUS_SPACE_ALIGNED_ADDRESS(p, t) |
73 | #else | | 73 | #else |
74 | #define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t) | | 74 | #define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t) |
75 | #endif /* BUS_SPACE_DEBUG */ | | 75 | #endif /* BUS_SPACE_DEBUG */ |
76 | | | 76 | |
77 | /* | | 77 | /* |
78 | * Bus address and size types | | 78 | * Bus address and size types |
79 | */ | | 79 | */ |
80 | typedef paddr_t bus_addr_t; | | 80 | typedef paddr_t bus_addr_t; |
81 | typedef paddr_t bus_size_t; | | 81 | typedef size_t bus_size_t; |
82 | | | 82 | |
83 | typedef int bus_space_tag_t; | | 83 | typedef int bus_space_tag_t; |
84 | typedef vaddr_t bus_space_handle_t; | | 84 | typedef vaddr_t bus_space_handle_t; |
85 | | | 85 | |
86 | int _x86_memio_map(bus_space_tag_t t, bus_addr_t addr, | | 86 | int _x86_memio_map(bus_space_tag_t t, bus_addr_t addr, |
87 | bus_size_t size, int flags, bus_space_handle_t *bshp); | | 87 | bus_size_t size, int flags, bus_space_handle_t *bshp); |
88 | void _x86_memio_unmap(bus_space_tag_t t, bus_space_handle_t bsh, | | 88 | void _x86_memio_unmap(bus_space_tag_t t, bus_space_handle_t bsh, |
89 | bus_size_t size, bus_addr_t *); | | 89 | bus_size_t size, bus_addr_t *); |
90 | | | 90 | |
91 | typedef struct x86_bus_dma_tag *bus_dma_tag_t; | | 91 | typedef struct x86_bus_dma_tag *bus_dma_tag_t; |
92 | typedef struct x86_bus_dmamap *bus_dmamap_t; | | 92 | typedef struct x86_bus_dmamap *bus_dmamap_t; |
93 | | | 93 | |
94 | #define BUS_DMA_TAG_VALID(t) ((t) != (bus_dma_tag_t)0) | | 94 | #define BUS_DMA_TAG_VALID(t) ((t) != (bus_dma_tag_t)0) |