Skip to content

Commit 08c93cd

Browse files
committed
Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next
Marc Kleine-Budde says: ==================== this is a pull request of three patches for net-next/master. Oleg Moroz added support for a new PCI card to the generic SJA1000 PCI driver, Guenter Roeck's patch limits the flexcan driver to little endian arm (and powerpc) and I fixed a sparse warning found by the kbuild robot in the ti_hecc driver. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 63862b5 + ea79c1c commit 08c93cd

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

drivers/net/can/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ config CAN_JANZ_ICAN3
104104

105105
config CAN_FLEXCAN
106106
tristate "Support for Freescale FLEXCAN based chips"
107-
depends on ARM || PPC
107+
depends on (ARM && CPU_LITTLE_ENDIAN) || PPC
108108
---help---
109109
Say Y here if you want to support for Freescale FlexCAN.
110110

drivers/net/can/sja1000/plx_pci.c

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ MODULE_SUPPORTED_DEVICE("Adlink PCI-7841/cPCI-7841, "
4444
"esd CAN-PCI/PMC/266, "
4545
"esd CAN-PCIe/2000, "
4646
"Connect Tech Inc. CANpro/104-Plus Opto (CRG001), "
47-
"IXXAT PC-I 04/PCI")
47+
"IXXAT PC-I 04/PCI, "
48+
"ELCUS CAN-200-PCI")
4849
MODULE_LICENSE("GPL v2");
4950

5051
#define PLX_PCI_MAX_CHAN 2
@@ -122,6 +123,11 @@ struct plx_pci_card {
122123
#define ESD_PCI_SUB_SYS_ID_PCIE2000 0x0200
123124
#define ESD_PCI_SUB_SYS_ID_PCI104200 0x0501
124125

126+
#define CAN200PCI_DEVICE_ID 0x9030
127+
#define CAN200PCI_VENDOR_ID 0x10b5
128+
#define CAN200PCI_SUB_DEVICE_ID 0x0301
129+
#define CAN200PCI_SUB_VENDOR_ID 0xe1c5
130+
125131
#define IXXAT_PCI_VENDOR_ID 0x10b5
126132
#define IXXAT_PCI_DEVICE_ID 0x9050
127133
#define IXXAT_PCI_SUB_SYS_ID 0x2540
@@ -233,6 +239,14 @@ static struct plx_pci_card_info plx_pci_card_info_cti = {
233239
/* based on PLX9030 */
234240
};
235241

242+
static struct plx_pci_card_info plx_pci_card_info_elcus = {
243+
"Eclus CAN-200-PCI", 2,
244+
PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR,
245+
{1, 0x00, 0x00}, { {2, 0x00, 0x80}, {3, 0x00, 0x80} },
246+
&plx_pci_reset_common
247+
/* based on PLX9030 */
248+
};
249+
236250
static DEFINE_PCI_DEVICE_TABLE(plx_pci_tbl) = {
237251
{
238252
/* Adlink PCI-7841/cPCI-7841 */
@@ -318,6 +332,13 @@ static DEFINE_PCI_DEVICE_TABLE(plx_pci_tbl) = {
318332
0, 0,
319333
(kernel_ulong_t)&plx_pci_card_info_cti
320334
},
335+
{
336+
/* Elcus CAN-200-PCI */
337+
CAN200PCI_VENDOR_ID, CAN200PCI_DEVICE_ID,
338+
CAN200PCI_SUB_VENDOR_ID, CAN200PCI_SUB_DEVICE_ID,
339+
0, 0,
340+
(kernel_ulong_t)&plx_pci_card_info_elcus
341+
},
321342
{ 0,}
322343
};
323344
MODULE_DEVICE_TABLE(pci, plx_pci_tbl);

drivers/net/can/ti_hecc.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -518,10 +518,10 @@ static netdev_tx_t ti_hecc_xmit(struct sk_buff *skb, struct net_device *ndev)
518518
data = (cf->can_id & CAN_SFF_MASK) << 18;
519519
hecc_write_mbx(priv, mbxno, HECC_CANMID, data);
520520
hecc_write_mbx(priv, mbxno, HECC_CANMDL,
521-
be32_to_cpu(*(u32 *)(cf->data)));
521+
be32_to_cpu(*(__be32 *)(cf->data)));
522522
if (cf->can_dlc > 4)
523523
hecc_write_mbx(priv, mbxno, HECC_CANMDH,
524-
be32_to_cpu(*(u32 *)(cf->data + 4)));
524+
be32_to_cpu(*(__be32 *)(cf->data + 4)));
525525
else
526526
*(u32 *)(cf->data + 4) = 0;
527527
can_put_echo_skb(skb, ndev, mbxno);
@@ -569,12 +569,10 @@ static int ti_hecc_rx_pkt(struct ti_hecc_priv *priv, int mbxno)
569569
cf->can_id |= CAN_RTR_FLAG;
570570
cf->can_dlc = get_can_dlc(data & 0xF);
571571
data = hecc_read_mbx(priv, mbxno, HECC_CANMDL);
572-
*(u32 *)(cf->data) = cpu_to_be32(data);
572+
*(__be32 *)(cf->data) = cpu_to_be32(data);
573573
if (cf->can_dlc > 4) {
574574
data = hecc_read_mbx(priv, mbxno, HECC_CANMDH);
575-
*(u32 *)(cf->data + 4) = cpu_to_be32(data);
576-
} else {
577-
*(u32 *)(cf->data + 4) = 0;
575+
*(__be32 *)(cf->data + 4) = cpu_to_be32(data);
578576
}
579577
spin_lock_irqsave(&priv->mbx_lock, flags);
580578
hecc_clear_bit(priv, HECC_CANME, mbx_mask);

0 commit comments

Comments
 (0)