Пример #1
0
int fimc_hwget_frame_end(struct fimc_control *ctrl)
{
	unsigned long timeo = jiffies;
	u32 cfg;

	timeo += 20;	/* waiting for 100ms */
	while (time_before(jiffies, timeo)) {
		cfg = readl(ctrl->regs + S3C_CISTATUS);

		if (S3C_CISTATUS_GET_FRAME_END(cfg)) {
			cfg &= ~S3C_CISTATUS_FRAMEEND;
			writel(cfg, ctrl->regs + S3C_CISTATUS);
			break;
		}
		cond_resched();
	}

	return 0;
}
Пример #2
0
void s3c_fimc_wait_frame_end(struct s3c_fimc_control *ctrl)
{
        unsigned long timeo = jiffies;
	unsigned int frame_cnt = 0;
	u32 cfg;

        timeo += 20;    /* waiting for 100mS */

	while (time_before(jiffies, timeo)) {
		cfg = readl(ctrl->regs + S3C_CISTATUS);
		
		if (S3C_CISTATUS_GET_FRAME_END(cfg)) {
			cfg &= ~S3C_CISTATUS_FRAMEEND;
			writel(cfg, ctrl->regs + S3C_CISTATUS);

			if (frame_cnt == 2)
				break;
			else
				frame_cnt++;
		}
		cond_resched();
	}
}