From 6825bfd3e64860533b250ccc54967be2d8b28d70 Mon Sep 17 00:00:00 2001 From: grehan Date: Wed, 21 Jan 2004 05:08:51 +0000 Subject: __powerpc__ conditional code for the syscons OpenFirmware/PPC framebuffer. Took the opportunity to reduce __i386__ || __ia64__ || __amd64__ || __sparc64__ || __powerpc__ to !__alpha__ reviewed by: gallatin --- sys/dev/syscons/scgfbrndr.c | 5 ++++- sys/dev/syscons/schistory.c | 2 +- sys/dev/syscons/scterm-dumb.c | 2 +- sys/dev/syscons/scterm-sc.c | 2 +- sys/dev/syscons/syscons.c | 20 ++++++++++---------- 5 files changed, 17 insertions(+), 14 deletions(-) (limited to 'sys/dev/syscons') diff --git a/sys/dev/syscons/scgfbrndr.c b/sys/dev/syscons/scgfbrndr.c index b031214..cba157e 100644 --- a/sys/dev/syscons/scgfbrndr.c +++ b/sys/dev/syscons/scgfbrndr.c @@ -34,6 +34,9 @@ __FBSDID("$FreeBSD$"); #ifdef __sparc64__ #include "opt_creator.h" #endif +#ifdef __powerpc__ +#include "opt_ofwfb.h" +#endif #include #include @@ -210,7 +213,7 @@ gfb_cursor_shape(scr_stat *scp, int base, int height, int blink) static int pxlblinkrate = 0; -#ifdef DEV_CREATOR +#if defined(DEV_CREATOR) || defined(SC_OFWFB) static void gfb_cursor(scr_stat *scp, int at, int blink, int on, int flip) { diff --git a/sys/dev/syscons/schistory.c b/sys/dev/syscons/schistory.c index 1986d12..c83048e 100644 --- a/sys/dev/syscons/schistory.c +++ b/sys/dev/syscons/schistory.c @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef __sparc64__ +#if __sparc64__ || __powerpc__ #include #else #include diff --git a/sys/dev/syscons/scterm-dumb.c b/sys/dev/syscons/scterm-dumb.c index d4831b7..4e93a6a 100644 --- a/sys/dev/syscons/scterm-dumb.c +++ b/sys/dev/syscons/scterm-dumb.c @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef __sparc64__ +#if __sparc64__ || __powerpc__ #include #else #include diff --git a/sys/dev/syscons/scterm-sc.c b/sys/dev/syscons/scterm-sc.c index ad7d655..0f27935 100644 --- a/sys/dev/syscons/scterm-sc.c +++ b/sys/dev/syscons/scterm-sc.c @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef __sparc64__ +#if __sparc64__ || __powerpc__ #include #else #include diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index da76ed3..b054b41 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef __sparc64__ +#if __sparc64__ || __powerpc__ #include #else #include @@ -150,7 +150,7 @@ static kbd_callback_func_t sckbdevent; static int scparam(struct tty *tp, struct termios *t); static void scstart(struct tty *tp); static void scinit(int unit, int flags); -#if __i386__ || __ia64__ || __amd64__ || __sparc64__ +#if !__alpha__ static void scterm(int unit, int flags); #endif static void scshutdown(void *arg, int howto); @@ -1378,7 +1378,7 @@ scstart(struct tty *tp) static void sccnprobe(struct consdev *cp) { -#if __i386__ || __ia64__ || __amd64__ || __sparc64__ +#if !__alpha__ int unit; int flags; @@ -1396,7 +1396,7 @@ sccnprobe(struct consdev *cp) /* initialize required fields */ sprintf(cp->cn_name, "consolectl"); -#endif /* __i386__ || __ia64__ || __amd64__ || __sparc64__ */ +#endif /* !__alpha__ */ #if __alpha__ /* @@ -1411,7 +1411,7 @@ sccnprobe(struct consdev *cp) static void sccninit(struct consdev *cp) { -#if __i386__ || __ia64__ || __amd64__ || __sparc64__ +#if !__alpha__ int unit; int flags; @@ -1419,7 +1419,7 @@ sccninit(struct consdev *cp) scinit(unit, flags | SC_KERNEL_CONSOLE); sc_console_unit = unit; sc_console = SC_STAT(sc_get_softc(unit, SC_KERNEL_CONSOLE)->dev[0]); -#endif /* __i386__ || __ia64__ || __amd64__ || __sparc64__ */ +#endif /* !__alpha__ */ #if __alpha__ /* SHOULDN'T REACH HERE */ @@ -1434,7 +1434,7 @@ sccnterm(struct consdev *cp) if (sc_console_unit < 0) return; /* shouldn't happen */ -#if __i386__ || __ia64__ || __amd64__ || __sparc64__ +#if !__alpha__ #if 0 /* XXX */ sc_clear_screen(sc_console); sccnupdate(sc_console); @@ -1442,7 +1442,7 @@ sccnterm(struct consdev *cp) scterm(sc_console_unit, SC_KERNEL_CONSOLE); sc_console_unit = -1; sc_console = NULL; -#endif /* __i386__ || __ia64__ || __amd64__ || __sparc64__ */ +#endif /* !__alpha__ */ #if __alpha__ /* do nothing XXX */ @@ -2845,7 +2845,7 @@ scinit(int unit, int flags) sc->flags |= SC_INIT_DONE; } -#if __i386__ || __ia64__ || __amd64__ || __sparc64__ +#if !__alpha__ static void scterm(int unit, int flags) { @@ -2901,7 +2901,7 @@ scterm(int unit, int flags) sc->keyboard = -1; sc->adapter = -1; } -#endif /* __i386__ || __ia64__ || __amd64__ || __sparc64__ */ +#endif /* !__alpha__ */ static void scshutdown(void *arg, int howto) -- cgit v1.1