#include "matroxfb_DAC1064.h"
#include "matroxfb_misc.h"
#include "matroxfb_accel.h"
#include "g450_pll.h"
#include <linux/matroxfb.h>
#ifdef NEED_DAC1064
#define outDAC1064 …
#define inDAC1064 …
#define DAC1064_OPT_SCLK_PCI …
#define DAC1064_OPT_SCLK_PLL …
#define DAC1064_OPT_SCLK_EXT …
#define DAC1064_OPT_SCLK_MASK …
#define DAC1064_OPT_GDIV1 …
#define DAC1064_OPT_GDIV3 …
#define DAC1064_OPT_MDIV1 …
#define DAC1064_OPT_MDIV2 …
#define DAC1064_OPT_RESERVED …
static void DAC1064_calcclock(const struct matrox_fb_info *minfo,
unsigned int freq, unsigned int fmax,
unsigned int *in, unsigned int *feed,
unsigned int *post)
{ … }
static const unsigned char MGA1064_DAC_regs[] = …;
static const unsigned char MGA1064_DAC[] = …;
static void DAC1064_setpclk(struct matrox_fb_info *minfo, unsigned long fout)
{ … }
static void DAC1064_setmclk(struct matrox_fb_info *minfo, int oscinfo,
unsigned long fmem)
{ … }
#ifdef CONFIG_FB_MATROX_G
static void g450_set_plls(struct matrox_fb_info *minfo)
{ … }
#endif
void DAC1064_global_init(struct matrox_fb_info *minfo)
{ … }
void DAC1064_global_restore(struct matrox_fb_info *minfo)
{ … }
static int DAC1064_init_1(struct matrox_fb_info *minfo, struct my_timming *m)
{ … }
static int DAC1064_init_2(struct matrox_fb_info *minfo, struct my_timming *m)
{ … }
static void DAC1064_restore_1(struct matrox_fb_info *minfo)
{
struct matrox_hw_state *hw = &minfo->hw;
CRITFLAGS
DBG(__func__)
CRITBEGIN
if ((inDAC1064(minfo, DAC1064_XSYSPLLM) != hw->DACclk[3]) ||
(inDAC1064(minfo, DAC1064_XSYSPLLN) != hw->DACclk[4]) ||
(inDAC1064(minfo, DAC1064_XSYSPLLP) != hw->DACclk[5])) {
outDAC1064(minfo, DAC1064_XSYSPLLM, hw->DACclk[3]);
outDAC1064(minfo, DAC1064_XSYSPLLN, hw->DACclk[4]);
outDAC1064(minfo, DAC1064_XSYSPLLP, hw->DACclk[5]);
}
{
unsigned int i;
for (i = 0; i < sizeof(MGA1064_DAC_regs); i++) {
if ((i != POS1064_XPIXCLKCTRL) && (i != POS1064_XMISCCTRL))
outDAC1064(minfo, MGA1064_DAC_regs[i], hw->DACreg[i]);
}
}
DAC1064_global_restore(minfo);
CRITEND
};
static void DAC1064_restore_2(struct matrox_fb_info *minfo)
{ … }
static int m1064_compute(void* out, struct my_timming* m) { … }
static struct matrox_altout m1064 = …;
#ifdef CONFIG_FB_MATROX_G
static int g450_compute(void* out, struct my_timming* m) { … }
static struct matrox_altout g450out = …;
#endif
#endif
#ifdef CONFIG_FB_MATROX_MYSTIQUE
static int MGA1064_init(struct matrox_fb_info *minfo, struct my_timming *m)
{ … }
#endif
#ifdef CONFIG_FB_MATROX_G
static int MGAG100_init(struct matrox_fb_info *minfo, struct my_timming *m)
{ … }
#endif
#ifdef CONFIG_FB_MATROX_MYSTIQUE
static void MGA1064_ramdac_init(struct matrox_fb_info *minfo)
{ … }
#endif
#ifdef CONFIG_FB_MATROX_G
static int x7AF4 = …;
#if 0
static int def50 = 0;
#endif
static void MGAG100_progPixClock(const struct matrox_fb_info *minfo, int flags,
int m, int n, int p)
{ … }
static void MGAG100_setPixClock(const struct matrox_fb_info *minfo, int flags,
int freq)
{ … }
#endif
#ifdef CONFIG_FB_MATROX_MYSTIQUE
static int MGA1064_preinit(struct matrox_fb_info *minfo)
{ … }
static void MGA1064_reset(struct matrox_fb_info *minfo)
{ … }
#endif
#ifdef CONFIG_FB_MATROX_G
static void g450_mclk_init(struct matrox_fb_info *minfo)
{ … }
static void g450_memory_init(struct matrox_fb_info *minfo)
{ … }
static void g450_preinit(struct matrox_fb_info *minfo)
{ … }
static int MGAG100_preinit(struct matrox_fb_info *minfo)
{ … }
static void MGAG100_reset(struct matrox_fb_info *minfo)
{ … }
#endif
#ifdef CONFIG_FB_MATROX_MYSTIQUE
static void MGA1064_restore(struct matrox_fb_info *minfo)
{ … }
#endif
#ifdef CONFIG_FB_MATROX_G
static void MGAG100_restore(struct matrox_fb_info *minfo)
{ … }
#endif
#ifdef CONFIG_FB_MATROX_MYSTIQUE
struct matrox_switch matrox_mystique = …;
EXPORT_SYMBOL(…);
#endif
#ifdef CONFIG_FB_MATROX_G
struct matrox_switch matrox_G100 = …;
EXPORT_SYMBOL(…);
#endif
#ifdef NEED_DAC1064
EXPORT_SYMBOL(…);
EXPORT_SYMBOL(…);
#endif
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;