Lines Matching +full:read +full:- +full:strobe +full:- +full:delay

1 // SPDX-License-Identifier: GPL-2.0
7 #include <linux/delay.h>
36 #define MAX_N 255-8
60 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, tmp | CLOCK_STROBE, par); in aty_StrobeClock()
83 struct atyfb_par *par = (struct atyfb_par *) info->par; in aty_set_dac_514()
154 pll->ibm514.m = RGB514_clocks[i].m; in aty_var_to_pll_514()
155 pll->ibm514.n = RGB514_clocks[i].n; in aty_var_to_pll_514()
158 return -EINVAL; in aty_var_to_pll_514()
164 struct atyfb_par *par = (struct atyfb_par *) info->par; in aty_pll_514_to_var()
167 df = pll->ibm514.m >> 6; in aty_pll_514_to_var()
168 vco_div_count = pll->ibm514.m & 0x3f; in aty_pll_514_to_var()
169 ref_div_count = pll->ibm514.n; in aty_pll_514_to_var()
171 return ((par->ref_clk_per * ref_div_count) << (3 - df))/ in aty_pll_514_to_var()
178 struct atyfb_par *par = (struct atyfb_par *) info->par; in aty_set_pll_514()
186 aty_st_514(0x20, pll->ibm514.m, par); /* F0 / M0 */ in aty_set_pll_514()
187 aty_st_514(0x21, pll->ibm514.n, par); /* F1 / N0 */ in aty_set_pll_514()
202 * ATI 68860-B DAC
209 struct atyfb_par *par = (struct atyfb_par *) info->par; in aty_set_dac_ATI68860_B()
219 0x60 | 0x00 /*(info->mach64DAC8Bit ? 0x00 : 0x01) */ ; in aty_set_dac_ATI68860_B()
255 if (info->fix.smem_len < ONE_MB) in aty_set_dac_ATI68860_B()
257 else if (info->fix.smem_len == ONE_MB) in aty_set_dac_ATI68860_B()
292 struct atyfb_par *par = (struct atyfb_par *) info->par; in aty_set_dac_ATT21C498()
297 dotClock = 100000000 / pll->ics2595.period_in_ps; in aty_set_dac_ATT21C498()
321 if (1 /* info->mach64DAC8Bit */ ) in aty_set_dac_ATT21C498()
351 program_bits = -1; in aty_var_to_pll_18818()
355 return -EINVAL; in aty_var_to_pll_18818()
357 return -EINVAL; in aty_var_to_pll_18818()
370 if (program_bits == -1) { in aty_var_to_pll_18818()
371 program_bits = MHz100 - N_ADJ_2595; in aty_var_to_pll_18818()
390 pll->ics2595.program_bits = program_bits; in aty_var_to_pll_18818()
391 pll->ics2595.locationAddr = 0; in aty_var_to_pll_18818()
392 pll->ics2595.post_divider = post_divider; in aty_var_to_pll_18818()
393 pll->ics2595.period_in_ps = vclk_per; in aty_var_to_pll_18818()
401 return (pll->ics2595.period_in_ps); /* default for now */ in aty_pll_18818_to_var()
410 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, in aty_ICS2595_put1bit()
414 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, (tmp & ~0x08) | (0 << 3), in aty_ICS2595_put1bit()
420 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, (tmp & ~0x08) | (1 << 3), in aty_ICS2595_put1bit()
430 struct atyfb_par *par = (struct atyfb_par *) info->par; in aty_set_pll18818()
440 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, 0, par); in aty_set_pll18818()
446 mdelay(15); /* delay for 50 (15) ms */ in aty_set_pll18818()
448 program_bits = pll->ics2595.program_bits; in aty_set_pll18818()
449 locationAddr = pll->ics2595.locationAddr; in aty_set_pll18818()
452 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, 0, par); /* Strobe = 0 */ in aty_set_pll18818()
454 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, 1, par); /* Strobe = 0 */ in aty_set_pll18818()
459 aty_ICS2595_put1bit(0, par); /* Read / ~Write */ in aty_set_pll18818()
471 mdelay(1); /* delay for 1 ms */ in aty_set_pll18818()
475 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, in aty_set_pll18818()
478 mdelay(50); /* delay for 50 (15) ms */ in aty_set_pll18818()
479 aty_st_8(CLOCK_CNTL + par->clk_wr_offset, in aty_set_pll18818()
480 ((pll->ics2595.locationAddr & 0x0F) | CLOCK_STROBE), par); in aty_set_pll18818()
529 temp -= (short) (mach64RefFreq << 1); in aty_var_to_pll_1703()
556 pll->ics2595.program_bits = program_bits; in aty_var_to_pll_1703()
557 pll->ics2595.locationAddr = 0; in aty_var_to_pll_1703()
558 pll->ics2595.post_divider = divider; /* fuer nix */ in aty_var_to_pll_1703()
559 pll->ics2595.period_in_ps = vclk_per; in aty_var_to_pll_1703()
567 return (pll->ics2595.period_in_ps); /* default for now */ in aty_pll_1703_to_var()
573 struct atyfb_par *par = (struct atyfb_par *) info->par; in aty_set_pll_1703()
583 program_bits = pll->ics2595.program_bits; in aty_set_pll_1703()
584 locationAddr = pll->ics2595.locationAddr; in aty_set_pll_1703()
659 diff = longMHz100 - fOut; in aty_var_to_pll_8398()
661 diff = fOut - longMHz100; in aty_var_to_pll_8398()
674 pll->ics2595.program_bits = program_bits; in aty_var_to_pll_8398()
675 pll->ics2595.locationAddr = 0; in aty_var_to_pll_8398()
676 pll->ics2595.post_divider = 0; in aty_var_to_pll_8398()
677 pll->ics2595.period_in_ps = vclk_per; in aty_var_to_pll_8398()
685 return (pll->ics2595.period_in_ps); /* default for now */ in aty_pll_8398_to_var()
691 struct atyfb_par *par = (struct atyfb_par *) info->par; in aty_set_pll_8398()
702 program_bits = pll->ics2595.program_bits; in aty_set_pll_8398()
703 locationAddr = pll->ics2595.locationAddr; in aty_set_pll_8398()
767 temp -= ((short) (mach64RefFreq << 1)); in aty_var_to_pll_408()
792 pll->ics2595.program_bits = program_bits; in aty_var_to_pll_408()
793 pll->ics2595.locationAddr = 0; in aty_var_to_pll_408()
794 pll->ics2595.post_divider = divider; /* fuer nix */ in aty_var_to_pll_408()
795 pll->ics2595.period_in_ps = vclk_per; in aty_var_to_pll_408()
803 return (pll->ics2595.period_in_ps); /* default for now */ in aty_pll_408_to_var()
809 struct atyfb_par *par = (struct atyfb_par *) info->par; in aty_set_pll_408()
820 program_bits = pll->ics2595.program_bits; in aty_set_pll_408()
821 locationAddr = pll->ics2595.locationAddr; in aty_set_pll_408()
837 udelay(400); /* delay for 400 us */ in aty_set_pll_408()
858 udelay(400); /* delay for 400 us */ in aty_set_pll_408()
885 struct atyfb_par *par = (struct atyfb_par *) info->par; in aty_set_dac_unsupported()