From 9c3cd9d102c4d8c4e8557343c8b306542e898cb2 Mon Sep 17 00:00:00 2001 From: "Victoria Milhoan (b42089)" Date: Mon, 25 Mar 2013 11:31:20 -0700 Subject: crypto: caam - Define setbits32() and clrbits32() for ARM in the Freescale CAAM driver The kernel defines setbits32() and clrbits32() macros only for Power-based architectures. This patch modifies the Freescale CAAM driver to add macros for use on ARM architectures. Signed-off-by: Victoria Milhoan (b42089) Signed-off-by: Ruchika Gupta (cherry picked from commit 54fbc7392ac344cb94c44a2d8e1e0a16c950a5cd) Change-Id: Ia8065d9722bf5b7e60fd269d345b0b8c95ee96da Reviewed-on: http://git.am.freescale.net:8181/17732 Tested-by: Review Code-CDREVIEW Reviewed-by: Zhengxiong Jin Tested-by: Zhengxiong Jin diff --git a/drivers/crypto/caam/compat.h b/drivers/crypto/caam/compat.h index f227922..8c79717 100644 --- a/drivers/crypto/caam/compat.h +++ b/drivers/crypto/caam/compat.h @@ -14,6 +14,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/drivers/crypto/caam/regs.h b/drivers/crypto/caam/regs.h index cbde8b9..ce00c6d 100644 --- a/drivers/crypto/caam/regs.h +++ b/drivers/crypto/caam/regs.h @@ -83,6 +83,12 @@ #endif #endif +#ifdef CONFIG_ARM +/* These are common macros for Power, put here for ARMs */ +#define setbits32(_addr, _v) writel((readl(_addr) | (_v)), (_addr)) +#define clrbits32(_addr, _v) writel((readl(_addr) & ~(_v)), (_addr)) +#endif + #ifndef CONFIG_64BIT static inline void wr_reg64(u64 __iomem *reg, u64 data) { -- cgit v0.10.2