diff options
author | Andres Salomon <dilinger@queued.net> | 2008-04-28 02:15:24 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 08:58:39 -0700 |
commit | 9286361beab8ef5c928ecb2bfefe68ab0176238b (patch) | |
tree | 0c1860af446ace2aba9887fe047ee85631470146 /drivers/video/geode/lxfb.h | |
parent | 3888d4639e78802c4ec1086127124e890461b9e4 (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.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/drivers/video/geode/lxfb.h b/drivers/video/geode/lxfb.h index 8c83a1b4439..60579f4d004 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 |