]> err.no Git - linux-2.6/blob - drivers/video/geode/gxfb.h
gxfb: create DC/VP/FP-specific handlers rather than using readl/writel
[linux-2.6] / drivers / video / geode / gxfb.h
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
16 static inline uint32_t read_dc(struct geodefb_par *par, int reg)
17 {
18         return readl(par->dc_regs + reg);
19 }
20
21 static inline void write_dc(struct geodefb_par *par, int reg, uint32_t val)
22 {
23         writel(val, par->dc_regs + reg);
24
25 }
26
27 static inline uint32_t read_vp(struct geodefb_par *par, int reg)
28 {
29         return readl(par->vid_regs + reg);
30 }
31
32 static inline void write_vp(struct geodefb_par *par, int reg, uint32_t val)
33 {
34         writel(val, par->vid_regs + reg);
35 }
36
37 static inline uint32_t read_fp(struct geodefb_par *par, int reg)
38 {
39         return readl(par->vid_regs + reg);
40 }
41
42 static 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