diff options
author | gonzo <gonzo@FreeBSD.org> | 2012-08-25 23:59:31 +0000 |
---|---|---|
committer | gonzo <gonzo@FreeBSD.org> | 2012-08-25 23:59:31 +0000 |
commit | 6e2925b8b45b5d5cc76bd6271b4f44619eef4f5a (patch) | |
tree | 3dfffff58672961e90b482ff50d923de86e5f8b9 /sys/dev | |
parent | 75d2b5c3879aa6b619bc2027fecf74046ae11837 (diff) | |
download | FreeBSD-src-6e2925b8b45b5d5cc76bd6271b4f44619eef4f5a.zip FreeBSD-src-6e2925b8b45b5d5cc76bd6271b4f44619eef4f5a.tar.gz |
Piggyback MIPS changes and add ARM syscons support for devices with
framebuffer
While here - sort #if defined() order alphabetically
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/fb/fbreg.h | 7 | ||||
-rw-r--r-- | sys/dev/syscons/schistory.c | 3 | ||||
-rw-r--r-- | sys/dev/syscons/scterm-teken.c | 3 | ||||
-rw-r--r-- | sys/dev/syscons/syscons.c | 3 |
4 files changed, 12 insertions, 4 deletions
diff --git a/sys/dev/fb/fbreg.h b/sys/dev/fb/fbreg.h index a844c56..e13408a 100644 --- a/sys/dev/fb/fbreg.h +++ b/sys/dev/fb/fbreg.h @@ -92,7 +92,7 @@ void ofwfb_fillw(int pat, void *base, size_t cnt); u_int16_t ofwfb_readw(u_int16_t *addr); void ofwfb_writew(u_int16_t *addr, u_int16_t val); -#elif defined(__mips__) +#elif defined(__mips__) || defined(__arm__) /* * Use amd64/i386-like settings under the assumption that MIPS-based display @@ -115,6 +115,11 @@ fillw(int val, uint16_t *buf, size_t size) } #define fillw_io(p, d, c) fillw((p), (void *)(d), (c)) +#if defined(__arm__) +#define readw(a) (*(uint16_t*)(a)) +#define writew(a, v) (*(uint16_t*)(a) = (v)) +#endif + #else /* !__i386__ && !__amd64__ && !__ia64__ && !__sparc64__ && !__powerpc__ */ #define bcopy_io(s, d, c) memcpy_io((d), (s), (c)) #define bcopy_toio(s, d, c) memcpy_toio((d), (void *)(s), (c)) diff --git a/sys/dev/syscons/schistory.c b/sys/dev/syscons/schistory.c index cb8cfe9..be49983 100644 --- a/sys/dev/syscons/schistory.c +++ b/sys/dev/syscons/schistory.c @@ -42,7 +42,8 @@ __FBSDID("$FreeBSD$"); #include <sys/kernel.h> #include <sys/malloc.h> -#if defined(__sparc64__) || defined(__powerpc__) || defined(__mips__) +#if defined(__arm__) || defined(__mips__) || \ + defined(__powerpc__) || defined(__sparc64__) #include <machine/sc_machdep.h> #else #include <machine/pc/display.h> diff --git a/sys/dev/syscons/scterm-teken.c b/sys/dev/syscons/scterm-teken.c index e3395cb..e2e9118 100644 --- a/sys/dev/syscons/scterm-teken.c +++ b/sys/dev/syscons/scterm-teken.c @@ -40,7 +40,8 @@ __FBSDID("$FreeBSD$"); #include <sys/consio.h> #include <sys/kbio.h> -#if defined(__sparc64__) || defined(__powerpc__) || defined(__mips__) +#if defined(__arm__) || defined(__mips__) || \ + defined(__powerpc__) || defined(__sparc64__) #include <machine/sc_machdep.h> #else #include <machine/pc/display.h> diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index bacbb73..beb0c67 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -62,7 +62,8 @@ __FBSDID("$FreeBSD$"); #include <sys/power.h> #include <machine/clock.h> -#if defined(__sparc64__) || defined(__powerpc__) || defined(__mips__) +#if defined(__arm__) || defined(__mips__) || \ + defined(__powerpc__) || defined(__sparc64__) #include <machine/sc_machdep.h> #else #include <machine/pc/display.h> |