diff options
| author | Oleksandr Tymoshenko <gonzo@FreeBSD.org> | 2012-08-25 23:59:31 +0000 |
|---|---|---|
| committer | Oleksandr Tymoshenko <gonzo@FreeBSD.org> | 2012-08-25 23:59:31 +0000 |
| commit | e1f04cd0240e749697bf69b820499841ffdbdd82 (patch) | |
| tree | 3dfffff58672961e90b482ff50d923de86e5f8b9 /sys/dev/fb | |
| parent | 69714daa44b01b3d961c51bb77ee05f35338caa9 (diff) | |
Notes
Diffstat (limited to 'sys/dev/fb')
| -rw-r--r-- | sys/dev/fb/fbreg.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/fb/fbreg.h b/sys/dev/fb/fbreg.h index a844c56a0af3..e13408a66eca 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)) |
