From: Linus Torvalds Date: Wed, 23 May 2012 22:59:10 +0000 (-0700) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=0bd3fbd4abeafa19ae0302d25194468b022d1a56;p=openwrt%2Fstaging%2Fblogic.git Merge git://git./linux/kernel/git/herbert/crypto-2.6 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 --- 0bd3fbd4abeafa19ae0302d25194468b022d1a56 diff --cc arch/arm/mach-ux500/board-mop500.c index 4bc0cbc5f071,67e657e24b1d..f943687acaf0 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@@ -47,7 -44,9 +47,8 @@@ #include #include #include + #include -#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); diff --cc arch/arm/mach-ux500/devices-common.h index 7cbccfd9e158,89c5a59b3295..6e4706560266 --- a/arch/arm/mach-ux500/devices-common.h +++ b/arch/arm/mach-ux500/devices-common.h @@@ -11,9 -11,18 +11,10 @@@ #include #include #include +#include #include + #include -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, diff --cc arch/arm/mach-ux500/include/mach/hardware.h index 808c1d6601c5,1451f58158bf..28d16e744bfd --- a/arch/arm/mach-ux500/include/mach/hardware.h +++ b/arch/arm/mach-ux500/include/mach/hardware.h @@@ -31,8 -28,12 +31,11 @@@ #define io_p2v(n) __io_address(n) #include -#include #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__ diff --cc drivers/char/hw_random/Kconfig index c225314468ee,8cd64f1d2797..f45dad39a18b --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig @@@ -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. diff --cc drivers/crypto/Kconfig index 6373fa0ddb65,69fdf1861100..1092a770482e --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig @@@ -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