aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/crypto/n2_core.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c
index 2e5b2044c96f..d0183ddb3076 100644
--- a/drivers/crypto/n2_core.c
+++ b/drivers/crypto/n2_core.c
@@ -1,6 +1,6 @@
1/* n2_core.c: Niagara2 Stream Processing Unit (SPU) crypto support. 1/* n2_core.c: Niagara2 Stream Processing Unit (SPU) crypto support.
2 * 2 *
3 * Copyright (C) 2010 David S. Miller <davem@davemloft.net> 3 * Copyright (C) 2010, 2011 David S. Miller <davem@davemloft.net>
4 */ 4 */
5 5
6#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 6#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -31,8 +31,8 @@
31#include "n2_core.h" 31#include "n2_core.h"
32 32
33#define DRV_MODULE_NAME "n2_crypto" 33#define DRV_MODULE_NAME "n2_crypto"
34#define DRV_MODULE_VERSION "0.1" 34#define DRV_MODULE_VERSION "0.2"
35#define DRV_MODULE_RELDATE "April 29, 2010" 35#define DRV_MODULE_RELDATE "July 28, 2011"
36 36
37static char version[] __devinitdata = 37static char version[] __devinitdata =
38 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 38 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
@@ -1823,22 +1823,17 @@ static int spu_mdesc_scan(struct mdesc_handle *mdesc, struct platform_device *de
1823static int __devinit get_irq_props(struct mdesc_handle *mdesc, u64 node, 1823static int __devinit get_irq_props(struct mdesc_handle *mdesc, u64 node,
1824 struct spu_mdesc_info *ip) 1824 struct spu_mdesc_info *ip)
1825{ 1825{
1826 const u64 *intr, *ino; 1826 const u64 *ino;
1827 int intr_len, ino_len; 1827 int ino_len;
1828 int i; 1828 int i;
1829 1829
1830 intr = mdesc_get_property(mdesc, node, "intr", &intr_len);
1831 if (!intr)
1832 return -ENODEV;
1833
1834 ino = mdesc_get_property(mdesc, node, "ino", &ino_len); 1830 ino = mdesc_get_property(mdesc, node, "ino", &ino_len);
1835 if (!ino) 1831 if (!ino) {
1832 printk("NO 'ino'\n");
1836 return -ENODEV; 1833 return -ENODEV;
1834 }
1837 1835
1838 if (intr_len != ino_len) 1836 ip->num_intrs = ino_len / sizeof(u64);
1839 return -EINVAL;
1840
1841 ip->num_intrs = intr_len / sizeof(u64);
1842 ip->ino_table = kzalloc((sizeof(struct ino_blob) * 1837 ip->ino_table = kzalloc((sizeof(struct ino_blob) *
1843 ip->num_intrs), 1838 ip->num_intrs),
1844 GFP_KERNEL); 1839 GFP_KERNEL);
@@ -1847,7 +1842,7 @@ static int __devinit get_irq_props(struct mdesc_handle *mdesc, u64 node,
1847 1842
1848 for (i = 0; i < ip->num_intrs; i++) { 1843 for (i = 0; i < ip->num_intrs; i++) {
1849 struct ino_blob *b = &ip->ino_table[i]; 1844 struct ino_blob *b = &ip->ino_table[i];
1850 b->intr = intr[i]; 1845 b->intr = i + 1;
1851 b->ino = ino[i]; 1846 b->ino = ino[i];
1852 } 1847 }
1853 1848
@@ -2204,6 +2199,10 @@ static struct of_device_id n2_crypto_match[] = {
2204 .name = "n2cp", 2199 .name = "n2cp",
2205 .compatible = "SUNW,vf-cwq", 2200 .compatible = "SUNW,vf-cwq",
2206 }, 2201 },
2202 {
2203 .name = "n2cp",
2204 .compatible = "SUNW,kt-cwq",
2205 },
2207 {}, 2206 {},
2208}; 2207};
2209 2208
@@ -2228,6 +2227,10 @@ static struct of_device_id n2_mau_match[] = {
2228 .name = "ncp", 2227 .name = "ncp",
2229 .compatible = "SUNW,vf-mau", 2228 .compatible = "SUNW,vf-mau",
2230 }, 2229 },
2230 {
2231 .name = "ncp",
2232 .compatible = "SUNW,kt-mau",
2233 },
2231 {}, 2234 {},
2232}; 2235};
2233 2236