aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/geode/gxfb.h
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2008-04-28 05:14:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:36 -0400
commitab06aaf6a6d5de896e4c52e158be2881036cbee9 (patch)
tree3d79964d83d71f2e77955e5b4dada8bec5912c40 /drivers/video/geode/gxfb.h
parentfa20c8a6e520d9ccd68c8101155ffdbc19c977c3 (diff)
gxfb: create DC/VP/FP-specific handlers rather than using readl/writel
This creates read_dc/write_dc, read_vp/write_vp, and read_fp/write_fp for reading and updating those registers. It creates gxfb.h to house these. We also drop a no-op readl() from gx_set_mode. Other than that, there should be no functionality change. Signed-off-by: Andres Salomon <dilinger@debian.org> Cc: Jordan Crouse <jordan.crouse@amd.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/geode/gxfb.h')
-rw-r--r--drivers/video/geode/gxfb.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/drivers/video/geode/gxfb.h b/drivers/video/geode/gxfb.h
new file mode 100644
index 000000000000..42fa10db619a
--- /dev/null
+++ b/drivers/video/geode/gxfb.h
@@ -0,0 +1,47 @@
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
14#include <linux/io.h>
15
16static inline uint32_t read_dc(struct geodefb_par *par, int reg)
17{
18 return readl(par->dc_regs + reg);
19}
20
21static inline void write_dc(struct geodefb_par *par, int reg, uint32_t val)
22{
23 writel(val, par->dc_regs + reg);
24
25}
26
27static inline uint32_t read_vp(struct geodefb_par *par, int reg)
28{
29 return readl(par->vid_regs + reg);
30}
31
32static inline void write_vp(struct geodefb_par *par, int reg, uint32_t val)
33{
34 writel(val, par->vid_regs + reg);
35}
36
37static inline uint32_t read_fp(struct geodefb_par *par, int reg)
38{
39 return readl(par->vid_regs + reg);
40}
41
42static inline void write_fp(struct geodefb_par *par, int reg, uint32_t val)
43{
44 writel(val, par->vid_regs + reg);
45}
46
47#endif