summaryrefslogtreecommitdiffstats
path: root/sys/dev/fb
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2004-01-21 05:08:51 +0000
committergrehan <grehan@FreeBSD.org>2004-01-21 05:08:51 +0000
commit6825bfd3e64860533b250ccc54967be2d8b28d70 (patch)
treeac9f94e82e66045dc6127b749fe2e03e79c93fce /sys/dev/fb
parent6edaeaeefa6395a99199f8d75a7c77a895ad879d (diff)
downloadFreeBSD-src-6825bfd3e64860533b250ccc54967be2d8b28d70.zip
FreeBSD-src-6825bfd3e64860533b250ccc54967be2d8b28d70.tar.gz
__powerpc__ conditional code for the syscons OpenFirmware/PPC framebuffer.
Took the opportunity to reduce __i386__ || __ia64__ || __amd64__ || __sparc64__ || __powerpc__ to !__alpha__ reviewed by: gallatin
Diffstat (limited to 'sys/dev/fb')
-rw-r--r--sys/dev/fb/fbreg.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/dev/fb/fbreg.h b/sys/dev/fb/fbreg.h
index e7c91b6..7db6315 100644
--- a/sys/dev/fb/fbreg.h
+++ b/sys/dev/fb/fbreg.h
@@ -75,7 +75,23 @@ fillw(int val, uint16_t *buf, size_t size)
while (size--)
*buf++ = val;
}
-#else /* !__i386__ && !__ia64__ && !__amd64__ */
+#elif __powerpc__
+
+#define bcopy_io(s, d, c) ofwfb_bcopy((void *)(s), (void *)(d), (c))
+#define bcopy_toio(s, d, c) ofwfb_bcopy((void *)(s), (void *)(d), (c))
+#define bcopy_fromio(s, d, c) ofwfb_bcopy((void *)(s), (void *)(d), (c))
+#define bzero_io(d, c) ofwfb_bzero((void *)(d), (c))
+#define fillw(p, d, c) ofwfb_fillw((p), (void *)(d), (c))
+#define fillw_io(p, d, c) ofwfb_fillw((p), (void *)(d), (c))
+#define readw(a) ofwfb_readw((u_int16_t *)(a))
+#define writew(a, v) ofwfb_writew((u_int16_t *)(a), (v))
+void ofwfb_bcopy(const void *s, void *d, size_t c);
+void ofwfb_bzero(void *d, size_t c);
+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);
+
+#else /* !__i386__ && !__ia64__ && !__amd64__ && !__powerpc__ */
#define bcopy_io(s, d, c) memcpy_io((d), (s), (c))
#define bcopy_toio(s, d, c) memcpy_toio((d), (void *)(s), (c))
#define bcopy_fromio(s, d, c) memcpy_fromio((void *)(d), (s), (c))
OpenPOWER on IntegriCloud