diff options
author | Adam Jackson <ajax@redhat.com> | 2014-05-02 11:50:17 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2014-07-29 09:47:23 -0400 |
commit | a317e0a974c1597d55fe05a38b4a495c4e4e8d71 (patch) | |
tree | bbe71386b492c3679c4deba781cd1ab21553f82a /hw/xfree86/os-support | |
parent | 8a60d1c3f4a62675cad005107f56413f946ecd77 (diff) |
bsd: Remove some reference arm code behind #if 0
git history is reference enough, thanks.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'hw/xfree86/os-support')
-rw-r--r-- | hw/xfree86/os-support/bsd/arm_video.c | 139 |
1 files changed, 0 insertions, 139 deletions
diff --git a/hw/xfree86/os-support/bsd/arm_video.c b/hw/xfree86/os-support/bsd/arm_video.c index 6a977c2db..e295c9244 100644 --- a/hw/xfree86/os-support/bsd/arm_video.c +++ b/hw/xfree86/os-support/bsd/arm_video.c @@ -487,142 +487,3 @@ xf86DisableIO() } #endif /* USE_ARC_MMAP */ - -#if 0 -/* - * XXX This is here for reference. It needs to be handled differently for the - * ND. - */ -#if defined(USE_ARC_MMAP) || defined(__arm32__) - -#ifdef USE_ARM32_MMAP -#define DEV_MEM_IOBASE 0x43000000 -#endif - -static Bool ScreenEnabled[MAXSCREENS]; -static Bool ExtendedEnabled = FALSE; -static Bool InitDone = FALSE; - -Bool -xf86EnableIOPorts(ScreenNum) -int ScreenNum; -{ - int i; - int fd; - void *base; - -#ifdef __arm32__ - struct memAccess *memInfoP; - int *Size; -#endif - - ScreenEnabled[ScreenNum] = TRUE; - - if (ExtendedEnabled) - return TRUE; - -#ifdef USE_ARC_MMAP - if ((fd = open("/dev/ttyC0", O_RDWR)) >= 0) { - /* Try to map a page at the pccons I/O space */ - base = (void *) mmap((caddr_t) 0, 65536, PROT_READ | PROT_WRITE, - MAP_FLAGS, fd, (off_t) 0x0000); - - if (base != (void *) -1) { - IOPortBase = base; - } - else { - xf86Msg(X_ERROR, - "EnableIOPorts: failed to mmap %s (%s)\n", - "/dev/ttyC0", strerror(errno)); - } - } - else { - xf86Msg(X_ERROR, "EnableIOPorts: failed to open %s (%s)\n", - "/dev/ttyC0", strerror(errno)); - } -#endif - -#ifdef __arm32__ - IOPortBase = (unsigned int) -1; - - if ((memInfoP = checkMapInfo(TRUE, MMIO_REGION)) != NULL) { - /* - * xf86MapInfoMap maps an offset from the start of video IO - * space (e.g. 0x3B0), but IOPortBase is expected to map to - * physical address 0x000, so subtract the start of video I/O - * space from the result. This is safe for now becase we - * actually mmap the start of the page, then the start of video - * I/O space is added as an internal offset. - */ - IOPortBase = (unsigned int) xf86MapInfoMap(memInfoP, (caddr_t) 0x0, 0L) - - memInfoP->memInfo.u.map_info_mmap.internal_offset; - ExtendedEnabled = TRUE; - return TRUE; - } -#ifdef USE_ARM32_MMAP - checkDevMem(TRUE); - - if (devMemFd >= 0 && useDevMem) { - base = (void *) mmap((caddr_t) 0, 0x400, PROT_READ | PROT_WRITE, - MAP_FLAGS, devMemFd, (off_t) DEV_MEM_IOBASE); - - if (base != (void *) -1) - IOPortBase = (unsigned int) base; - } - - if (IOPortBase == (unsigned int) -1) { - xf86Msg(X_WARNING, - "xf86EnableIOPorts: failed to open mem device or map IO base. \n\ -Make sure you have the Aperture Driver installed, or a kernel built with the INSECURE option\n"); - return FALSE; - } -#else - /* We don't have the IOBASE, so we can't map the address */ - xf86Msg(X_WARNING, - "xf86EnableIOPorts: failed to open mem device or map IO base. \n\ -Try building the server with USE_ARM32_MMAP defined\n"); - return FALSE; -#endif -#endif - - ExtendedEnabled = TRUE; - - return TRUE; -} - -void -xf86DisableIOPorts(ScreenNum) -int ScreenNum; -{ - int i; - -#ifdef __arm32__ - struct memAccess *memInfoP; -#endif - - ScreenEnabled[ScreenNum] = FALSE; - -#ifdef __arm32__ - if ((memInfoP = checkMapInfo(FALSE, MMIO_REGION)) != NULL) { - xf86MapInfoUnmap(memInfoP, 0); - } -#endif - -#ifdef USE_ARM32_MMAP - if (!ExtendedEnabled) - return; - - for (i = 0; i < MAXSCREENS; i++) - if (ScreenEnabled[i]) - return; - - munmap((caddr_t) IOPortBase, 0x400); - IOPortBase = (unsigned int) -1; - ExtendedEnabled = FALSE; -#endif - - return; -} - -#endif /* USE_ARC_MMAP || USE_ARM32_MMAP */ -#endif |