summaryrefslogtreecommitdiffstats
path: root/drivers/video/geode/lxfb.h
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2008-04-28 11:15:24 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 17:58:39 +0200
commit9286361beab8ef5c928ecb2bfefe68ab0176238b (patch)
tree0c1860af446ace2aba9887fe047ee85631470146 /drivers/video/geode/lxfb.h
parentlxfb: extend PLL table to support dotclocks below 25 MHz (diff)
downloadlinux-9286361beab8ef5c928ecb2bfefe68ab0176238b.tar.xz
linux-9286361beab8ef5c928ecb2bfefe68ab0176238b.zip
lxfb: create GP/DC/VP/FP-specific handlers rather than using readl/writel
This creates read_gp/write_gp, read_dc/write_dc, read_vp/write_vp, and read_fp/write_fp for reading and updating those registers. Note that we don't follow the 'DF' naming; those will be renamed to VP shortly. Signed-off-by: Andres Salomon <dilinger@debian.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Jordan Crouse <jordan.crouse@amd.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/geode/lxfb.h')
-rw-r--r--drivers/video/geode/lxfb.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/drivers/video/geode/lxfb.h b/drivers/video/geode/lxfb.h
index 8c83a1b4439b..60579f4d004a 100644
--- a/drivers/video/geode/lxfb.h
+++ b/drivers/video/geode/lxfb.h
@@ -188,4 +188,47 @@ void lx_set_palette_reg(struct fb_info *, unsigned int, unsigned int,
#define GP_BS_BLT_BUSY (1 << 0)
#define GP_BS_CB_EMPTY (1 << 4)
+
+/* register access functions */
+
+static inline uint32_t read_gp(struct lxfb_par *par, int reg)
+{
+ return readl(par->gp_regs + reg);
+}
+
+static inline void write_gp(struct lxfb_par *par, int reg, uint32_t val)
+{
+ writel(val, par->gp_regs + reg);
+}
+
+static inline uint32_t read_dc(struct lxfb_par *par, int reg)
+{
+ return readl(par->dc_regs + reg);
+}
+
+static inline void write_dc(struct lxfb_par *par, int reg, uint32_t val)
+{
+ writel(val, par->dc_regs + reg);
+}
+
+static inline uint32_t read_vp(struct lxfb_par *par, int reg)
+{
+ return readl(par->df_regs + reg);
+}
+
+static inline void write_vp(struct lxfb_par *par, int reg, uint32_t val)
+{
+ writel(val, par->df_regs + reg);
+}
+
+static inline uint32_t read_fp(struct lxfb_par *par, int reg)
+{
+ return readl(par->df_regs + reg);
+}
+
+static inline void write_fp(struct lxfb_par *par, int reg, uint32_t val)
+{
+ writel(val, par->df_regs + reg);
+}
+
#endif