aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/geode
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2008-04-28 05:15:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:36 -0400
commit9f1277bd1497858a05a80222a6e98f9c43343491 (patch)
tree8fccb34af16de101fbf43582d8c40611cc3765d5 /drivers/video/geode
parentd255114f22e19b50cf45fcc70963e6a9f287ad40 (diff)
gxfb: move MSR bit fields into gxfb.h
This continues the gxfb header cleanups. MSRs are defined in geode.h; the specific bits we care about are defined in 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')
-rw-r--r--drivers/video/geode/display_gx.h3
-rw-r--r--drivers/video/geode/gxfb.h16
-rw-r--r--drivers/video/geode/gxfb_core.c2
-rw-r--r--drivers/video/geode/video_gx.c4
-rw-r--r--drivers/video/geode/video_gx.h14
5 files changed, 19 insertions, 20 deletions
diff --git a/drivers/video/geode/display_gx.h b/drivers/video/geode/display_gx.h
index 56e9d2ea52c9..ad556d39765c 100644
--- a/drivers/video/geode/display_gx.h
+++ b/drivers/video/geode/display_gx.h
@@ -16,7 +16,4 @@ int gx_line_delta(int xres, int bpp);
16 16
17extern struct geode_dc_ops gx_dc_ops; 17extern struct geode_dc_ops gx_dc_ops;
18 18
19/* MSR that tells us if a TFT or CRT is attached */
20#define GLD_MSR_CONFIG_DM_FP 0x40
21
22#endif /* !__DISPLAY_GX1_H__ */ 19#endif /* !__DISPLAY_GX1_H__ */
diff --git a/drivers/video/geode/gxfb.h b/drivers/video/geode/gxfb.h
index d408ad354d2d..c21f9dc5e0c1 100644
--- a/drivers/video/geode/gxfb.h
+++ b/drivers/video/geode/gxfb.h
@@ -252,4 +252,20 @@ static inline void write_fp(struct geodefb_par *par, int reg, uint32_t val)
252 writel(val, par->vid_regs + 8*reg + VP_FP_START); 252 writel(val, par->vid_regs + 8*reg + VP_FP_START);
253} 253}
254 254
255
256/* MSRs are defined in asm/geode.h; their bitfields are here */
257
258#define MSR_GLCP_SYS_RSTPLL_DOTPOSTDIV3 (1 << 3)
259#define MSR_GLCP_SYS_RSTPLL_DOTPREMULT2 (1 << 2)
260#define MSR_GLCP_SYS_RSTPLL_DOTPREDIV2 (1 << 1)
261
262#define MSR_GLCP_DOTPLL_LOCK (1 << 25) /* r/o */
263#define MSR_GLCP_DOTPLL_BYPASS (1 << 15)
264#define MSR_GLCP_DOTPLL_DOTRESET (1 << 0)
265
266#define MSR_GX_MSR_PADSEL_MASK 0x3FFFFFFF /* undocumented? */
267#define MSR_GX_MSR_PADSEL_TFT 0x1FFFFFFF /* undocumented? */
268
269#define MSR_GX_GLD_MSR_CONFIG_FP (1 << 3)
270
255#endif 271#endif
diff --git a/drivers/video/geode/gxfb_core.c b/drivers/video/geode/gxfb_core.c
index fd58dcc44670..09132513c69a 100644
--- a/drivers/video/geode/gxfb_core.c
+++ b/drivers/video/geode/gxfb_core.c
@@ -328,7 +328,7 @@ static int __init gxfb_probe(struct pci_dev *pdev, const struct pci_device_id *i
328 328
329 rdmsrl(MSR_GX_GLD_MSR_CONFIG, val); 329 rdmsrl(MSR_GX_GLD_MSR_CONFIG, val);
330 330
331 if ((val & GLD_MSR_CONFIG_DM_FP) == GLD_MSR_CONFIG_DM_FP) 331 if ((val & MSR_GX_GLD_MSR_CONFIG_FP) == MSR_GX_GLD_MSR_CONFIG_FP)
332 par->enable_crt = 0; 332 par->enable_crt = 0;
333 else 333 else
334 par->enable_crt = 1; 334 par->enable_crt = 1;
diff --git a/drivers/video/geode/video_gx.c b/drivers/video/geode/video_gx.c
index 1b98b7b4e853..1e26bc422461 100644
--- a/drivers/video/geode/video_gx.c
+++ b/drivers/video/geode/video_gx.c
@@ -187,8 +187,8 @@ gx_configure_tft(struct fb_info *info)
187 /* Set up the DF pad select MSR */ 187 /* Set up the DF pad select MSR */
188 188
189 rdmsrl(MSR_GX_MSR_PADSEL, val); 189 rdmsrl(MSR_GX_MSR_PADSEL, val);
190 val &= ~GX_VP_PAD_SELECT_MASK; 190 val &= ~MSR_GX_MSR_PADSEL_MASK;
191 val |= GX_VP_PAD_SELECT_TFT; 191 val |= MSR_GX_MSR_PADSEL_TFT;
192 wrmsrl(MSR_GX_MSR_PADSEL, val); 192 wrmsrl(MSR_GX_MSR_PADSEL, val);
193 193
194 /* Turn off the panel */ 194 /* Turn off the panel */
diff --git a/drivers/video/geode/video_gx.h b/drivers/video/geode/video_gx.h
index 5457bd04ec74..79f6e818a6f4 100644
--- a/drivers/video/geode/video_gx.h
+++ b/drivers/video/geode/video_gx.h
@@ -13,18 +13,4 @@
13 13
14extern struct geode_vid_ops gx_vid_ops; 14extern struct geode_vid_ops gx_vid_ops;
15 15
16/* GX Flatpanel control MSR */
17#define GX_VP_PAD_SELECT_MASK 0x3FFFFFFF
18#define GX_VP_PAD_SELECT_TFT 0x1FFFFFFF
19
20/* Geode GX clock control MSRs */
21
22# define MSR_GLCP_SYS_RSTPLL_DOTPREDIV2 (0x0000000000000002ull)
23# define MSR_GLCP_SYS_RSTPLL_DOTPREMULT2 (0x0000000000000004ull)
24# define MSR_GLCP_SYS_RSTPLL_DOTPOSTDIV3 (0x0000000000000008ull)
25
26# define MSR_GLCP_DOTPLL_DOTRESET (0x0000000000000001ull)
27# define MSR_GLCP_DOTPLL_BYPASS (0x0000000000008000ull)
28# define MSR_GLCP_DOTPLL_LOCK (0x0000000002000000ull)
29
30#endif /* !__VIDEO_GX_H__ */ 16#endif /* !__VIDEO_GX_H__ */