| @@ -2129,15 +2129,30 @@ DRM_WRITE32(struct drm_local_map *map, b | | | @@ -2129,15 +2129,30 @@ DRM_WRITE32(struct drm_local_map *map, b |
2129 | } | | 2129 | } |
2130 | | | 2130 | |
2131 | static inline void | | 2131 | static inline void |
2132 | DRM_WRITE64(struct drm_local_map *map, bus_size_t offset, uint64_t value) | | 2132 | DRM_WRITE64(struct drm_local_map *map, bus_size_t offset, uint64_t value) |
2133 | { | | 2133 | { |
2134 | if (DRM_IS_BUS_SPACE(map)) | | 2134 | if (DRM_IS_BUS_SPACE(map)) |
2135 | bus_space_write_8(map->lm_data.bus_space.bst, | | 2135 | bus_space_write_8(map->lm_data.bus_space.bst, |
2136 | map->lm_data.bus_space.bsh, offset, value); | | 2136 | map->lm_data.bus_space.bsh, offset, value); |
2137 | else | | 2137 | else |
2138 | *(volatile uint64_t *)((vaddr_t)map->handle + offset) = value; | | 2138 | *(volatile uint64_t *)((vaddr_t)map->handle + offset) = value; |
2139 | } | | 2139 | } |
2140 | #endif /* defined(__NetBSD__) */ | | 2140 | #endif /* defined(__NetBSD__) */ |
2141 | | | 2141 | |
| | | 2142 | #ifdef __NetBSD__ |
| | | 2143 | |
| | | 2144 | /* XXX This is pretty kludgerific. */ |
| | | 2145 | |
| | | 2146 | #include <linux/io-mapping.h> |
| | | 2147 | |
| | | 2148 | static inline struct io_mapping * |
| | | 2149 | drm_io_mapping_create_wc(struct drm_device *dev, resource_size_t addr, |
| | | 2150 | unsigned long size) |
| | | 2151 | { |
| | | 2152 | return bus_space_io_mapping_create_wc(dev->bst, addr, size); |
| | | 2153 | } |
| | | 2154 | |
| | | 2155 | #endif /* defined(__NetBSD__) */ |
| | | 2156 | |
2142 | #endif /* __KERNEL__ */ | | 2157 | #endif /* __KERNEL__ */ |
2143 | #endif | | 2158 | #endif |