vga.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright 2010 Tilera Corporation. All Rights Reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation, version 2.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  11. * NON INFRINGEMENT. See the GNU General Public License for
  12. * more details.
  13. *
  14. * Access to VGA videoram.
  15. */
  16. #ifndef _ASM_TILE_VGA_H
  17. #define _ASM_TILE_VGA_H
  18. #include <asm/io.h>
  19. #define VT_BUF_HAVE_RW
  20. static inline void scr_writew(u16 val, volatile u16 *addr)
  21. {
  22. __raw_writew(val, (volatile u16 __iomem *) addr);
  23. }
  24. static inline u16 scr_readw(volatile const u16 *addr)
  25. {
  26. return __raw_readw((volatile const u16 __iomem *) addr);
  27. }
  28. #define vga_readb(a) readb((u8 __iomem *)(a))
  29. #define vga_writeb(v,a) writeb(v, (u8 __iomem *)(a))
  30. #define VGA_MAP_MEM(x,s) ((unsigned long) ioremap(x, s))
  31. #endif