From 080a547d4d42d42e08a525aca9a62b5ece7616d5 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 5 Feb 2005 08:00:14 +0000 Subject: - Implement drm_initmap, and extend it with the resource number to help FreeBSD. Add drm_get_resource_{start|len} so linux-specific stuff doesn't need to be in shared code. - Fix mach64 build by using __DECONST to work around passing a const pointer to useracc, which is unfortunately not marked const. - Get rid of a lot of maplist code by not having dev->maplist be a pointer, and by sticking the link entries directly in drm_local_map_t rather than having a separate structure for the linked list. - Factor out map uninit and removal into its own routine, rather than duplicating in both drm_takedown() and drm_rmmap(). - Hook up more driver functions, and correct FreeBSD-specific bits of radeon_cp.c, making radeon work. - Baby steps towards using bus_space as we should. --- bsd-core/drm_memory.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bsd-core/drm_memory.c') diff --git a/bsd-core/drm_memory.c b/bsd-core/drm_memory.c index 8a49d40e..497cd83f 100644 --- a/bsd-core/drm_memory.c +++ b/bsd-core/drm_memory.c @@ -79,11 +79,11 @@ void *drm_ioremap(drm_device_t *dev, drm_local_map_t *map) #ifdef __FreeBSD__ return pmap_mapdev(map->offset, map->size); #elif defined(__NetBSD__) || defined(__OpenBSD__) - map->iot = dev->pa.pa_memt; - if (bus_space_map(map->iot, map->offset, map->size, - BUS_SPACE_MAP_LINEAR, &map->ioh)) + map->bst = dev->pa.pa_memt; + if (bus_space_map(map->bst, map->offset, map->size, + BUS_SPACE_MAP_LINEAR, &map->bsh)) return NULL; - return bus_space_vaddr(map->iot, map->ioh); + return bus_space_vaddr(map->bst, map->bsh); #endif } @@ -92,7 +92,7 @@ void drm_ioremapfree(drm_local_map_t *map) #ifdef __FreeBSD__ pmap_unmapdev((vm_offset_t) map->handle, map->size); #elif defined(__NetBSD__) || defined(__OpenBSD__) - bus_space_unmap(map->iot, map->ioh, map->size); + bus_space_unmap(map->bst, map->bsh, map->size); #endif } -- cgit v1.2.3