- To: Viresh Kumar <viresh.kumar@xxxxxx>
- Subject: Re: [PATCH V3 07/12] ata/sata_mv: Remove conditional compilation of clk code
- From: Andrew Lunn <andrew@xxxxxxx>
- Date: Tue, 24 Apr 2012 14:00:19 +0200
- Cc: akpm@xxxxxxxxxxxxxxxxxxxx, spear-devel@xxxxxxxxxxx, viresh.linux@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, mturquette@xxxxxxxxxx, sshtylyov@xxxxxxxxxx, jgarzik@xxxxxxxxxx, linux@xxxxxxxxxxxxxxxx, Andrew Lunn <andrew@xxxxxxx>, linux-ide@xxxxxxxxxxxxxxx
- In-reply-to: <abbcf661dc58948794839eb0fba1d5a0950ec848.1335266056.git.viresh.kumar@st.com>
- List-id: <linux-ide.vger.kernel.org>
- Mail-followup-to: Viresh Kumar <viresh.kumar@xxxxxx>, akpm@xxxxxxxxxxxxxxxxxxxx, spear-devel@xxxxxxxxxxx, viresh.linux@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, mturquette@xxxxxxxxxx, sshtylyov@xxxxxxxxxx, jgarzik@xxxxxxxxxx, linux@xxxxxxxxxxxxxxxx, Andrew Lunn <andrew@xxxxxxx>, linux-ide@xxxxxxxxxxxxxxx
- User-agent: Mutt/1.5.21 (2010-09-15)
> -#if defined(CONFIG_HAVE_CLK)
> hpriv->clk = clk_get(&pdev->dev, NULL);
> - if (IS_ERR(hpriv->clk))
> - dev_notice(&pdev->dev, "cannot get clkdev\n");
> - else
> - clk_enable(hpriv->clk);
> -#endif
> + if (IS_ERR(hpriv->clk)) {
> + dev_err(&pdev->dev, "cannot get clkdev\n");
> + return PTR_ERR(hpriv->clk);
> + }
> +
> + clk_enable(hpriv->clk);
Sorry, but still wrong.
The clock is optional. If we can find a clock, turn it on. If not,
keep going....
You patch causes the missing clock to become a fatal error.
This sata_mv exists in multiple forms. It can be part of a SoC. It can
also be on a PCI bus. In the PCI form, it is unlikely to have a clk
which can be controlled. When built into a SoC, namely one of the
Orion family, dove, orion5x, mv78xx0 do not have a clock which can be
controlled. However kirkwood does have a clock.
So, kirkwood will provide a clock and expects that sata_mv will turn
it on. All the other ways of using sata_mv will not provide a clock,
but still expect the driver to be happy.
Andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Filesystems]
[Linux SCSI]
[Linux RAID]
[Git]
[Kernel Newbies]
[Linux Newbie]
[Share Photos]
[Security]
[Netfilter]
[Bugtraq]
[Photo]
[Yosemite]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Samba]
[Video 4 Linux]
[Device Mapper]
[Linux Resources]