All of lore.kernel.org
 help / color / mirror / Atom feed
From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/3] media: atmel-isi: remove the useless code which disable isi
Date: Sun, 12 Apr 2015 16:10:53 +0300	[thread overview]
Message-ID: <2109629.IWfKzc1IIn@avalon> (raw)
In-Reply-To: <1428570108-4961-2-git-send-email-josh.wu@atmel.com>

Hi Josh,

Thank you for the patch.

On Thursday 09 April 2015 17:01:46 Josh Wu wrote:
> To program ISI control register, the pixel clock should be enabled.

That's an awful hardware design :-(

> So without pixel clock (from sensor) enabled, disable ISI controller is
> not make sense. So this patch remove those code.
> 
> Signed-off-by: Josh Wu <josh.wu@atmel.com>
> ---
> 
> Changes in v2:
> - this file is new added.
> 
>  drivers/media/platform/soc_camera/atmel-isi.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/media/platform/soc_camera/atmel-isi.c
> b/drivers/media/platform/soc_camera/atmel-isi.c index c125b1d..31254b4
> 100644
> --- a/drivers/media/platform/soc_camera/atmel-isi.c
> +++ b/drivers/media/platform/soc_camera/atmel-isi.c
> @@ -131,8 +131,6 @@ static int configure_geometry(struct atmel_isi *isi, u32
> width, return -EINVAL;
>  	}
> 
> -	isi_writel(isi, ISI_CTRL, ISI_CTRL_DIS);
> -
>  	cfg2 = isi_readl(isi, ISI_CFG2);

Can the configuration registers be accessed when the pixel clock is disabled ?

>  	/* Set YCC swap mode */
>  	cfg2 &= ~ISI_CFG2_YCC_SWAP_MODE_MASK;
> @@ -843,7 +841,6 @@ static int isi_camera_set_bus_param(struct
> soc_camera_device *icd)
> 
>  	cfg1 |= ISI_CFG1_THMASK_BEATS_16;
> 
> -	isi_writel(isi, ISI_CTRL, ISI_CTRL_DIS);
>  	isi_writel(isi, ISI_CFG1, cfg1);
> 
>  	return 0;
> @@ -1022,8 +1019,6 @@ static int atmel_isi_probe(struct platform_device
> *pdev) if (isi->pdata.data_width_flags & ISI_DATAWIDTH_10)
>  		isi->width_flags |= 1 << 9;
> 
> -	isi_writel(isi, ISI_CTRL, ISI_CTRL_DIS);
> -
>  	irq = platform_get_irq(pdev, 0);
>  	if (IS_ERR_VALUE(irq)) {
>  		ret = irq;

-- 
Regards,

Laurent Pinchart

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Josh Wu <josh.wu@atmel.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 1/3] media: atmel-isi: remove the useless code which disable isi
Date: Sun, 12 Apr 2015 16:10:53 +0300	[thread overview]
Message-ID: <2109629.IWfKzc1IIn@avalon> (raw)
In-Reply-To: <1428570108-4961-2-git-send-email-josh.wu@atmel.com>

Hi Josh,

Thank you for the patch.

On Thursday 09 April 2015 17:01:46 Josh Wu wrote:
> To program ISI control register, the pixel clock should be enabled.

That's an awful hardware design :-(

> So without pixel clock (from sensor) enabled, disable ISI controller is
> not make sense. So this patch remove those code.
> 
> Signed-off-by: Josh Wu <josh.wu@atmel.com>
> ---
> 
> Changes in v2:
> - this file is new added.
> 
>  drivers/media/platform/soc_camera/atmel-isi.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/media/platform/soc_camera/atmel-isi.c
> b/drivers/media/platform/soc_camera/atmel-isi.c index c125b1d..31254b4
> 100644
> --- a/drivers/media/platform/soc_camera/atmel-isi.c
> +++ b/drivers/media/platform/soc_camera/atmel-isi.c
> @@ -131,8 +131,6 @@ static int configure_geometry(struct atmel_isi *isi, u32
> width, return -EINVAL;
>  	}
> 
> -	isi_writel(isi, ISI_CTRL, ISI_CTRL_DIS);
> -
>  	cfg2 = isi_readl(isi, ISI_CFG2);

Can the configuration registers be accessed when the pixel clock is disabled ?

>  	/* Set YCC swap mode */
>  	cfg2 &= ~ISI_CFG2_YCC_SWAP_MODE_MASK;
> @@ -843,7 +841,6 @@ static int isi_camera_set_bus_param(struct
> soc_camera_device *icd)
> 
>  	cfg1 |= ISI_CFG1_THMASK_BEATS_16;
> 
> -	isi_writel(isi, ISI_CTRL, ISI_CTRL_DIS);
>  	isi_writel(isi, ISI_CFG1, cfg1);
> 
>  	return 0;
> @@ -1022,8 +1019,6 @@ static int atmel_isi_probe(struct platform_device
> *pdev) if (isi->pdata.data_width_flags & ISI_DATAWIDTH_10)
>  		isi->width_flags |= 1 << 9;
> 
> -	isi_writel(isi, ISI_CTRL, ISI_CTRL_DIS);
> -
>  	irq = platform_get_irq(pdev, 0);
>  	if (IS_ERR_VALUE(irq)) {
>  		ret = irq;

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2015-04-12 13:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09  9:01 [PATCH v2 0/3] media: atmel-isi: rework on the clock part and add runtime pm support Josh Wu
2015-04-09  9:01 ` Josh Wu
2015-04-09  9:01 ` [PATCH v2 1/3] media: atmel-isi: remove the useless code which disable isi Josh Wu
2015-04-09  9:01   ` Josh Wu
2015-04-12 13:10   ` Laurent Pinchart [this message]
2015-04-12 13:10     ` Laurent Pinchart
2015-04-13 10:17     ` Josh Wu
2015-04-13 10:17       ` Josh Wu
2015-05-11 20:16   ` Guennadi Liakhovetski
2015-05-11 20:16     ` Guennadi Liakhovetski
2015-05-12  3:00     ` Josh Wu
2015-05-12  3:00       ` Josh Wu
2015-05-25 17:05       ` Guennadi Liakhovetski
2015-05-25 17:05         ` Guennadi Liakhovetski
2015-04-09  9:01 ` [PATCH v2 2/3] media: atmel-isi: add runtime pm support Josh Wu
2015-04-09  9:01   ` Josh Wu
2015-04-09  9:01 ` [PATCH v2 3/3] media: atmel-isi: remove mck back compatiable code as it's not need Josh Wu
2015-04-09  9:01   ` Josh Wu
2015-04-12 13:08   ` Laurent Pinchart
2015-04-12 13:08     ` Laurent Pinchart
2015-04-13 10:09     ` Josh Wu
2015-04-13 10:09       ` Josh Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2109629.IWfKzc1IIn@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.