Lines Matching defs:par
43 static void aty_dac_waste4(const struct atyfb_par *par)
45 (void) aty_ld_8(DAC_REGS, par);
47 (void) aty_ld_8(DAC_REGS + 2, par);
48 (void) aty_ld_8(DAC_REGS + 2, par);
49 (void) aty_ld_8(DAC_REGS + 2, par);
50 (void) aty_ld_8(DAC_REGS + 2, par);
53 static void aty_StrobeClock(const struct atyfb_par *par)
59 tmp = aty_ld_8(CLOCK_CNTL, par);
60 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, tmp | CLOCK_STROBE, par);
69 static void aty_st_514(int offset, u8 val, const struct atyfb_par *par)
71 aty_st_8(DAC_CNTL, 1, par);
73 aty_st_8(DAC_W_INDEX, offset & 0xff, par);
75 aty_st_8(DAC_DATA, (offset >> 8) & 0xff, par);
76 aty_st_8(DAC_MASK, val, par);
77 aty_st_8(DAC_CNTL, 0, par);
83 struct atyfb_par *par = (struct atyfb_par *) info->par;
112 aty_st_514(0x90, 0x00, par); /* VRAM Mask Low */
113 aty_st_514(0x04, tab[i].pixel_dly, par); /* Horizontal Sync Control */
114 aty_st_514(0x05, 0x00, par); /* Power Management */
115 aty_st_514(0x02, 0x01, par); /* Misc Clock Control */
116 aty_st_514(0x71, tab[i].misc2_cntl, par); /* Misc Control 2 */
117 aty_st_514(0x0a, tab[i].pixel_rep, par); /* Pixel Format */
118 aty_st_514(tab[i].pixel_cntl_index, tab[i].pixel_cntl_v1, par);
164 struct atyfb_par *par = (struct atyfb_par *) info->par;
171 return ((par->ref_clk_per * ref_div_count) << (3 - df))/
178 struct atyfb_par *par = (struct atyfb_par *) info->par;
180 aty_st_514(0x06, 0x02, par); /* DAC Operation */
181 aty_st_514(0x10, 0x01, par); /* PLL Control 1 */
182 aty_st_514(0x70, 0x01, par); /* Misc Control 1 */
183 aty_st_514(0x8f, 0x1f, par); /* PLL Ref. Divider Input */
184 aty_st_514(0x03, 0x00, par); /* Sync Control */
185 aty_st_514(0x05, 0x00, par); /* Power Management */
186 aty_st_514(0x20, pll->ibm514.m, par); /* F0 / M0 */
187 aty_st_514(0x21, pll->ibm514.n, par); /* F1 / N0 */
209 struct atyfb_par *par = (struct atyfb_par *) info->par;
244 temp = aty_ld_8(DAC_CNTL, par);
246 par);
248 aty_st_8(DAC_REGS + 2, 0x1D, par);
249 aty_st_8(DAC_REGS + 3, gModeReg, par);
250 aty_st_8(DAC_REGS, 0x02, par);
252 temp = aty_ld_8(DAC_CNTL, par);
253 aty_st_8(DAC_CNTL, temp | DAC_EXT_SEL_RS2 | DAC_EXT_SEL_RS3, par);
267 temp = aty_ld_8(DAC_REGS, par);
269 par);
270 temp = aty_ld_8(DAC_CNTL, par);
272 par);
274 aty_st_le32(BUS_CNTL, 0x890e20f1, par);
275 aty_st_le32(DAC_CNTL, 0x47052100, par);
292 struct atyfb_par *par = (struct atyfb_par *) info->par;
324 aty_dac_waste4(par);
325 aty_st_8(DAC_REGS + 2, DACMask, par);
327 aty_st_le32(BUS_CNTL, 0x890e20f1, par);
328 aty_st_le32(DAC_CNTL, 0x00072000, par);
406 static void aty_ICS2595_put1bit(u8 data, const struct atyfb_par *par)
411 tmp = aty_ld_8(CLOCK_CNTL, par);
412 aty_st_8(CLOCK_CNTL + par->clk_wr_offset,
413 (tmp & ~0x04) | (data << 2), par);
415 tmp = aty_ld_8(CLOCK_CNTL, par);
416 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, (tmp & ~0x08) | (0 << 3),
417 par);
419 aty_StrobeClock(par);
421 tmp = aty_ld_8(CLOCK_CNTL, par);
422 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, (tmp & ~0x08) | (1 << 3),
423 par);
425 aty_StrobeClock(par);
432 struct atyfb_par *par = (struct atyfb_par *) info->par;
441 old_clock_cntl = aty_ld_8(CLOCK_CNTL, par);
442 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, 0, par);
444 old_crtc_ext_disp = aty_ld_8(CRTC_GEN_CNTL + 3, par);
446 old_crtc_ext_disp | (CRTC_EXT_DISP_EN >> 24), par);
454 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, 0, par); /* Strobe = 0 */
455 aty_StrobeClock(par);
456 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, 1, par); /* Strobe = 0 */
457 aty_StrobeClock(par);
459 aty_ICS2595_put1bit(1, par); /* Send start bits */
460 aty_ICS2595_put1bit(0, par); /* Start bit */
461 aty_ICS2595_put1bit(0, par); /* Read / ~Write */
464 aty_ICS2595_put1bit(locationAddr & 1, par);
469 aty_ICS2595_put1bit(program_bits & 1, par);
475 (void) aty_ld_8(DAC_REGS, par); /* Clear DAC Counter */
476 aty_st_8(CRTC_GEN_CNTL + 3, old_crtc_ext_disp, par);
477 aty_st_8(CLOCK_CNTL + par->clk_wr_offset,
478 old_clock_cntl | CLOCK_STROBE, par);
481 aty_st_8(CLOCK_CNTL + par->clk_wr_offset,
482 ((pll->ics2595.locationAddr & 0x0F) | CLOCK_STROBE), par);
575 struct atyfb_par *par = (struct atyfb_par *) info->par;
581 old_crtc_ext_disp = aty_ld_8(CRTC_GEN_CNTL + 3, par);
583 old_crtc_ext_disp | (CRTC_EXT_DISP_EN >> 24), par);
589 aty_dac_waste4(par);
591 (void) aty_ld_8(DAC_REGS + 2, par);
592 aty_st_8(DAC_REGS + 2, (locationAddr << 1) + 0x20, par);
593 aty_st_8(DAC_REGS + 2, 0, par);
594 aty_st_8(DAC_REGS + 2, (program_bits & 0xFF00) >> 8, par);
595 aty_st_8(DAC_REGS + 2, (program_bits & 0xFF), par);
597 (void) aty_ld_8(DAC_REGS, par); /* Clear DAC Counter */
598 aty_st_8(CRTC_GEN_CNTL + 3, old_crtc_ext_disp, par);
693 struct atyfb_par *par = (struct atyfb_par *) info->par;
700 old_crtc_ext_disp = aty_ld_8(CRTC_GEN_CNTL + 3, par);
702 old_crtc_ext_disp | (CRTC_EXT_DISP_EN >> 24), par);
708 tmp = aty_ld_8(DAC_CNTL, par);
709 aty_st_8(DAC_CNTL, tmp | DAC_EXT_SEL_RS2 | DAC_EXT_SEL_RS3, par);
711 aty_st_8(DAC_REGS, locationAddr, par);
712 aty_st_8(DAC_REGS + 1, (program_bits & 0xff00) >> 8, par);
713 aty_st_8(DAC_REGS + 1, (program_bits & 0xff), par);
715 tmp = aty_ld_8(DAC_CNTL, par);
717 par);
719 (void) aty_ld_8(DAC_REGS, par); /* Clear DAC Counter */
720 aty_st_8(CRTC_GEN_CNTL + 3, old_crtc_ext_disp, par);
811 struct atyfb_par *par = (struct atyfb_par *) info->par;
818 old_crtc_ext_disp = aty_ld_8(CRTC_GEN_CNTL + 3, par);
820 old_crtc_ext_disp | (CRTC_EXT_DISP_EN >> 24), par);
826 aty_dac_waste4(par);
827 tmpB = aty_ld_8(DAC_REGS + 2, par) | 1;
828 aty_dac_waste4(par);
829 aty_st_8(DAC_REGS + 2, tmpB, par);
836 aty_st_8(DAC_REGS, tmpB, par);
837 aty_st_8(DAC_REGS + 2, tmpA, par);
845 aty_st_8(DAC_REGS, tmpB, par);
846 aty_st_8(DAC_REGS + 2, tmpA, par);
851 aty_st_8(DAC_REGS, tmpB, par);
852 aty_st_8(DAC_REGS + 2, tmpA, par);
857 aty_st_8(DAC_REGS, tmpB, par);
858 aty_st_8(DAC_REGS + 2, tmpA, par);
864 aty_st_8(DAC_REGS, tmpB, par);
865 aty_st_8(DAC_REGS + 2, tmpA, par);
867 (void) aty_ld_8(DAC_REGS, par); /* Clear DAC Counter */
868 aty_st_8(CRTC_GEN_CNTL + 3, old_crtc_ext_disp, par);
887 struct atyfb_par *par = (struct atyfb_par *) info->par;
889 aty_st_le32(BUS_CNTL, 0x890e20f1, par);
890 aty_st_le32(DAC_CNTL, 0x47052100, par);
892 aty_st_le32(BUS_CNTL, 0x590e10ff, par);
893 aty_st_le32(DAC_CNTL, 0x47012100, par);