From d1b4cc3ec5f8ddbac57ada58cbab36f5a0be38eb Mon Sep 17 00:00:00 2001 From: Andres Salomon Date: Mon, 28 Apr 2008 02:15:01 -0700 Subject: 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 Cc: Jordan Crouse Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/geode/gxfb.h | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'drivers/video/geode/gxfb.h') diff --git a/drivers/video/geode/gxfb.h b/drivers/video/geode/gxfb.h index c21f9dc5e0c..b8db7f82646 100644 --- a/drivers/video/geode/gxfb.h +++ b/drivers/video/geode/gxfb.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2008 Andres Salomon * - * Geode GX2 register tables + * Geode GX2 header information * * 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 @@ -13,6 +13,23 @@ #include +struct gxfb_par { + int enable_crt; + void __iomem *dc_regs; + void __iomem *vid_regs; +}; + +unsigned int gx_frame_buffer_size(void); +int gx_line_delta(int xres, int bpp); +void gx_set_mode(struct fb_info *info); +void gx_set_hw_palette_reg(struct fb_info *info, unsigned regno, + unsigned red, unsigned green, unsigned blue); + +void gx_set_dclk_frequency(struct fb_info *info); +void gx_configure_display(struct fb_info *info); +int gx_blank_display(struct fb_info *info, int blank_mode); + + /* Display Controller registers (table 6-38 from the data book) */ enum dc_registers { DC_UNLOCK = 0, @@ -221,33 +238,33 @@ enum fp_registers { /* register access functions */ -static inline uint32_t read_dc(struct geodefb_par *par, int reg) +static inline uint32_t read_dc(struct gxfb_par *par, int reg) { return readl(par->dc_regs + 4*reg); } -static inline void write_dc(struct geodefb_par *par, int reg, uint32_t val) +static inline void write_dc(struct gxfb_par *par, int reg, uint32_t val) { writel(val, par->dc_regs + 4*reg); } -static inline uint32_t read_vp(struct geodefb_par *par, int reg) +static inline uint32_t read_vp(struct gxfb_par *par, int reg) { return readl(par->vid_regs + 8*reg); } -static inline void write_vp(struct geodefb_par *par, int reg, uint32_t val) +static inline void write_vp(struct gxfb_par *par, int reg, uint32_t val) { writel(val, par->vid_regs + 8*reg); } -static inline uint32_t read_fp(struct geodefb_par *par, int reg) +static inline uint32_t read_fp(struct gxfb_par *par, int reg) { return readl(par->vid_regs + 8*reg + VP_FP_START); } -static inline void write_fp(struct geodefb_par *par, int reg, uint32_t val) +static inline void write_fp(struct gxfb_par *par, int reg, uint32_t val) { writel(val, par->vid_regs + 8*reg + VP_FP_START); } -- cgit v1.2.3