aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/geode/lxfb.h
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2008-04-28 05:15:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:39 -0400
commit9286361beab8ef5c928ecb2bfefe68ab0176238b (patch)
tree0c1860af446ace2aba9887fe047ee85631470146 /drivers/video/geode/lxfb.h
parent3888d4639e78802c4ec1086127124e890461b9e4 (diff)
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,
188#define GP_BS_BLT_BUSY (1 << 0) 188#define GP_BS_BLT_BUSY (1 << 0)
189#define GP_BS_CB_EMPTY (1 << 4) 189#define GP_BS_CB_EMPTY (1 << 4)
190 190
191
192/* register access functions */
193
194static inline uint32_t read_gp(struct lxfb_par *par, int reg)
195{
196 return readl(par->gp_regs + reg);
197}
198
199static inline void write_gp(struct lxfb_par *par, int reg, uint32_t val)
200{
201 writel(val, par->gp_regs + reg);
202}
203
204static inline uint32_t read_dc(struct lxfb_par *par, int reg)
205{
206 return readl(par->dc_regs + reg);
207}
208
209static inline void write_dc(struct lxfb_par *par, int reg, uint32_t val)
210{
211 writel(val, par->dc_regs + reg);
212}
213
214static inline uint32_t read_vp(struct lxfb_par *par, int reg)
215{
216 return readl(par->df_regs + reg);
217}
218
219static inline void write_vp(struct lxfb_par *par, int reg, uint32_t val)
220{
221 writel(val, par->df_regs + reg);
222}
223
224static inline uint32_t read_fp(struct lxfb_par *par, int reg)
225{
226 return readl(par->df_regs + reg);
227}
228
229static inline void write_fp(struct lxfb_par *par, int reg, uint32_t val)
230{
231 writel(val, par->df_regs + reg);
232}
233
191#endif 234#endif