aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/geode/gxfb.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/geode/gxfb.h')
-rw-r--r--drivers/video/geode/gxfb.h31
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
16struct gxfb_par {
17 int enable_crt;
18 void __iomem *dc_regs;
19 void __iomem *vid_regs;
20};
21
22unsigned int gx_frame_buffer_size(void);
23int gx_line_delta(int xres, int bpp);
24void gx_set_mode(struct fb_info *info);
25void gx_set_hw_palette_reg(struct fb_info *info, unsigned regno,
26 unsigned red, unsigned green, unsigned blue);
27
28void gx_set_dclk_frequency(struct fb_info *info);
29void gx_configure_display(struct fb_info *info);
30int 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) */
17enum dc_registers { 34enum 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
224static inline uint32_t read_dc(struct geodefb_par *par, int reg) 241static 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
229static inline void write_dc(struct geodefb_par *par, int reg, uint32_t val) 246static 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
235static inline uint32_t read_vp(struct geodefb_par *par, int reg) 252static 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
240static inline void write_vp(struct geodefb_par *par, int reg, uint32_t val) 257static 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
245static inline uint32_t read_fp(struct geodefb_par *par, int reg) 262static 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
250static inline void write_fp(struct geodefb_par *par, int reg, uint32_t val) 267static 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}