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);
404 static void aty_ICS2595_put1bit(u8 data, const struct atyfb_par *par)
409 tmp = aty_ld_8(CLOCK_CNTL, par);
410 aty_st_8(CLOCK_CNTL + par->clk_wr_offset,
411 (tmp & ~0x04) | (data << 2), par);
413 tmp = aty_ld_8(CLOCK_CNTL, par);
414 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, (tmp & ~0x08) | (0 << 3),
415 par);
417 aty_StrobeClock(par);
419 tmp = aty_ld_8(CLOCK_CNTL, par);
420 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, (tmp & ~0x08) | (1 << 3),
421 par);
423 aty_StrobeClock(par);
430 struct atyfb_par *par = (struct atyfb_par *) info->par;
439 old_clock_cntl = aty_ld_8(CLOCK_CNTL, par);
440 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, 0, par);
442 old_crtc_ext_disp = aty_ld_8(CRTC_GEN_CNTL + 3, par);
444 old_crtc_ext_disp | (CRTC_EXT_DISP_EN >> 24), par);
452 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, 0, par); /* Strobe = 0 */
453 aty_StrobeClock(par);
454 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, 1, par); /* Strobe = 0 */
455 aty_StrobeClock(par);
457 aty_ICS2595_put1bit(1, par); /* Send start bits */
458 aty_ICS2595_put1bit(0, par); /* Start bit */
459 aty_ICS2595_put1bit(0, par); /* Read / ~Write */
462 aty_ICS2595_put1bit(locationAddr & 1, par);
467 aty_ICS2595_put1bit(program_bits & 1, par);
473 (void) aty_ld_8(DAC_REGS, par); /* Clear DAC Counter */
474 aty_st_8(CRTC_GEN_CNTL + 3, old_crtc_ext_disp, par);
475 aty_st_8(CLOCK_CNTL + par->clk_wr_offset,
476 old_clock_cntl | CLOCK_STROBE, par);
479 aty_st_8(CLOCK_CNTL + par->clk_wr_offset,
480 ((pll->ics2595.locationAddr & 0x0F) | CLOCK_STROBE), par);
573 struct atyfb_par *par = (struct atyfb_par *) info->par;
579 old_crtc_ext_disp = aty_ld_8(CRTC_GEN_CNTL + 3, par);
581 old_crtc_ext_disp | (CRTC_EXT_DISP_EN >> 24), par);
587 aty_dac_waste4(par);
589 (void) aty_ld_8(DAC_REGS + 2, par);
590 aty_st_8(DAC_REGS + 2, (locationAddr << 1) + 0x20, par);
591 aty_st_8(DAC_REGS + 2, 0, par);
592 aty_st_8(DAC_REGS + 2, (program_bits & 0xFF00) >> 8, par);
593 aty_st_8(DAC_REGS + 2, (program_bits & 0xFF), par);
595 (void) aty_ld_8(DAC_REGS, par); /* Clear DAC Counter */
596 aty_st_8(CRTC_GEN_CNTL + 3, old_crtc_ext_disp, par);
691 struct atyfb_par *par = (struct atyfb_par *) info->par;
698 old_crtc_ext_disp = aty_ld_8(CRTC_GEN_CNTL + 3, par);
700 old_crtc_ext_disp | (CRTC_EXT_DISP_EN >> 24), par);
706 tmp = aty_ld_8(DAC_CNTL, par);
707 aty_st_8(DAC_CNTL, tmp | DAC_EXT_SEL_RS2 | DAC_EXT_SEL_RS3, par);
709 aty_st_8(DAC_REGS, locationAddr, par);
710 aty_st_8(DAC_REGS + 1, (program_bits & 0xff00) >> 8, par);
711 aty_st_8(DAC_REGS + 1, (program_bits & 0xff), par);
713 tmp = aty_ld_8(DAC_CNTL, par);
715 par);
717 (void) aty_ld_8(DAC_REGS, par); /* Clear DAC Counter */
718 aty_st_8(CRTC_GEN_CNTL + 3, old_crtc_ext_disp, par);
809 struct atyfb_par *par = (struct atyfb_par *) info->par;
816 old_crtc_ext_disp = aty_ld_8(CRTC_GEN_CNTL + 3, par);
818 old_crtc_ext_disp | (CRTC_EXT_DISP_EN >> 24), par);
824 aty_dac_waste4(par);
825 tmpB = aty_ld_8(DAC_REGS + 2, par) | 1;
826 aty_dac_waste4(par);
827 aty_st_8(DAC_REGS + 2, tmpB, par);
834 aty_st_8(DAC_REGS, tmpB, par);
835 aty_st_8(DAC_REGS + 2, tmpA, par);
843 aty_st_8(DAC_REGS, tmpB, par);
844 aty_st_8(DAC_REGS + 2, tmpA, par);
849 aty_st_8(DAC_REGS, tmpB, par);
850 aty_st_8(DAC_REGS + 2, tmpA, par);
855 aty_st_8(DAC_REGS, tmpB, par);
856 aty_st_8(DAC_REGS + 2, tmpA, par);
862 aty_st_8(DAC_REGS, tmpB, par);
863 aty_st_8(DAC_REGS + 2, tmpA, par);
865 (void) aty_ld_8(DAC_REGS, par); /* Clear DAC Counter */
866 aty_st_8(CRTC_GEN_CNTL + 3, old_crtc_ext_disp, par);
885 struct atyfb_par *par = (struct atyfb_par *) info->par;
887 aty_st_le32(BUS_CNTL, 0x890e20f1, par);
888 aty_st_le32(DAC_CNTL, 0x47052100, par);
890 aty_st_le32(BUS_CNTL, 0x590e10ff, par);
891 aty_st_le32(DAC_CNTL, 0x47012100, par);