Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 May 2012 22:59:10 +0000 (15:59 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 May 2012 22:59:10 +0000 (15:59 -0700)
Pull crypto updates from Herbert Xu:
 - New cipher/hash driver for ARM ux500.
 - Code clean-up for aesni-intel.
 - Misc fixes.

Fixed up conflicts in arch/arm/mach-ux500/devices-common.h, where quite
frankly some of it made no sense at all (the pull brought in a
declaration for the dbx500_add_platform_device_noirq() function, which
neither exists nor is used anywhere).

Also some trivial add-add context conflicts in the Kconfig file in
drivers/{char/hw_random,crypto}/

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: aesni-intel - move more common code to ablk_init_common
  crypto: aesni-intel - use crypto_[un]register_algs
  crypto: ux500 - Cleanup hardware identification
  crypto: ux500 - Update DMA handling for 3.4
  mach-ux500: crypto - core support for CRYP/HASH module.
  crypto: ux500 - Add driver for HASH hardware
  crypto: ux500 - Add driver for CRYP hardware
  hwrng: Kconfig - modify default state for atmel-rng driver
  hwrng: omap - use devm_request_and_ioremap
  crypto: crypto4xx - move up err_request_irq label
  crypto, xor: Sanitize checksumming function selection output
  crypto: caam - add backward compatible string sec4.0

1  2 
arch/arm/mach-ux500/board-mop500.c
arch/arm/mach-ux500/clock.c
arch/arm/mach-ux500/devices-common.h
arch/arm/mach-ux500/devices-db8500.h
arch/arm/mach-ux500/include/mach/devices.h
arch/arm/mach-ux500/include/mach/hardware.h
drivers/char/hw_random/Kconfig
drivers/crypto/Kconfig

@@@ -47,7 -44,9 +47,8 @@@
  #include <mach/setup.h>
  #include <mach/devices.h>
  #include <mach/irqs.h>
+ #include <mach/crypto-ux500.h>
  
 -#include "pins-db8500.h"
  #include "ste-dma40-db8500.h"
  #include "devices-db8500.h"
  #include "board-mop500.h"
@@@ -651,9 -673,10 +697,11 @@@ static void __init mop500_init_machine(
        mop500_i2c_init(parent);
        mop500_sdi_init(parent);
        mop500_spi_init(parent);
 +      mop500_msp_init(parent);
        mop500_uart_init(parent);
  
+       u8500_cryp1_hash1_init(parent);
        i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
  
        i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
Simple merge
  #include <linux/platform_device.h>
  #include <linux/dma-mapping.h>
  #include <linux/sys_soc.h>
 +#include <linux/amba/bus.h>
  #include <plat/i2c.h>
+ #include <mach/crypto-ux500.h>
  
 -extern struct amba_device *
 -dbx500_add_amba_device(struct device *parent, const char *name,
 -                     resource_size_t base, int irq, void *pdata,
 -                     unsigned int periphid);
 -
 -extern struct platform_device *
 -dbx500_add_platform_device_noirq(const char *name, int id,
 -              resource_size_t base, void *pdata);
 -
  struct spi_master_cntlr;
  
  static inline struct amba_device *
@@@ -81,10 -90,58 +82,59 @@@ dbx500_add_i2c(struct device *parent, i
  static inline struct amba_device *
  dbx500_add_rtc(struct device *parent, resource_size_t base, int irq)
  {
 -      return dbx500_add_amba_device(parent, "rtc-pl031", base, irq, NULL, 0);
 +      return amba_apb_device_add(parent, "rtc-pl031", base, SZ_4K, irq,
 +                              0, NULL, 0);
  }
  
+ struct cryp_platform_data;
+ static inline struct platform_device *
+ dbx500_add_cryp1(struct device *parent, int id, resource_size_t base, int irq,
+               struct cryp_platform_data *pdata)
+ {
+       struct resource res[] = {
+                       DEFINE_RES_MEM(base, SZ_4K),
+                       DEFINE_RES_IRQ(irq),
+       };
+       struct platform_device_info pdevinfo = {
+                       .parent = parent,
+                       .name = "cryp1",
+                       .id = id,
+                       .res = res,
+                       .num_res = ARRAY_SIZE(res),
+                       .data = pdata,
+                       .size_data = sizeof(*pdata),
+                       .dma_mask = DMA_BIT_MASK(32),
+       };
+       return platform_device_register_full(&pdevinfo);
+ }
+ struct hash_platform_data;
+ static inline struct platform_device *
+ dbx500_add_hash1(struct device *parent, int id, resource_size_t base,
+               struct hash_platform_data *pdata)
+ {
+       struct resource res[] = {
+                       DEFINE_RES_MEM(base, SZ_4K),
+       };
+       struct platform_device_info pdevinfo = {
+                       .parent = parent,
+                       .name = "hash1",
+                       .id = id,
+                       .res = res,
+                       .num_res = ARRAY_SIZE(res),
+                       .data = pdata,
+                       .size_data = sizeof(*pdata),
+                       .dma_mask = DMA_BIT_MASK(32),
+       };
+       return platform_device_register_full(&pdevinfo);
+ }
  struct nmk_gpio_platform_data;
  
  void dbx500_add_gpios(struct device *parent, resource_size_t *base, int num,
Simple merge
  #define io_p2v(n)             __io_address(n)
  
  #include <mach/db8500-regs.h>
 -#include <mach/db5500-regs.h>
  
  #define MSP_TX_RX_REG_OFFSET  0
+ #define CRYP1_RX_REG_OFFSET   0x10
+ #define CRYP1_TX_REG_OFFSET   0x8
+ #define HASH1_TX_REG_OFFSET   0x4
  
  #ifndef __ASSEMBLY__
  
@@@ -62,8 -62,8 +62,8 @@@ config HW_RANDOM_AM
  
  config HW_RANDOM_ATMEL
        tristate "Atmel Random Number Generator support"
 -      depends on HW_RANDOM && ARCH_AT91SAM9G45
 +      depends on HW_RANDOM && HAVE_CLK
-       default HW_RANDOM
+       default (HW_RANDOM && ARCH_AT91)
        ---help---
          This driver provides kernel-side support for the Random Number
          Generator hardware found on Atmel AT91 devices.
@@@ -297,21 -295,15 +297,32 @@@ config CRYPTO_DEV_TEGRA_AE
          To compile this driver as a module, choose M here: the module
          will be called tegra-aes.
  
 +config CRYPTO_DEV_NX
 +      tristate "Support for Power7+ in-Nest cryptographic accleration"
 +      depends on PPC64 && IBMVIO
 +      select CRYPTO_AES
 +      select CRYPTO_CBC
 +      select CRYPTO_ECB
 +      select CRYPTO_CCM
 +      select CRYPTO_GCM
 +      select CRYPTO_AUTHENC
 +      select CRYPTO_XCBC
 +      select CRYPTO_SHA256
 +      select CRYPTO_SHA512
 +      help
 +        Support for Power7+ in-Nest cryptographic acceleration. This
 +        module supports acceleration for AES and SHA2 algorithms. If you
 +        choose 'M' here, this module will be called nx_crypto.
 +
+ config CRYPTO_DEV_UX500
+       tristate "Driver for ST-Ericsson UX500 crypto hardware acceleration"
+       depends on ARCH_U8500
+       select CRYPTO_ALGAPI
+       help
+         Driver for ST-Ericsson UX500 crypto engine.
+ if CRYPTO_DEV_UX500
+       source "drivers/crypto/ux500/Kconfig"
+ endif # if CRYPTO_DEV_UX500
  endif # CRYPTO_HW