diff options
author | Dan Streetman <ddstreet@ieee.org> | 2015-06-18 19:05:30 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-06-19 09:49:18 +0300 |
commit | c47d63020c03659e584673f78f24f2e5de3e6b9b (patch) | |
tree | 819736bc1e06a911c4ee9da39efb33625c27b921 /drivers/crypto/nx/nx-842.h | |
parent | 7793bda8fe372fe2e71f16d0619b630d6e41c8ba (diff) | |
download | linux-c47d63020c03659e584673f78f24f2e5de3e6b9b.tar.xz |
crypto: nx - add LE support to pSeries platform driver
Add support to the nx-842-pseries.c driver for running in little endian
mode.
The pSeries platform NX 842 driver currently only works as big endian.
This adds cpu_to_be*() and be*_to_cpu() in the appropriate places to
work in LE mode also.
Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/nx/nx-842.h')
-rw-r--r-- | drivers/crypto/nx/nx-842.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/crypto/nx/nx-842.h b/drivers/crypto/nx/nx-842.h index f6821b65b7ce..ac0ea79d0f8b 100644 --- a/drivers/crypto/nx/nx-842.h +++ b/drivers/crypto/nx/nx-842.h @@ -88,7 +88,8 @@ #define CCB_CM_EXTRA_WRITE (CCB_CM0_ALL_COMPLETIONS & CCB_CM12_STORE) #define CCB_CM_INTERRUPT (CCB_CM0_ALL_COMPLETIONS & CCB_CM12_INTERRUPT) -#define LEN_ON_PAGE(pa) (PAGE_SIZE - ((pa) & ~PAGE_MASK)) +#define LEN_ON_SIZE(pa, size) ((size) - ((pa) & ((size) - 1))) +#define LEN_ON_PAGE(pa) LEN_ON_SIZE(pa, PAGE_SIZE) static inline unsigned long nx842_get_pa(void *addr) { |