diff options
author | nyan <nyan@FreeBSD.org> | 2002-02-17 09:41:23 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2002-02-17 09:41:23 +0000 |
commit | 22001980c0e3a79547ab6165337ad113341832bc (patch) | |
tree | 3607c09e0fe1e40e8470a9687a464f30e0d67675 /sys/amd64/include | |
parent | 1ed4a21d0776cd372c00c7ab70a145f6e190ca94 (diff) | |
download | FreeBSD-src-22001980c0e3a79547ab6165337ad113341832bc.zip FreeBSD-src-22001980c0e3a79547ab6165337ad113341832bc.tar.gz |
Move the bus_space_subregion function from the puc driver to the bus_space
sutff.
Reviewed by: jhay
Diffstat (limited to 'sys/amd64/include')
-rw-r--r-- | sys/amd64/include/bus_amd64.h | 17 | ||||
-rw-r--r-- | sys/amd64/include/bus_at386.h | 17 |
2 files changed, 28 insertions, 6 deletions
diff --git a/sys/amd64/include/bus_amd64.h b/sys/amd64/include/bus_amd64.h index 4914c54..5cd35d3 100644 --- a/sys/amd64/include/bus_amd64.h +++ b/sys/amd64/include/bus_amd64.h @@ -131,9 +131,20 @@ void bus_space_unmap(bus_space_tag_t t, bus_space_handle_t bsh, * Get a new handle for a subregion of an already-mapped area of bus space. */ -int bus_space_subregion(bus_space_tag_t t, bus_space_handle_t bsh, - bus_size_t offset, bus_size_t size, - bus_space_handle_t *nbshp); +static __inline int bus_space_subregion(bus_space_tag_t t, + bus_space_handle_t bsh, + bus_size_t offset, bus_size_t size, + bus_space_handle_t *nbshp); + +static __inline int +bus_space_subregion(bus_space_tag_t t, bus_space_handle_t bsh, + bus_size_t offset, bus_size_t site, + bus_space_handle_t *nbshp) +{ + + *nbshp = bsh + offset; + return (0); +} /* * Allocate a region of memory that is accessible to devices in bus space. diff --git a/sys/amd64/include/bus_at386.h b/sys/amd64/include/bus_at386.h index 4914c54..5cd35d3 100644 --- a/sys/amd64/include/bus_at386.h +++ b/sys/amd64/include/bus_at386.h @@ -131,9 +131,20 @@ void bus_space_unmap(bus_space_tag_t t, bus_space_handle_t bsh, * Get a new handle for a subregion of an already-mapped area of bus space. */ -int bus_space_subregion(bus_space_tag_t t, bus_space_handle_t bsh, - bus_size_t offset, bus_size_t size, - bus_space_handle_t *nbshp); +static __inline int bus_space_subregion(bus_space_tag_t t, + bus_space_handle_t bsh, + bus_size_t offset, bus_size_t size, + bus_space_handle_t *nbshp); + +static __inline int +bus_space_subregion(bus_space_tag_t t, bus_space_handle_t bsh, + bus_size_t offset, bus_size_t site, + bus_space_handle_t *nbshp) +{ + + *nbshp = bsh + offset; + return (0); +} /* * Allocate a region of memory that is accessible to devices in bus space. |