From ab06aaf6a6d5de896e4c52e158be2881036cbee9 Mon Sep 17 00:00:00 2001 From: Andres Salomon Date: Mon, 28 Apr 2008 02:14:58 -0700 Subject: 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 Cc: Jordan Crouse Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/geode/gxfb.h | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 drivers/video/geode/gxfb.h (limited to 'drivers/video/geode/gxfb.h') diff --git a/drivers/video/geode/gxfb.h b/drivers/video/geode/gxfb.h new file mode 100644 index 00000000000..42fa10db619 --- /dev/null +++ b/drivers/video/geode/gxfb.h @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2008 Andres Salomon + * + * Geode GX2 register tables + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ +#ifndef _GXFB_H_ +#define _GXFB_H_ + +#include + +static inline uint32_t read_dc(struct geodefb_par *par, int reg) +{ + return readl(par->dc_regs + reg); +} + +static inline void write_dc(struct geodefb_par *par, int reg, uint32_t val) +{ + writel(val, par->dc_regs + reg); + +} + +static inline uint32_t read_vp(struct geodefb_par *par, int reg) +{ + return readl(par->vid_regs + reg); +} + +static inline void write_vp(struct geodefb_par *par, int reg, uint32_t val) +{ + writel(val, par->vid_regs + reg); +} + +static inline uint32_t read_fp(struct geodefb_par *par, int reg) +{ + return readl(par->vid_regs + reg); +} + +static inline void write_fp(struct geodefb_par *par, int reg, uint32_t val) +{ + writel(val, par->vid_regs + reg); +} + +#endif -- cgit v1.2.3