diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-23 18:59:10 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-23 18:59:10 -0400 |
| commit | 0bd3fbd4abeafa19ae0302d25194468b022d1a56 (patch) | |
| tree | 1fc34b25666c97b85dfb7199e48b2e074ffde264 | |
| parent | 0b87da68a0f0a7bf7f7446cf64f92e672bd68ef8 (diff) | |
| parent | ef45b834319f8a18f257a40ba4bce6b829ef1708 (diff) | |
Merge git://git.kernel.org/pub/scm/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
30 files changed, 5777 insertions, 511 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 4bc0cbc5f071..f943687acaf0 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
| @@ -47,6 +47,7 @@ | |||
| 47 | #include <mach/setup.h> | 47 | #include <mach/setup.h> |
| 48 | #include <mach/devices.h> | 48 | #include <mach/devices.h> |
| 49 | #include <mach/irqs.h> | 49 | #include <mach/irqs.h> |
| 50 | #include <mach/crypto-ux500.h> | ||
| 50 | 51 | ||
| 51 | #include "ste-dma40-db8500.h" | 52 | #include "ste-dma40-db8500.h" |
| 52 | #include "devices-db8500.h" | 53 | #include "devices-db8500.h" |
| @@ -417,6 +418,45 @@ static void mop500_prox_deactivate(struct device *dev) | |||
| 417 | regulator_put(prox_regulator); | 418 | regulator_put(prox_regulator); |
| 418 | } | 419 | } |
| 419 | 420 | ||
| 421 | static struct cryp_platform_data u8500_cryp1_platform_data = { | ||
| 422 | .mem_to_engine = { | ||
| 423 | .dir = STEDMA40_MEM_TO_PERIPH, | ||
| 424 | .src_dev_type = STEDMA40_DEV_SRC_MEMORY, | ||
| 425 | .dst_dev_type = DB8500_DMA_DEV48_CAC1_TX, | ||
| 426 | .src_info.data_width = STEDMA40_WORD_WIDTH, | ||
| 427 | .dst_info.data_width = STEDMA40_WORD_WIDTH, | ||
| 428 | .mode = STEDMA40_MODE_LOGICAL, | ||
| 429 | .src_info.psize = STEDMA40_PSIZE_LOG_4, | ||
| 430 | .dst_info.psize = STEDMA40_PSIZE_LOG_4, | ||
| 431 | }, | ||
| 432 | .engine_to_mem = { | ||
| 433 | .dir = STEDMA40_PERIPH_TO_MEM, | ||
| 434 | .src_dev_type = DB8500_DMA_DEV48_CAC1_RX, | ||
| 435 | .dst_dev_type = STEDMA40_DEV_DST_MEMORY, | ||
| 436 | .src_info.data_width = STEDMA40_WORD_WIDTH, | ||
| 437 | .dst_info.data_width = STEDMA40_WORD_WIDTH, | ||
| 438 | .mode = STEDMA40_MODE_LOGICAL, | ||
| 439 | .src_info.psize = STEDMA40_PSIZE_LOG_4, | ||
| 440 | .dst_info.psize = STEDMA40_PSIZE_LOG_4, | ||
| 441 | } | ||
| 442 | }; | ||
| 443 | |||
| 444 | static struct stedma40_chan_cfg u8500_hash_dma_cfg_tx = { | ||
| 445 | .dir = STEDMA40_MEM_TO_PERIPH, | ||
| 446 | .src_dev_type = STEDMA40_DEV_SRC_MEMORY, | ||
| 447 | .dst_dev_type = DB8500_DMA_DEV50_HAC1_TX, | ||
| 448 | .src_info.data_width = STEDMA40_WORD_WIDTH, | ||
| 449 | .dst_info.data_width = STEDMA40_WORD_WIDTH, | ||
| 450 | .mode = STEDMA40_MODE_LOGICAL, | ||
| 451 | .src_info.psize = STEDMA40_PSIZE_LOG_16, | ||
| 452 | .dst_info.psize = STEDMA40_PSIZE_LOG_16, | ||
| 453 | }; | ||
| 454 | |||
| 455 | static struct hash_platform_data u8500_hash1_platform_data = { | ||
| 456 | .mem_to_engine = &u8500_hash_dma_cfg_tx, | ||
| 457 | .dma_filter = stedma40_filter, | ||
| 458 | }; | ||
| 459 | |||
| 420 | /* add any platform devices here - TODO */ | 460 | /* add any platform devices here - TODO */ |
| 421 | static struct platform_device *mop500_platform_devs[] __initdata = { | 461 | static struct platform_device *mop500_platform_devs[] __initdata = { |
| 422 | &mop500_gpio_keys_device, | 462 | &mop500_gpio_keys_device, |
| @@ -624,6 +664,12 @@ static void __init mop500_uart_init(struct device *parent) | |||
| 624 | db8500_add_uart2(parent, &uart2_plat); | 664 | db8500_add_uart2(parent, &uart2_plat); |
| 625 | } | 665 | } |
| 626 | 666 | ||
| 667 | static void __init u8500_cryp1_hash1_init(struct device *parent) | ||
| 668 | { | ||
| 669 | db8500_add_cryp1(parent, &u8500_cryp1_platform_data); | ||
| 670 | db8500_add_hash1(parent, &u8500_hash1_platform_data); | ||
| 671 | } | ||
| 672 | |||
| 627 | static struct platform_device *snowball_platform_devs[] __initdata = { | 673 | static struct platform_device *snowball_platform_devs[] __initdata = { |
| 628 | &snowball_led_dev, | 674 | &snowball_led_dev, |
| 629 | &snowball_key_dev, | 675 | &snowball_key_dev, |
| @@ -654,6 +700,8 @@ static void __init mop500_init_machine(void) | |||
| 654 | mop500_msp_init(parent); | 700 | mop500_msp_init(parent); |
| 655 | mop500_uart_init(parent); | 701 | mop500_uart_init(parent); |
| 656 | 702 | ||
| 703 | u8500_cryp1_hash1_init(parent); | ||
| 704 | |||
| 657 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); | 705 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); |
| 658 | 706 | ||
| 659 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); | 707 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); |
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c index a121cb472dd6..1762c4728f1e 100644 --- a/arch/arm/mach-ux500/clock.c +++ b/arch/arm/mach-ux500/clock.c | |||
| @@ -381,14 +381,15 @@ static DEFINE_PRCC_CLK(5, usb, 0, 0, NULL); | |||
| 381 | /* Peripheral Cluster #6 */ | 381 | /* Peripheral Cluster #6 */ |
| 382 | 382 | ||
| 383 | /* MTU ID in data */ | 383 | /* MTU ID in data */ |
| 384 | static DEFINE_PRCC_CLK_CUSTOM(6, mtu1, 8, -1, NULL, clk_mtu_get_rate, 1); | 384 | static DEFINE_PRCC_CLK_CUSTOM(6, mtu1, 9, -1, NULL, clk_mtu_get_rate, 1); |
| 385 | static DEFINE_PRCC_CLK_CUSTOM(6, mtu0, 7, -1, NULL, clk_mtu_get_rate, 0); | 385 | static DEFINE_PRCC_CLK_CUSTOM(6, mtu0, 8, -1, NULL, clk_mtu_get_rate, 0); |
| 386 | static DEFINE_PRCC_CLK(6, cfgreg, 6, 6, NULL); | 386 | static DEFINE_PRCC_CLK(6, cfgreg, 7, 7, NULL); |
| 387 | static DEFINE_PRCC_CLK(6, hash1, 5, -1, NULL); | 387 | static DEFINE_PRCC_CLK(6, hash1, 6, -1, NULL); |
| 388 | static DEFINE_PRCC_CLK(6, unipro, 4, 1, &clk_uniproclk); | 388 | static DEFINE_PRCC_CLK(6, unipro, 5, 1, &clk_uniproclk); |
| 389 | static DEFINE_PRCC_CLK(6, pka, 3, -1, NULL); | 389 | static DEFINE_PRCC_CLK(6, pka, 4, -1, NULL); |
| 390 | static DEFINE_PRCC_CLK(6, hash0, 2, -1, NULL); | 390 | static DEFINE_PRCC_CLK(6, hash0, 3, -1, NULL); |
| 391 | static DEFINE_PRCC_CLK(6, cryp0, 1, -1, NULL); | 391 | static DEFINE_PRCC_CLK(6, cryp0, 2, -1, NULL); |
| 392 | static DEFINE_PRCC_CLK(6, cryp1, 1, -1, NULL); | ||
| 392 | static DEFINE_PRCC_CLK(6, rng, 0, 0, &clk_rngclk); | 393 | static DEFINE_PRCC_CLK(6, rng, 0, 0, &clk_rngclk); |
| 393 | 394 | ||
| 394 | static struct clk clk_dummy_apb_pclk = { | 395 | static struct clk clk_dummy_apb_pclk = { |
| @@ -430,6 +431,7 @@ static struct clk_lookup u8500_clks[] = { | |||
| 430 | CLK(pka, "pka", NULL), | 431 | CLK(pka, "pka", NULL), |
| 431 | CLK(hash0, "hash0", NULL), | 432 | CLK(hash0, "hash0", NULL), |
| 432 | CLK(cryp0, "cryp0", NULL), | 433 | CLK(cryp0, "cryp0", NULL), |
| 434 | CLK(cryp1, "cryp1", NULL), | ||
| 433 | 435 | ||
| 434 | /* PRCMU level clock gating */ | 436 | /* PRCMU level clock gating */ |
| 435 | 437 | ||
diff --git a/arch/arm/mach-ux500/devices-common.h b/arch/arm/mach-ux500/devices-common.h index 7cbccfd9e158..6e4706560266 100644 --- a/arch/arm/mach-ux500/devices-common.h +++ b/arch/arm/mach-ux500/devices-common.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/sys_soc.h> | 13 | #include <linux/sys_soc.h> |
| 14 | #include <linux/amba/bus.h> | 14 | #include <linux/amba/bus.h> |
| 15 | #include <plat/i2c.h> | 15 | #include <plat/i2c.h> |
| 16 | #include <mach/crypto-ux500.h> | ||
| 16 | 17 | ||
| 17 | struct spi_master_cntlr; | 18 | struct spi_master_cntlr; |
| 18 | 19 | ||
| @@ -85,6 +86,55 @@ dbx500_add_rtc(struct device *parent, resource_size_t base, int irq) | |||
