unifdef Lynx

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Alan Coopersmith
2024-02-17 15:44:33 -08:00
parent e0d87dd8e6
commit 1252237542
2 changed files with 1 additions and 63 deletions

View File

@@ -170,61 +170,6 @@ inl(short port)
return(*(volatile unsigned long*)(((unsigned short)(port))+IOPortBase));
}
#else /* __arm32__ */
#if defined(Lynx) && defined(__powerpc__)
extern unsigned char *ioBase;
static volatile void
eieio(void)
{
__asm__ __volatile__ ("eieio");
}
static void
outb(short port, unsigned char value)
{
*(uchar *)(ioBase + port) = value; eieio();
}
static void
outw(short port, unsigned short value)
{
*(unsigned short *)(ioBase + port) = value; eieio();
}
static void
outl(short port, unsigned long value)
{
*(unsigned long *)(ioBase + port) = value; eieio();
}
static unsigned char
inb(short port)
{
unsigned char val;
val = *((unsigned char *)(ioBase + port)); eieio();
return(val);
}
static unsigned short
inw(short port)
{
unsigned short val;
val = *((unsigned short *)(ioBase + port)); eieio();
return(val);
}
static unsigned long
inl(short port)
{
unsigned long val;
val = *((unsigned long *)(ioBase + port)); eieio();
return(val);
}
#else
#if defined(__FreeBSD__) && defined(__alpha__)
#include <sys/types.h>
@@ -337,13 +282,12 @@ inl(short port)
}
#endif /* GCCUSESGAS */
#endif /* Lynx && __powerpc__ */
#endif /* arm32 */
#endif /* linux && __sparc__ */
#endif /* linux && __alpha__ */
#endif /* __FreeBSD__ && __alpha__ */
#if defined(linux) || defined(__arm32__) || (defined(Lynx) && defined(__powerpc__))
#if defined(linux) || defined(__arm32__)
#define intr_disable()
#define intr_enable()

View File

@@ -2,9 +2,7 @@
#include <stdio.h>
#include <stdlib.h>
#ifndef Lynx
#include <fnmatch.h>
#endif
#include "iopl.h"
@@ -328,11 +326,7 @@ int main (int argc, char *argv[]) {
}
ClockType = DotClk;
#ifndef Lynx
if (! fnmatch("*memClock",argv[0],FNM_PATHNAME)) {
#else
if (strstr("memClock",argv[0]) != NULL) {
#endif
ClockType = MemClk;
}