i8254              80 arch/x86/lib/kaslr.c 		random ^= i8254();
i8254             148 drivers/staging/comedi/drivers/amplc_dio200_common.c 	struct comedi_8254 *i8254 = s->private;
i8254             153 drivers/staging/comedi/drivers/amplc_dio200_common.c 		offset = i8254->mmio - dev->mmio;
i8254             155 drivers/staging/comedi/drivers/amplc_dio200_common.c 		offset = i8254->iobase - dev->iobase;
i8254             500 drivers/staging/comedi/drivers/amplc_dio200_common.c 	struct comedi_8254 *i8254 = s->private;
i8254             515 drivers/staging/comedi/drivers/amplc_dio200_common.c 		i8254->gate_src[chan] = src;
i8254             518 drivers/staging/comedi/drivers/amplc_dio200_common.c 		data[2] = i8254->gate_src[chan];
i8254             526 drivers/staging/comedi/drivers/amplc_dio200_common.c 		i8254->clock_src[chan] = src;
i8254             529 drivers/staging/comedi/drivers/amplc_dio200_common.c 		data[1] = i8254->clock_src[chan];
i8254             530 drivers/staging/comedi/drivers/amplc_dio200_common.c 		data[2] = clock_period[i8254->clock_src[chan]];
i8254             544 drivers/staging/comedi/drivers/amplc_dio200_common.c 	struct comedi_8254 *i8254;
i8254             560 drivers/staging/comedi/drivers/amplc_dio200_common.c 		i8254 = comedi_8254_mm_init(dev->mmio + offset,
i8254             563 drivers/staging/comedi/drivers/amplc_dio200_common.c 		i8254 = comedi_8254_init(dev->iobase + offset,
i8254             566 drivers/staging/comedi/drivers/amplc_dio200_common.c 	if (!i8254)
i8254             569 drivers/staging/comedi/drivers/amplc_dio200_common.c 	comedi_8254_subdevice_init(s, i8254);
i8254             571 drivers/staging/comedi/drivers/amplc_dio200_common.c 	i8254->insn_config = dio200_subdev_8254_config;
i8254             124 drivers/staging/comedi/drivers/comedi_8254.c static unsigned int __i8254_read(struct comedi_8254 *i8254, unsigned int reg)
i8254             126 drivers/staging/comedi/drivers/comedi_8254.c 	unsigned int reg_offset = (reg * i8254->iosize) << i8254->regshift;
i8254             129 drivers/staging/comedi/drivers/comedi_8254.c 	switch (i8254->iosize) {
i8254             132 drivers/staging/comedi/drivers/comedi_8254.c 		if (i8254->mmio)
i8254             133 drivers/staging/comedi/drivers/comedi_8254.c 			val = readb(i8254->mmio + reg_offset);
i8254             135 drivers/staging/comedi/drivers/comedi_8254.c 			val = inb(i8254->iobase + reg_offset);
i8254             138 drivers/staging/comedi/drivers/comedi_8254.c 		if (i8254->mmio)
i8254             139 drivers/staging/comedi/drivers/comedi_8254.c 			val = readw(i8254->mmio + reg_offset);
i8254             141 drivers/staging/comedi/drivers/comedi_8254.c 			val = inw(i8254->iobase + reg_offset);
i8254             144 drivers/staging/comedi/drivers/comedi_8254.c 		if (i8254->mmio)
i8254             145 drivers/staging/comedi/drivers/comedi_8254.c 			val = readl(i8254->mmio + reg_offset);
i8254             147 drivers/staging/comedi/drivers/comedi_8254.c 			val = inl(i8254->iobase + reg_offset);
i8254             153 drivers/staging/comedi/drivers/comedi_8254.c static void __i8254_write(struct comedi_8254 *i8254,
i8254             156 drivers/staging/comedi/drivers/comedi_8254.c 	unsigned int reg_offset = (reg * i8254->iosize) << i8254->regshift;
i8254             158 drivers/staging/comedi/drivers/comedi_8254.c 	switch (i8254->iosize) {
i8254             161 drivers/staging/comedi/drivers/comedi_8254.c 		if (i8254->mmio)
i8254             162 drivers/staging/comedi/drivers/comedi_8254.c 			writeb(val, i8254->mmio + reg_offset);
i8254             164 drivers/staging/comedi/drivers/comedi_8254.c 			outb(val, i8254->iobase + reg_offset);
i8254             167 drivers/staging/comedi/drivers/comedi_8254.c 		if (i8254->mmio)
i8254             168 drivers/staging/comedi/drivers/comedi_8254.c 			writew(val, i8254->mmio + reg_offset);
i8254             170 drivers/staging/comedi/drivers/comedi_8254.c 			outw(val, i8254->iobase + reg_offset);
i8254             173 drivers/staging/comedi/drivers/comedi_8254.c 		if (i8254->mmio)
i8254             174 drivers/staging/comedi/drivers/comedi_8254.c 			writel(val, i8254->mmio + reg_offset);
i8254             176 drivers/staging/comedi/drivers/comedi_8254.c 			outl(val, i8254->iobase + reg_offset);
i8254             186 drivers/staging/comedi/drivers/comedi_8254.c unsigned int comedi_8254_status(struct comedi_8254 *i8254, unsigned int counter)
i8254             194 drivers/staging/comedi/drivers/comedi_8254.c 	__i8254_write(i8254, cmd, I8254_CTRL_REG);
i8254             196 drivers/staging/comedi/drivers/comedi_8254.c 	return __i8254_read(i8254, counter);
i8254             205 drivers/staging/comedi/drivers/comedi_8254.c unsigned int comedi_8254_read(struct comedi_8254 *i8254, unsigned int counter)
i8254             213 drivers/staging/comedi/drivers/comedi_8254.c 	__i8254_write(i8254, I8254_CTRL_SEL_CTR(counter) | I8254_CTRL_LATCH,
i8254             217 drivers/staging/comedi/drivers/comedi_8254.c 	val = __i8254_read(i8254, counter);
i8254             218 drivers/staging/comedi/drivers/comedi_8254.c 	val |= (__i8254_read(i8254, counter) << 8);
i8254             230 drivers/staging/comedi/drivers/comedi_8254.c void comedi_8254_write(struct comedi_8254 *i8254,
i8254             242 drivers/staging/comedi/drivers/comedi_8254.c 	__i8254_write(i8254, byte, counter);
i8254             244 drivers/staging/comedi/drivers/comedi_8254.c 	__i8254_write(i8254, byte, counter);
i8254             254 drivers/staging/comedi/drivers/comedi_8254.c int comedi_8254_set_mode(struct comedi_8254 *i8254, unsigned int counter,
i8254             267 drivers/staging/comedi/drivers/comedi_8254.c 	__i8254_write(i8254, byte, I8254_CTRL_REG);
i8254             280 drivers/staging/comedi/drivers/comedi_8254.c int comedi_8254_load(struct comedi_8254 *i8254, unsigned int counter,
i8254             290 drivers/staging/comedi/drivers/comedi_8254.c 	comedi_8254_set_mode(i8254, counter, mode);
i8254             291 drivers/staging/comedi/drivers/comedi_8254.c 	comedi_8254_write(i8254, counter, val);
i8254             304 drivers/staging/comedi/drivers/comedi_8254.c void comedi_8254_pacer_enable(struct comedi_8254 *i8254,
i8254             319 drivers/staging/comedi/drivers/comedi_8254.c 	comedi_8254_set_mode(i8254, counter1, mode);
i8254             320 drivers/staging/comedi/drivers/comedi_8254.c 	comedi_8254_set_mode(i8254, counter2, mode);
i8254             328 drivers/staging/comedi/drivers/comedi_8254.c 		comedi_8254_write(i8254, counter2, i8254->divisor2);
i8254             329 drivers/staging/comedi/drivers/comedi_8254.c 		comedi_8254_write(i8254, counter1, i8254->divisor1);
i8254             338 drivers/staging/comedi/drivers/comedi_8254.c void comedi_8254_update_divisors(struct comedi_8254 *i8254)
i8254             341 drivers/staging/comedi/drivers/comedi_8254.c 	i8254->divisor = i8254->next_div & 0xffff;
i8254             342 drivers/staging/comedi/drivers/comedi_8254.c 	i8254->divisor1 = i8254->next_div1 & 0xffff;
i8254             343 drivers/staging/comedi/drivers/comedi_8254.c 	i8254->divisor2 = i8254->next_div2 & 0xffff;
i8254             353 drivers/staging/comedi/drivers/comedi_8254.c void comedi_8254_cascade_ns_to_timer(struct comedi_8254 *i8254,
i8254             357 drivers/staging/comedi/drivers/comedi_8254.c 	unsigned int d1 = i8254->next_div1 ? i8254->next_div1 : I8254_MAX_COUNT;
i8254             358 drivers/staging/comedi/drivers/comedi_8254.c 	unsigned int d2 = i8254->next_div2 ? i8254->next_div2 : I8254_MAX_COUNT;
i8254             372 drivers/staging/comedi/drivers/comedi_8254.c 	if (div * i8254->osc_base == *nanosec &&
i8254             377 drivers/staging/comedi/drivers/comedi_8254.c 	    div * i8254->osc_base > div &&
i8254             378 drivers/staging/comedi/drivers/comedi_8254.c 	    div * i8254->osc_base > i8254->osc_base)
i8254             381 drivers/staging/comedi/drivers/comedi_8254.c 	div = *nanosec / i8254->osc_base;
i8254             389 drivers/staging/comedi/drivers/comedi_8254.c 			ns = i8254->osc_base * d1 * d2;
i8254             406 drivers/staging/comedi/drivers/comedi_8254.c 		ns_high = d1_lub * d2_lub * i8254->osc_base;
i8254             407 drivers/staging/comedi/drivers/comedi_8254.c 		ns_low = d1_glb * d2_glb * i8254->osc_base;
i8254             426 drivers/staging/comedi/drivers/comedi_8254.c 	*nanosec = d1 * d2 * i8254->osc_base;
i8254             427 drivers/staging/comedi/drivers/comedi_8254.c 	i8254->next_div1 = d1;
i8254             428 drivers/staging/comedi/drivers/comedi_8254.c 	i8254->next_div2 = d2;
i8254             438 drivers/staging/comedi/drivers/comedi_8254.c void comedi_8254_ns_to_timer(struct comedi_8254 *i8254,
i8254             446 drivers/staging/comedi/drivers/comedi_8254.c 		divisor = DIV_ROUND_CLOSEST(*nanosec, i8254->osc_base);
i8254             449 drivers/staging/comedi/drivers/comedi_8254.c 		divisor = DIV_ROUND_UP(*nanosec, i8254->osc_base);
i8254             452 drivers/staging/comedi/drivers/comedi_8254.c 		divisor = *nanosec / i8254->osc_base;
i8254             460 drivers/staging/comedi/drivers/comedi_8254.c 	*nanosec = divisor * i8254->osc_base;
i8254             461 drivers/staging/comedi/drivers/comedi_8254.c 	i8254->next_div = divisor;
i8254             471 drivers/staging/comedi/drivers/comedi_8254.c void comedi_8254_set_busy(struct comedi_8254 *i8254,
i8254             475 drivers/staging/comedi/drivers/comedi_8254.c 		i8254->busy[counter] = busy;
i8254             484 drivers/staging/comedi/drivers/comedi_8254.c 	struct comedi_8254 *i8254 = s->private;
i8254             488 drivers/staging/comedi/drivers/comedi_8254.c 	if (i8254->busy[chan])
i8254             492 drivers/staging/comedi/drivers/comedi_8254.c 		data[i] = comedi_8254_read(i8254, chan);
i8254             502 drivers/staging/comedi/drivers/comedi_8254.c 	struct comedi_8254 *i8254 = s->private;
i8254             505 drivers/staging/comedi/drivers/comedi_8254.c 	if (i8254->busy[chan])
i8254             509 drivers/staging/comedi/drivers/comedi_8254.c 		comedi_8254_write(i8254, chan, data[insn->n - 1]);
i8254             519 drivers/staging/comedi/drivers/comedi_8254.c 	struct comedi_8254 *i8254 = s->private;
i8254             523 drivers/staging/comedi/drivers/comedi_8254.c 	if (i8254->busy[chan])
i8254             528 drivers/staging/comedi/drivers/comedi_8254.c 		ret = comedi_8254_set_mode(i8254, chan,
i8254             534 drivers/staging/comedi/drivers/comedi_8254.c 		ret = comedi_8254_set_mode(i8254, chan, data[1]);
i8254             539 drivers/staging/comedi/drivers/comedi_8254.c 		data[1] = comedi_8254_status(i8254, chan);
i8254             546 drivers/staging/comedi/drivers/comedi_8254.c 		if (i8254->insn_config)
i8254             547 drivers/staging/comedi/drivers/comedi_8254.c 			return i8254->insn_config(dev, s, insn, data);
i8254             560 drivers/staging/comedi/drivers/comedi_8254.c 				struct comedi_8254 *i8254)
i8254             571 drivers/staging/comedi/drivers/comedi_8254.c 	s->private	= i8254;
i8254             581 drivers/staging/comedi/drivers/comedi_8254.c 	struct comedi_8254 *i8254;
i8254             589 drivers/staging/comedi/drivers/comedi_8254.c 	i8254 = kzalloc(sizeof(*i8254), GFP_KERNEL);
i8254             590 drivers/staging/comedi/drivers/comedi_8254.c 	if (!i8254)
i8254             593 drivers/staging/comedi/drivers/comedi_8254.c 	i8254->iobase	= iobase;
i8254             594 drivers/staging/comedi/drivers/comedi_8254.c 	i8254->mmio	= mmio;
i8254             595 drivers/staging/comedi/drivers/comedi_8254.c 	i8254->iosize	= iosize;
i8254             596 drivers/staging/comedi/drivers/comedi_8254.c 	i8254->regshift	= regshift;
i8254             599 drivers/staging/comedi/drivers/comedi_8254.c 	i8254->osc_base	= osc_base ? osc_base : I8254_OSC_BASE_10MHZ;
i8254             603 drivers/staging/comedi/drivers/comedi_8254.c 		comedi_8254_set_mode(i8254, i, I8254_MODE0 | I8254_BINARY);
i8254             605 drivers/staging/comedi/drivers/comedi_8254.c 	return i8254;
i8254              99 drivers/staging/comedi/drivers/comedi_8254.h unsigned int comedi_8254_status(struct comedi_8254 *i8254,
i8254             101 drivers/staging/comedi/drivers/comedi_8254.h unsigned int comedi_8254_read(struct comedi_8254 *i8254, unsigned int counter);
i8254             102 drivers/staging/comedi/drivers/comedi_8254.h void comedi_8254_write(struct comedi_8254 *i8254,
i8254             105 drivers/staging/comedi/drivers/comedi_8254.h int comedi_8254_set_mode(struct comedi_8254 *i8254,
i8254             107 drivers/staging/comedi/drivers/comedi_8254.h int comedi_8254_load(struct comedi_8254 *i8254,
i8254             110 drivers/staging/comedi/drivers/comedi_8254.h void comedi_8254_pacer_enable(struct comedi_8254 *i8254,
i8254             113 drivers/staging/comedi/drivers/comedi_8254.h void comedi_8254_update_divisors(struct comedi_8254 *i8254);
i8254             114 drivers/staging/comedi/drivers/comedi_8254.h void comedi_8254_cascade_ns_to_timer(struct comedi_8254 *i8254,
i8254             116 drivers/staging/comedi/drivers/comedi_8254.h void comedi_8254_ns_to_timer(struct comedi_8254 *i8254,
i8254             119 drivers/staging/comedi/drivers/comedi_8254.h void comedi_8254_set_busy(struct comedi_8254 *i8254,
i8254             123 drivers/staging/comedi/drivers/comedi_8254.h 				struct comedi_8254 *i8254);