Example #1
0
static int arm_dcc_pending(struct udevice *dev, bool input)
{
	register unsigned int reg;

	if (input) {
		can_read_dcc(reg);
	} else {
		can_write_dcc(reg);
	}

	return reg;
}
Example #2
0
static void arm_dcc_putc(struct console_device *cdev, char c)
{
	register unsigned int reg;
	unsigned int timeout_count = TIMEOUT_COUNT;

	while (--timeout_count) {
		can_write_dcc(reg);
		if (reg)
			break;
	}
	if (timeout_count == 0)
		return;
	else
		write_dcc(c);
}
Example #3
0
static void arm_dcc_putc(char ch)
{
	register unsigned int reg;
	unsigned int timeout_count = TIMEOUT_COUNT;

	while (--timeout_count) {
		can_write_dcc(reg);
		if (reg)
			break;
	}
	if (timeout_count == 0)
		return;
	else
		write_dcc(ch);
}
Example #4
0
static int arm_dcc_putc(struct udevice *dev, char ch)
{
	register unsigned int reg;
	unsigned int timeout_count = TIMEOUT_COUNT;

	while (--timeout_count) {
		can_write_dcc(reg);
		if (reg)
			break;
	}
	if (timeout_count == 0)
		return -EAGAIN;
	else
		write_dcc(ch);

	return 0;
}