Re: [PATCH 5/7] ata: ahci: mvebu: add clock support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Miquel Raynal <miquel.raynal@xxxxxxxxxxx> wrote on Fri, 23 Nov 2018
11:15:54 +0100:

> Add clock support to the ahci_mvebu.c driver. This is needed in order
> to get suspend to RAM working.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
> ---
>  drivers/ata/ahci_mvebu.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c
> index 902971bfe301..cad35806c3c2 100644
> --- a/drivers/ata/ahci_mvebu.c
> +++ b/drivers/ata/ahci_mvebu.c
> @@ -195,6 +195,16 @@ static int ahci_mvebu_probe(struct platform_device *pdev)
>  	if (!hpriv->plat_data)
>  		return -EINVAL;
>  
> +	/* The clock property is absent in old bindings */
> +	hpriv->clks[0] = devm_clk_get(&pdev->dev, NULL);
> +	if (IS_ERR(hpriv->clks[0])) {
> +		if (PTR_ERR(hpriv->clks[0]) == -EPROBE_DEFER)
> +			return PTR_ERR(hpriv->clks[0]);
> +
> +		dev_warn(&pdev->dev, "no clock available\n");
> +		hpriv->clks[0] = NULL;
> +	}
> +

During a debug session about clock device links I realized this patch
was not needed. The clk_get() on hpriv->clks[*] is done in
libahci_platform.c in ahci_platform_get_resources() so this is
redundant.

I'll fix it in the v2.

>  	rc = ahci_platform_enable_resources(hpriv);
>  	if (rc)
>  		return rc;


Thanks,
Miquèl



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux