bf609: crypto: Add blackfin crypto crc driver platform data.
authorSonic Zhang <sonic.zhang@analog.com>
Tue, 22 May 2012 10:25:57 +0000 (18:25 +0800)
committerBob Liu <lliubbo@gmail.com>
Tue, 24 Jul 2012 05:39:48 +0000 (13:39 +0800)
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
arch/blackfin/mach-bf609/boards/ezkit.c

index 12488df1ac802d50111fde23a7ff7bc6e34ab1cd..3064097b1503f2512cc1f0252e1249618b21c753 100644 (file)
@@ -947,6 +947,44 @@ static struct platform_device bfin_crc1_device = {
 };
 #endif
 
+#if defined(CONFIG_CRYPTO_DEV_BFIN_CRC)
+#define BFIN_CRYPTO_CRC_NAME           "bfin-hmac-crc"
+#define BFIN_CRYPTO_CRC_POLY_DATA      0x5c5c5c5c
+
+static struct resource bfin_crypto_crc_resources[] = {
+       {
+               .start = REG_CRC0_CTL,
+               .end = REG_CRC0_REVID+4,
+               .flags = IORESOURCE_MEM,
+       },
+       {
+               .start = IRQ_CRC0_DCNTEXP,
+               .end = IRQ_CRC0_DCNTEXP,
+               .flags = IORESOURCE_IRQ,
+       },
+       {
+               .start = CH_MEM_STREAM0_SRC_CRC0,
+               .end = CH_MEM_STREAM0_SRC_CRC0,
+               .flags = IORESOURCE_DMA,
+       },
+       {
+               .start = CH_MEM_STREAM0_DEST_CRC0,
+               .end = CH_MEM_STREAM0_DEST_CRC0,
+               .flags = IORESOURCE_DMA,
+       },
+};
+
+static struct platform_device bfin_crypto_crc_device = {
+       .name = BFIN_CRYPTO_CRC_NAME,
+       .id = 0,
+       .num_resources = ARRAY_SIZE(bfin_crypto_crc_resources),
+       .resource = bfin_crypto_crc_resources,
+       .dev = {
+               .platform_data = (void *)BFIN_CRYPTO_CRC_POLY_DATA,
+       },
+};
+#endif
+
 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
 static const struct ad7877_platform_data bfin_ad7877_ts_info = {
        .model                  = 7877,
@@ -1261,6 +1299,9 @@ static struct platform_device *ezkit_devices[] __initdata = {
        &bfin_crc0_device,
        &bfin_crc1_device,
 #endif
+#if defined(CONFIG_CRYPTO_DEV_BFIN_CRC)
+       &bfin_crypto_crc_device,
+#endif
 
 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
        &bfin_device_gpiokeys,
This page took 0.026748 seconds and 5 git commands to generate.