lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181105091135.GB3004@amd>
Date:   Mon, 5 Nov 2018 10:11:35 +0100
From:   Pavel Machek <pavel@....cz>
To:     Lubomir Rintel <lkundrak@...sk>
Cc:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        Jonathan Corbet <corbet@....net>, linux-media@...r.kernel.org,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        James Cameron <quozl@...top.org>
Subject: Re: [PATCH 06/11] [media] marvell-ccic: drop ctlr_reset()

On Mon 2018-11-05 08:30:49, Lubomir Rintel wrote:
> This accesses the clock registers directly and thus is not too
> devicetree friendly. If it's actually needed it needs to be done
> differently.

Device-tree unfriendly is bad, but you still don't want to cause
regression to people needing this.

(Perhaps noone uses this, but...)

> Signed-off-by: Lubomir Rintel <lkundrak@...sk>

Git blame says: 7c269f454 . Perhaps its authors should be Cced here,
too?
								Pavel

> ---
>  .../media/platform/marvell-ccic/mcam-core.c   |  6 -----
>  .../media/platform/marvell-ccic/mcam-core.h   |  1 -
>  .../media/platform/marvell-ccic/mmp-driver.c  | 23 -------------------
>  3 files changed, 30 deletions(-)
> 
> diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c b/drivers/media/platform/marvell-ccic/mcam-core.c
> index d24e5b7a3bc5..1b879035948c 100644
> --- a/drivers/media/platform/marvell-ccic/mcam-core.c
> +++ b/drivers/media/platform/marvell-ccic/mcam-core.c
> @@ -1154,12 +1154,6 @@ static void mcam_vb_stop_streaming(struct vb2_queue *vq)
>  	if (cam->state != S_STREAMING)
>  		return;
>  	mcam_ctlr_stop_dma(cam);
> -	/*
> -	 * Reset the CCIC PHY after stopping streaming,
> -	 * otherwise, the CCIC may be unstable.
> -	 */
> -	if (cam->ctlr_reset)
> -		cam->ctlr_reset(cam);
>  	/*
>  	 * VB2 reclaims the buffers, so we need to forget
>  	 * about them.
> diff --git a/drivers/media/platform/marvell-ccic/mcam-core.h b/drivers/media/platform/marvell-ccic/mcam-core.h
> index ad8955f9f0a1..f93f23faf364 100644
> --- a/drivers/media/platform/marvell-ccic/mcam-core.h
> +++ b/drivers/media/platform/marvell-ccic/mcam-core.h
> @@ -137,7 +137,6 @@ struct mcam_camera {
>  	int (*plat_power_up) (struct mcam_camera *cam);
>  	void (*plat_power_down) (struct mcam_camera *cam);
>  	void (*calc_dphy) (struct mcam_camera *cam);
> -	void (*ctlr_reset) (struct mcam_camera *cam);
>  
>  	/*
>  	 * Everything below here is private to the mcam core and
> diff --git a/drivers/media/platform/marvell-ccic/mmp-driver.c b/drivers/media/platform/marvell-ccic/mmp-driver.c
> index 70a2833db0d1..92a79ad8a12c 100644
> --- a/drivers/media/platform/marvell-ccic/mmp-driver.c
> +++ b/drivers/media/platform/marvell-ccic/mmp-driver.c
> @@ -183,28 +183,6 @@ static void mmpcam_power_down(struct mcam_camera *mcam)
>  	mcam_clk_disable(mcam);
>  }
>  
> -static void mcam_ctlr_reset(struct mcam_camera *mcam)
> -{
> -	unsigned long val;
> -	struct mmp_camera *cam = mcam_to_cam(mcam);
> -
> -	if (mcam->ccic_id) {
> -		/*
> -		 * Using CCIC2
> -		 */
> -		val = ioread32(cam->power_regs + REG_CCIC2_CRCR);
> -		iowrite32(val & ~0x2, cam->power_regs + REG_CCIC2_CRCR);
> -		iowrite32(val | 0x2, cam->power_regs + REG_CCIC2_CRCR);
> -	} else {
> -		/*
> -		 * Using CCIC1
> -		 */
> -		val = ioread32(cam->power_regs + REG_CCIC_CRCR);
> -		iowrite32(val & ~0x2, cam->power_regs + REG_CCIC_CRCR);
> -		iowrite32(val | 0x2, cam->power_regs + REG_CCIC_CRCR);
> -	}
> -}
> -
>  /*
>   * calc the dphy register values
>   * There are three dphy registers being used.
> @@ -352,7 +330,6 @@ static int mmpcam_probe(struct platform_device *pdev)
>  	mcam = &cam->mcam;
>  	mcam->plat_power_up = mmpcam_power_up;
>  	mcam->plat_power_down = mmpcam_power_down;
> -	mcam->ctlr_reset = mcam_ctlr_reset;
>  	mcam->calc_dphy = mmpcam_calc_dphy;
>  	mcam->dev = &pdev->dev;
>  	mcam->use_smbus = 0;

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ