Beispiel #1
0
static void mx1_camera_activate(struct mx1_camera_dev *pcdev)
{
	unsigned int csicr1 = CSICR1_EN;

	dev_dbg(pcdev->soc_host.v4l2_dev.dev, "Activate device\n");

	clk_prepare_enable(pcdev->clk);

	/* enable CSI before doing anything else */
	__raw_writel(csicr1, pcdev->base + CSICR1);

	csicr1 |= CSICR1_MCLKEN | CSICR1_FCC | CSICR1_GCLK_MODE;
	csicr1 |= CSICR1_MCLKDIV(mclk_get_divisor(pcdev));
	csicr1 |= CSICR1_RXFF_LEVEL(2); /* 16 words */

	__raw_writel(csicr1, pcdev->base + CSICR1);
}
static void mx1_camera_activate(struct mx1_camera_dev *pcdev)
{
	unsigned int csicr1 = CSICR1_EN;

	dev_dbg(pcdev->icd->parent, "Activate device\n");

	clk_enable(pcdev->clk);

	
	__raw_writel(csicr1, pcdev->base + CSICR1);

	csicr1 |= CSICR1_MCLKEN | CSICR1_FCC | CSICR1_GCLK_MODE;
	csicr1 |= CSICR1_MCLKDIV(mclk_get_divisor(pcdev));
	csicr1 |= CSICR1_RXFF_LEVEL(2); 

	__raw_writel(csicr1, pcdev->base + CSICR1);
}