Hi Andrew, > -----Original Message----- > From: abrestic@xxxxxxxxxx [mailto:abrestic@xxxxxxxxxx] On Behalf Of > Andrew Bresticker > Sent: 12 March 2015 18:57 > To: James Hartley > Cc: Herbert Xu; smueller@xxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx; Ezequiel > Garcia; linux-crypto@xxxxxxxxxxxxxxx > Subject: Re: [PATCH V4 1/2] crypto: Add Imagination Technologies hw hash > accelerator > > Hi James, > > On Wed, Mar 11, 2015 at 7:06 PM, James Hartley > <james.hartley@xxxxxxxxxx> 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.hartley@xxxxxxxxxx> > > 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? Yes, I'll do that and upload a V5 set. > > Thanks, > Andrew Thanks James. ��.n��������+%������w��{.n����z�{��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f