Skip to content

Commit eb7caf3

Browse files
committed
n2_crypto: Attach on Niagara-T3.
A small modification was necessary since in the machine description for 'n2cp' and 'ncp' nodes, there no longer is an 'intr' property. That's OK because this property was always nothing more than an array of integers '1' ... 'nr_inos + 1' so we can just compute it in-place. Signed-off-by: David S. Miller <[email protected]>
1 parent 24f1466 commit eb7caf3

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

drivers/crypto/n2_core.c

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* n2_core.c: Niagara2 Stream Processing Unit (SPU) crypto support.
22
*
3-
* Copyright (C) 2010 David S. Miller <[email protected]>
3+
* Copyright (C) 2010, 2011 David S. Miller <[email protected]>
44
*/
55

66
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -31,8 +31,8 @@
3131
#include "n2_core.h"
3232

3333
#define DRV_MODULE_NAME "n2_crypto"
34-
#define DRV_MODULE_VERSION "0.1"
35-
#define DRV_MODULE_RELDATE "April 29, 2010"
34+
#define DRV_MODULE_VERSION "0.2"
35+
#define DRV_MODULE_RELDATE "July 28, 2011"
3636

3737
static char version[] __devinitdata =
3838
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
18231823
static int __devinit get_irq_props(struct mdesc_handle *mdesc, u64 node,
18241824
struct spu_mdesc_info *ip)
18251825
{
1826-
const u64 *intr, *ino;
1827-
int intr_len, ino_len;
1826+
const u64 *ino;
1827+
int ino_len;
18281828
int i;
18291829

1830-
intr = mdesc_get_property(mdesc, node, "intr", &intr_len);
1831-
if (!intr)
1832-
return -ENODEV;
1833-
18341830
ino = mdesc_get_property(mdesc, node, "ino", &ino_len);
1835-
if (!ino)
1831+
if (!ino) {
1832+
printk("NO 'ino'\n");
18361833
return -ENODEV;
1834+
}
18371835

1838-
if (intr_len != ino_len)
1839-
return -EINVAL;
1840-
1841-
ip->num_intrs = intr_len / sizeof(u64);
1836+
ip->num_intrs = ino_len / sizeof(u64);
18421837
ip->ino_table = kzalloc((sizeof(struct ino_blob) *
18431838
ip->num_intrs),
18441839
GFP_KERNEL);
@@ -1847,7 +1842,7 @@ static int __devinit get_irq_props(struct mdesc_handle *mdesc, u64 node,
18471842

18481843
for (i = 0; i < ip->num_intrs; i++) {
18491844
struct ino_blob *b = &ip->ino_table[i];
1850-
b->intr = intr[i];
1845+
b->intr = i + 1;
18511846
b->ino = ino[i];
18521847
}
18531848

@@ -2204,6 +2199,10 @@ static struct of_device_id n2_crypto_match[] = {
22042199
.name = "n2cp",
22052200
.compatible = "SUNW,vf-cwq",
22062201
},
2202+
{
2203+
.name = "n2cp",
2204+
.compatible = "SUNW,kt-cwq",
2205+
},
22072206
{},
22082207
};
22092208

@@ -2228,6 +2227,10 @@ static struct of_device_id n2_mau_match[] = {
22282227
.name = "ncp",
22292228
.compatible = "SUNW,vf-mau",
22302229
},
2230+
{
2231+
.name = "ncp",
2232+
.compatible = "SUNW,kt-mau",
2233+
},
22312234
{},
22322235
};
22332236

0 commit comments

Comments
 (0)