diff options
author | Andres Salomon <dilinger@queued.net> | 2008-04-28 05:15:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:36 -0400 |
commit | d1b4cc3ec5f8ddbac57ada58cbab36f5a0be38eb (patch) | |
tree | 76f9fa67cf3f717f22f1a293a4ca2c23cadc975e /drivers/video/geode/gxfb.h | |
parent | 9f1277bd1497858a05a80222a6e98f9c43343491 (diff) |
gxfb: stop sharing code with gx1fb
We want to stop sharing stuff with gx1fb; it makes little sense. There were
fields in geodefb_par that weren't being used, there was little point to the
DC/VP ops callbacks, etc. This implements the following:
- Create gxfb_par (based on geodefb_par), place it in gxfb.h
- Drop display_gx.h and video_gx.h. The last few patches moved most
stuff into gxfb.h anyways, so there was very little left.
- Drop the geode_{dc,vid}_ops stuff. Un-static functions, add
declarations to gxfb.h.
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.h | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/drivers/video/geode/gxfb.h b/drivers/video/geode/gxfb.h index c21f9dc5e0c1..b8db7f82646c 100644 --- a/drivers/video/geode/gxfb.h +++ b/drivers/video/geode/gxfb.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2008 Andres Salomon <dilinger@debian.org> | 2 | * Copyright (C) 2008 Andres Salomon <dilinger@debian.org> |
3 | * | 3 | * |
4 | * Geode GX2 register tables | 4 | * Geode GX2 header information |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 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 | 7 | * it under the terms of the GNU General Public License as published by |
@@ -13,6 +13,23 @@ | |||
13 | 13 | ||
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | 15 | ||
16 | struct gxfb_par { | ||
17 | int enable_crt; | ||
18 | void __iomem *dc_regs; | ||
19 | void __iomem *vid_regs; | ||
20 | }; | ||
21 | |||
22 | unsigned int gx_frame_buffer_size(void); | ||
23 | int gx_line_delta(int xres, int bpp); | ||
24 | void gx_set_mode(struct fb_info *info); | ||
25 | void gx_set_hw_palette_reg(struct fb_info *info, unsigned regno, | ||
26 | unsigned red, unsigned green, unsigned blue); | ||
27 | |||
28 | void gx_set_dclk_frequency(struct fb_info *info); | ||
29 | void gx_configure_display(struct fb_info *info); | ||
30 | int gx_blank_display(struct fb_info *info, int blank_mode); | ||
31 | |||
32 | |||
16 | /* Display Controller registers (table 6-38 from the data book) */ | 33 | /* Display Controller registers (table 6-38 from the data book) */ |
17 | enum dc_registers { | 34 | enum dc_registers { |
18 | DC_UNLOCK = 0, | 35 | DC_UNLOCK = 0, |
@@ -221,33 +238,33 @@ enum fp_registers { | |||
221 | 238 | ||
222 | /* register access functions */ | 239 | /* register access functions */ |
223 | 240 | ||
224 | static inline uint32_t read_dc(struct geodefb_par *par, int reg) | 241 | static inline uint32_t read_dc(struct gxfb_par *par, int reg) |
225 | { | 242 | { |
226 | return readl(par->dc_regs + 4*reg); | 243 | return readl(par->dc_regs + 4*reg); |
227 | } | 244 | } |
228 | 245 | ||
229 | static inline void write_dc(struct geodefb_par *par, int reg, uint32_t val) | 246 | static inline void write_dc(struct gxfb_par *par, int reg, uint32_t val) |
230 | { | 247 | { |
231 | writel(val, par->dc_regs + 4*reg); | 248 | writel(val, par->dc_regs + 4*reg); |
232 | } | 249 | } |
233 | 250 | ||
234 | 251 | ||
235 | static inline uint32_t read_vp(struct geodefb_par *par, int reg) | 252 | static inline uint32_t read_vp(struct gxfb_par *par, int reg) |
236 | { | 253 | { |
237 | return readl(par->vid_regs + 8*reg); | 254 | return readl(par->vid_regs + 8*reg); |
238 | } | 255 | } |
239 | 256 | ||
240 | static inline void write_vp(struct geodefb_par *par, int reg, uint32_t val) | 257 | static inline void write_vp(struct gxfb_par *par, int reg, uint32_t val) |
241 | { | 258 | { |
242 | writel(val, par->vid_regs + 8*reg); | 259 | writel(val, par->vid_regs + 8*reg); |
243 | } | 260 | } |
244 | 261 | ||
245 | static inline uint32_t read_fp(struct geodefb_par *par, int reg) | 262 | static inline uint32_t read_fp(struct gxfb_par *par, int reg) |
246 | { | 263 | { |
247 | return readl(par->vid_regs + 8*reg + VP_FP_START); | 264 | return readl(par->vid_regs + 8*reg + VP_FP_START); |
248 | } | 265 | } |
249 | 266 | ||
250 | static inline void write_fp(struct geodefb_par *par, int reg, uint32_t val) | 267 | static inline void write_fp(struct gxfb_par *par, int reg, uint32_t val) |
251 | { | 268 | { |
252 | writel(val, par->vid_regs + 8*reg + VP_FP_START); | 269 | writel(val, par->vid_regs + 8*reg + VP_FP_START); |
253 | } | 270 | } |