Skip to content

Commit

Permalink
gxfb: move MSR bit fields into gxfb.h
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andres Salomon authored and Linus Torvalds committed Apr 28, 2008
1 parent d255114 commit 9f1277b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 20 deletions.
3 changes: 0 additions & 3 deletions drivers/video/geode/display_gx.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,4 @@ int gx_line_delta(int xres, int bpp);

extern struct geode_dc_ops gx_dc_ops;

/* MSR that tells us if a TFT or CRT is attached */
#define GLD_MSR_CONFIG_DM_FP 0x40

#endif /* !__DISPLAY_GX1_H__ */
16 changes: 16 additions & 0 deletions drivers/video/geode/gxfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,4 +252,20 @@ static inline void write_fp(struct geodefb_par *par, int reg, uint32_t val)
writel(val, par->vid_regs + 8*reg + VP_FP_START);
}


/* MSRs are defined in asm/geode.h; their bitfields are here */

#define MSR_GLCP_SYS_RSTPLL_DOTPOSTDIV3 (1 << 3)
#define MSR_GLCP_SYS_RSTPLL_DOTPREMULT2 (1 << 2)
#define MSR_GLCP_SYS_RSTPLL_DOTPREDIV2 (1 << 1)

#define MSR_GLCP_DOTPLL_LOCK (1 << 25) /* r/o */
#define MSR_GLCP_DOTPLL_BYPASS (1 << 15)
#define MSR_GLCP_DOTPLL_DOTRESET (1 << 0)

#define MSR_GX_MSR_PADSEL_MASK 0x3FFFFFFF /* undocumented? */
#define MSR_GX_MSR_PADSEL_TFT 0x1FFFFFFF /* undocumented? */

#define MSR_GX_GLD_MSR_CONFIG_FP (1 << 3)

#endif
2 changes: 1 addition & 1 deletion drivers/video/geode/gxfb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ static int __init gxfb_probe(struct pci_dev *pdev, const struct pci_device_id *i

rdmsrl(MSR_GX_GLD_MSR_CONFIG, val);

if ((val & GLD_MSR_CONFIG_DM_FP) == GLD_MSR_CONFIG_DM_FP)
if ((val & MSR_GX_GLD_MSR_CONFIG_FP) == MSR_GX_GLD_MSR_CONFIG_FP)
par->enable_crt = 0;
else
par->enable_crt = 1;
Expand Down
4 changes: 2 additions & 2 deletions drivers/video/geode/video_gx.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ gx_configure_tft(struct fb_info *info)
/* Set up the DF pad select MSR */

rdmsrl(MSR_GX_MSR_PADSEL, val);
val &= ~GX_VP_PAD_SELECT_MASK;
val |= GX_VP_PAD_SELECT_TFT;
val &= ~MSR_GX_MSR_PADSEL_MASK;
val |= MSR_GX_MSR_PADSEL_TFT;
wrmsrl(MSR_GX_MSR_PADSEL, val);

/* Turn off the panel */
Expand Down
14 changes: 0 additions & 14 deletions drivers/video/geode/video_gx.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,4 @@

extern struct geode_vid_ops gx_vid_ops;

/* GX Flatpanel control MSR */
#define GX_VP_PAD_SELECT_MASK 0x3FFFFFFF
#define GX_VP_PAD_SELECT_TFT 0x1FFFFFFF

/* Geode GX clock control MSRs */

# define MSR_GLCP_SYS_RSTPLL_DOTPREDIV2 (0x0000000000000002ull)
# define MSR_GLCP_SYS_RSTPLL_DOTPREMULT2 (0x0000000000000004ull)
# define MSR_GLCP_SYS_RSTPLL_DOTPOSTDIV3 (0x0000000000000008ull)

# define MSR_GLCP_DOTPLL_DOTRESET (0x0000000000000001ull)
# define MSR_GLCP_DOTPLL_BYPASS (0x0000000000008000ull)
# define MSR_GLCP_DOTPLL_LOCK (0x0000000002000000ull)

#endif /* !__VIDEO_GX_H__ */

0 comments on commit 9f1277b

Please sign in to comment.