Hi James,

On Wed, Mar 11, 2015 at 7:06 PM, James Hartley <james.hart...@imgtec.com> wrote:
> This adds support for the Imagination Technologies hash accelerator which
> provides hardware acceleration for SHA1 SHA224 SHA256 and MD5 hashes.
>
> Signed-off-by: James Hartley <james.hart...@imgtec.com>

One comment below, otherwise this looks fine to me.

> --- /dev/null
> +++ b/drivers/crypto/img-hash.c

> +static int img_hash_hw_init(struct img_hash_dev *hdev)
> +{
> +       unsigned long long nbits;
> +       u32 u, l;
> +       int ret;
> +
> +       ret = clk_prepare_enable(hdev->hash_clk);
> +       if (ret)
> +               return ret;
> +
> +       ret = clk_prepare_enable(hdev->sys_clk);
> +       if (ret) {
> +               clk_disable_unprepare(hdev->hash_clk);
> +               return ret;
> +       }

I think you'll still end up with inflated prepare/enable counts for
these clocks since this function may get called multiple times and the
only clk_disable_unprepare() calls are in the remove() path.  Perhaps
it's best to just enable the clocks in probe() until runtime PM
support is added?

Thanks,
Andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to