Lines Matching refs:counter
217 /* Map the Beep Control and Beep counter Registers */
328 unsigned long counter;
334 /* Convert the frequency in hz to the bbc counter value */
335 counter = bbc_beep_hztocounter(freq);
337 /* Extract relevant second and third byte of counter value */
338 beep_c2 = (counter & 0xff00) >> 8;
339 beep_c3 = (counter & 0xff0000) >> 16;
354 "bbc_beep_freq: dip = 0x%p, freq = %d, counter = 0x%x : Done",
355 (void *)dip, freq, (int)counter));
473 * Where n = position of the bit of counter register
484 unsigned long counter;
502 for (i = BBC_BEEP_MIN_SHIFT, counter = 1 << BBC_BEEP_MSBIT;
503 i >= BBC_BEEP_MAX_SHIFT; i--, counter >>= 1) {
518 * counter value
521 return (counter);
533 return (counter);
542 /* Return new counter corres. to newfreq */
544 return (counter);
547 /* Return old counter corresponding to oldfreq */
549 return (counter << 1);
557 * Back off the counter value and return max counter
560 return (counter << 1);