diff options
author | Philippe Langlais <philippe.langlais@stericsson.com> | 2011-10-17 09:54:29 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2012-01-05 10:11:22 +0000 |
commit | 4049daf87112fe1d270ac52fcfe9672a0e29e86f (patch) | |
tree | bafd3d39d6dea2abd45a6b4f353901a996e90fdf /arch/arm/mach-ux500/board-mop500.c | |
parent | 8a7d5f3bd5ea31559f399b307e2b7645b67403f5 (diff) |
mach-ux500: cryp/hash: Updated for both u8500 & u5500
cryp1 & hash1 updated to be compatible on both u8500 and u5500:
- added to u5500_defconfig.
- settings from devices.c to board-mop500.c & board-u5500.c.
- dynamic driver registration in board-mop500.c & board-u5500.c.
- added cryp1 to clock-db5500.c and renamed cryp to cryp0.
- added function dbx500_add_platform_device_noirq to devices-common.c.
- added cryp1 and hash1 inline functions to devices-common.h
(dbx500_add_cryp1).
- defines added to devices-db5500.h and devices-db8500.h.
- u8500_cryp/hash changed to ux500_cryp/hash.
- update to handle different value for CRYP_PERIPHERAL_ID2 between
u8500 and u5500 (more info in ER336742).
Signed-off-by: Avinash A <Avinash.a@stericsson.com>
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500.c')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 7d411486458..2e2ec3420b6 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -53,6 +53,7 @@ #ifdef CONFIG_U8500_SIM_DETECT #include <mach/sim_detect.h> #endif +#include <mach/crypto-ux500.h> #ifdef CONFIG_KEYBOARD_NOMADIK_SKE #include <plat/ske.h> @@ -789,6 +790,42 @@ struct platform_device sensors1p_device = { }; #endif +static struct cryp_platform_data u8500_cryp1_platform_data = { + .mem_to_engine = { + .dir = STEDMA40_MEM_TO_PERIPH, + .src_dev_type = STEDMA40_DEV_SRC_MEMORY, + .dst_dev_type = DB8500_DMA_DEV48_CAC1_TX, + .src_info.data_width = STEDMA40_WORD_WIDTH, + .dst_info.data_width = STEDMA40_WORD_WIDTH, + .mode = STEDMA40_MODE_LOGICAL, + .src_info.psize = STEDMA40_PSIZE_LOG_4, + .dst_info.psize = STEDMA40_PSIZE_LOG_4, + }, + .engine_to_mem = { + .dir = STEDMA40_PERIPH_TO_MEM, + .src_dev_type = DB8500_DMA_DEV48_CAC1_RX, + .dst_dev_type = STEDMA40_DEV_DST_MEMORY, + .src_info.data_width = STEDMA40_WORD_WIDTH, + .dst_info.data_width = STEDMA40_WORD_WIDTH, + .mode = STEDMA40_MODE_LOGICAL, + .src_info.psize = STEDMA40_PSIZE_LOG_4, + .dst_info.psize = STEDMA40_PSIZE_LOG_4, + } +}; + +static struct hash_platform_data u8500_hash1_platform_data = { + .mem_to_engine = { + .dir = STEDMA40_MEM_TO_PERIPH, + .src_dev_type = STEDMA40_DEV_SRC_MEMORY, + .dst_dev_type = DB8500_DMA_DEV50_HAC1_TX, + .src_info.data_width = STEDMA40_WORD_WIDTH, + .dst_info.data_width = STEDMA40_WORD_WIDTH, + .mode = STEDMA40_MODE_LOGICAL, + .src_info.psize = STEDMA40_PSIZE_LOG_16, + .dst_info.psize = STEDMA40_PSIZE_LOG_16, + }, +}; + /* add any platform devices here - TODO */ static struct platform_device *mop500_platform_devs[] __initdata = { #ifdef CONFIG_SENSORS1P_MOP @@ -1026,6 +1063,12 @@ static void __init mop500_uart_init(void) db8500_add_uart2(&uart2_plat); } +static void __init u8500_cryp1_hash1_init(void) +{ + db8500_add_cryp1(&u8500_cryp1_platform_data); + db8500_add_hash1(&u8500_hash1_platform_data); +} + static struct platform_device *snowball_platform_devs[] __initdata = { &ux500_hwmem_device, &snowball_led_dev, @@ -1064,6 +1107,8 @@ static void __init mop500_init_machine(void) mop500_pins_init(); + u8500_cryp1_hash1_init(); + platform_add_devices(mop500_platform_devs, ARRAY_SIZE(mop500_platform_devs)); @@ -1094,6 +1139,8 @@ static void __init snowball_init_machine(void) snowball_pins_init(); + u8500_cryp1_hash1_init(); + platform_add_devices(snowball_platform_devs, ARRAY_SIZE(snowball_platform_devs)); @@ -1133,6 +1180,8 @@ static void __init hrefv60_init_machine(void) hrefv60_pins_init(); + u8500_cryp1_hash1_init(); + platform_add_devices(mop500_platform_devs, ARRAY_SIZE(mop500_platform_devs)); |