RE: [PATCH] crypto: caam - fix DECO RSR polling

2014-07-23 Thread Ruchika Gupta
Acked-by :- Ruchika Gupta ruchika.gu...@freescale.com

Tested on P4080DS. 
Ported and tested on LS1 platform also (This platform has the virtualization 
enabled).

Thanks,
Ruchika

 -Original Message-
 From: Horia Geanta [mailto:horia.gea...@freescale.com]
 Sent: Monday, July 21, 2014 6:33 PM
 To: Herbert Xu; linux-crypto@vger.kernel.org; Gupta Ruchika-R66431; Phillips
 Kim-R1AAHA
 Cc: David S. Miller
 Subject: [PATCH] crypto: caam - fix DECO RSR polling
 
 RSR (Request Source Register) is not used when virtualization is disabled,
 thus don't poll for Valid bit.
 
 Besides this, if used, timeout has to be reinitialized.
 
 Signed-off-by: Horia Geanta horia.gea...@freescale.com
 ---
 Only compile-tested.
 Ruchika / Kim, please review / test.
 
  drivers/crypto/caam/ctrl.c | 11 +++
  1 file changed, 7 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index
 c6e9d3b2d502..84d4b95c761e 100644
 --- a/drivers/crypto/caam/ctrl.c
 +++ b/drivers/crypto/caam/ctrl.c
 @@ -89,12 +89,15 @@ static inline int run_descriptor_deco0(struct device
 *ctrldev, u32 *desc,
   /* Set the bit to request direct access to DECO0 */
   topregs = (struct caam_full __iomem *)ctrlpriv-ctrl;
 
 - if (ctrlpriv-virt_en == 1)
 + if (ctrlpriv-virt_en == 1) {
   setbits32(topregs-ctrl.deco_rsr, DECORSR_JR0);
 
 - while (!(rd_reg32(topregs-ctrl.deco_rsr)  DECORSR_VALID) 
 ---timeout)
 - cpu_relax();
 + while (!(rd_reg32(topregs-ctrl.deco_rsr)  DECORSR_VALID) 
 +--timeout)
 + cpu_relax();
 +
 + timeout = 10;
 + }
 
   setbits32(topregs-ctrl.deco_rq, DECORR_RQD0ENABLE);
 
 --
 1.8.3.1

--
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


Re: [PATCH] crypto: caam - fix DECO RSR polling

2014-07-23 Thread Herbert Xu
On Tue, Jul 22, 2014 at 04:31:56PM -0500, Kim Phillips wrote:
 On Mon, 21 Jul 2014 16:03:21 +0300
 Horia Geanta horia.gea...@freescale.com wrote:
 
  RSR (Request Source Register) is not used when
  virtualization is disabled, thus don't poll for Valid bit.
  
  Besides this, if used, timeout has to be reinitialized.
  
  Signed-off-by: Horia Geanta horia.gea...@freescale.com
  ---
  Only compile-tested.
  Ruchika / Kim, please review / test.
 
 Acked-by: Kim Phillips kim.phill...@freescale.com

Patch applied.
-- 
Email: Herbert Xu herb...@gondor.apana.org.au
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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


Re: [PATCH] crypto: caam - fix DECO RSR polling

2014-07-22 Thread Kim Phillips
On Mon, 21 Jul 2014 16:03:21 +0300
Horia Geanta horia.gea...@freescale.com wrote:

 RSR (Request Source Register) is not used when
 virtualization is disabled, thus don't poll for Valid bit.
 
 Besides this, if used, timeout has to be reinitialized.
 
 Signed-off-by: Horia Geanta horia.gea...@freescale.com
 ---
 Only compile-tested.
 Ruchika / Kim, please review / test.

Acked-by: Kim Phillips kim.phill...@freescale.com

fwiw, it would be nice if virt_en were a bool...can you also please
start using get_maintainer.pl?

Thanks,

Kim
--
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