gxfb.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (C) 2008 Andres Salomon <dilinger@debian.org>
  3. *
  4. * Geode GX2 register tables
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. */
  11. #ifndef _GXFB_H_
  12. #define _GXFB_H_
  13. #include <linux/io.h>
  14. static inline uint32_t read_dc(struct geodefb_par *par, int reg)
  15. {
  16. return readl(par->dc_regs + reg);
  17. }
  18. static inline void write_dc(struct geodefb_par *par, int reg, uint32_t val)
  19. {
  20. writel(val, par->dc_regs + reg);
  21. }
  22. static inline uint32_t read_vp(struct geodefb_par *par, int reg)
  23. {
  24. return readl(par->vid_regs + reg);
  25. }
  26. static inline void write_vp(struct geodefb_par *par, int reg, uint32_t val)
  27. {
  28. writel(val, par->vid_regs + reg);
  29. }
  30. static inline uint32_t read_fp(struct geodefb_par *par, int reg)
  31. {
  32. return readl(par->vid_regs + reg);
  33. }
  34. static inline void write_fp(struct geodefb_par *par, int reg, uint32_t val)
  35. {
  36. writel(val, par->vid_regs + reg);
  37. }
  38. #endif