aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-11 12:17:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-11 12:17:27 -0400
commit946880fa270c18c137654af70ba939f03181c6b6 (patch)
tree1fc66f0f55c17be3026d55fc261f4cbddaf80e90 /drivers
parent636d17427b1ef0e97bd9df9b3b0e0f314ff889d3 (diff)
parent42ea573f872365b0797ddbcee2e1f1f48913f507 (diff)
Merge branch 'ixp4xx' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6
* 'ixp4xx' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6: IXP4xx: Fix LL debugging on little-endian CPU. IXP4xx: Fix sparse warnings in I/O primitives. IXP4xx: Make mdio_bus struct static in the Ethernet driver. IXP4xx: Fix ixp4xx_crypto little-endian operation. IXP4xx: Prevent HSS transmitter lockup by disabling FRaMe signals. ixp4xx/vulcan: add PCI support ixp4xx: base support for Arcom Vulcan
Diffstat (limited to 'drivers')
-rw-r--r--drivers/crypto/ixp4xx_crypto.c21
-rw-r--r--drivers/net/arm/ixp4xx_eth.c2
-rw-r--r--drivers/net/wan/ixp4xx_hss.c2
3 files changed, 23 insertions, 2 deletions
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c
index f17ddf37a1e..0d662213c06 100644
--- a/drivers/crypto/ixp4xx_crypto.c
+++ b/drivers/crypto/ixp4xx_crypto.c
@@ -97,8 +97,13 @@
97 97
98struct buffer_desc { 98struct buffer_desc {
99 u32 phys_next; 99 u32 phys_next;
100#ifdef __ARMEB__
100 u16 buf_len; 101 u16 buf_len;
101 u16 pkt_len; 102 u16 pkt_len;
103#else
104 u16 pkt_len;
105 u16 buf_len;
106#endif
102 u32 phys_addr; 107 u32 phys_addr;
103 u32 __reserved[4]; 108 u32 __reserved[4];
104 struct buffer_desc *next; 109 struct buffer_desc *next;
@@ -106,17 +111,30 @@ struct buffer_desc {
106}; 111};
107 112
108struct crypt_ctl { 113struct crypt_ctl {
114#ifdef __ARMEB__
109 u8 mode; /* NPE_OP_* operation mode */ 115 u8 mode; /* NPE_OP_* operation mode */
110 u8 init_len; 116 u8 init_len;
111 u16 reserved; 117 u16 reserved;
118#else
119 u16 reserved;
120 u8 init_len;
121 u8 mode; /* NPE_OP_* operation mode */
122#endif
112 u8 iv[MAX_IVLEN]; /* IV for CBC mode or CTR IV for CTR mode */ 123 u8 iv[MAX_IVLEN]; /* IV for CBC mode or CTR IV for CTR mode */
113 u32 icv_rev_aes; /* icv or rev aes */ 124 u32 icv_rev_aes; /* icv or rev aes */
114 u32 src_buf; 125 u32 src_buf;
115 u32 dst_buf; 126 u32 dst_buf;
127#ifdef __ARMEB__
116 u16 auth_offs; /* Authentication start offset */ 128 u16 auth_offs; /* Authentication start offset */
117 u16 auth_len; /* Authentication data length */ 129 u16 auth_len; /* Authentication data length */
118 u16 crypt_offs; /* Cryption start offset */ 130 u16 crypt_offs; /* Cryption start offset */
119 u16 crypt_len; /* Cryption data length */ 131 u16 crypt_len; /* Cryption data length */
132#else
133 u16 auth_len; /* Authentication data length */
134 u16 auth_offs; /* Authentication start offset */
135 u16 crypt_len; /* Cryption data length */
136 u16 crypt_offs; /* Cryption start offset */
137#endif
120 u32 aadAddr; /* Additional Auth Data Addr for CCM mode */ 138 u32 aadAddr; /* Additional Auth Data Addr for CCM mode */
121 u32 crypto_ctx; /* NPE Crypto Param structure address */ 139 u32 crypto_ctx; /* NPE Crypto Param structure address */
122 140
@@ -652,6 +670,9 @@ static int setup_auth(struct crypto_tfm *tfm, int encrypt, unsigned authsize,
652 670
653 /* write cfg word to cryptinfo */ 671 /* write cfg word to cryptinfo */
654 cfgword = algo->cfgword | ( authsize << 6); /* (authsize/4) << 8 */ 672 cfgword = algo->cfgword | ( authsize << 6); /* (authsize/4) << 8 */
673#ifndef __ARMEB__
674 cfgword ^= 0xAA000000; /* change the "byte swap" flags */
675#endif
655 *(u32*)cinfo = cpu_to_be32(cfgword); 676 *(u32*)cinfo = cpu_to_be32(cfgword);
656 cinfo += sizeof(cfgword); 677 cinfo += sizeof(cfgword);
657 678
diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c
index 4f1cc7164ad..6028226a727 100644
--- a/drivers/net/arm/ixp4xx_eth.c
+++ b/drivers/net/arm/ixp4xx_eth.c
@@ -241,7 +241,7 @@ static inline void memcpy_swab32(u32 *dest, u32 *src, int cnt)
241 241
242static spinlock_t mdio_lock; 242static spinlock_t mdio_lock;
243static struct eth_regs __iomem *mdio_regs; /* mdio command and status only */ 243static struct eth_regs __iomem *mdio_regs; /* mdio command and status only */
244struct mii_bus *mdio_bus; 244static struct mii_bus *mdio_bus;
245static int ports_open; 245static int ports_open;
246static struct port *npe_port_tab[MAX_NPES]; 246static struct port *npe_port_tab[MAX_NPES];
247static struct dma_pool *dma_pool; 247static struct dma_pool *dma_pool;
diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c
index 88e363033e2..6c571e19883 100644
--- a/drivers/net/wan/ixp4xx_hss.c
+++ b/drivers/net/wan/ixp4xx_hss.c
@@ -396,7 +396,7 @@ static void hss_config(struct port *port)
396 msg.cmd = PORT_CONFIG_WRITE; 396 msg.cmd = PORT_CONFIG_WRITE;
397 msg.hss_port = port->id; 397 msg.hss_port = port->id;
398 msg.index = HSS_CONFIG_TX_PCR; 398 msg.index = HSS_CONFIG_TX_PCR;
399 msg.data32 = PCR_FRM_SYNC_OUTPUT_RISING | PCR_MSB_ENDIAN | 399 msg.data32 = PCR_FRM_PULSE_DISABLED | PCR_MSB_ENDIAN |
400 PCR_TX_DATA_ENABLE | PCR_SOF_NO_FBIT; 400 PCR_TX_DATA_ENABLE | PCR_SOF_NO_FBIT;
401 if (port->clock_type == CLOCK_INT) 401 if (port->clock_type == CLOCK_INT)
402 msg.data32 |= PCR_SYNC_CLK_DIR_OUTPUT; 402 msg.data32 |= PCR_SYNC_CLK_DIR_OUTPUT;