mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 21:21:09 +00:00
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 <davem@davemloft.net>
This commit is contained in:
commit
08c93cd99b
3 changed files with 27 additions and 8 deletions
|
@ -104,7 +104,7 @@ config CAN_JANZ_ICAN3
|
||||||
|
|
||||||
config CAN_FLEXCAN
|
config CAN_FLEXCAN
|
||||||
tristate "Support for Freescale FLEXCAN based chips"
|
tristate "Support for Freescale FLEXCAN based chips"
|
||||||
depends on ARM || PPC
|
depends on (ARM && CPU_LITTLE_ENDIAN) || PPC
|
||||||
---help---
|
---help---
|
||||||
Say Y here if you want to support for Freescale FlexCAN.
|
Say Y here if you want to support for Freescale FlexCAN.
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,8 @@ MODULE_SUPPORTED_DEVICE("Adlink PCI-7841/cPCI-7841, "
|
||||||
"esd CAN-PCI/PMC/266, "
|
"esd CAN-PCI/PMC/266, "
|
||||||
"esd CAN-PCIe/2000, "
|
"esd CAN-PCIe/2000, "
|
||||||
"Connect Tech Inc. CANpro/104-Plus Opto (CRG001), "
|
"Connect Tech Inc. CANpro/104-Plus Opto (CRG001), "
|
||||||
"IXXAT PC-I 04/PCI")
|
"IXXAT PC-I 04/PCI, "
|
||||||
|
"ELCUS CAN-200-PCI")
|
||||||
MODULE_LICENSE("GPL v2");
|
MODULE_LICENSE("GPL v2");
|
||||||
|
|
||||||
#define PLX_PCI_MAX_CHAN 2
|
#define PLX_PCI_MAX_CHAN 2
|
||||||
|
@ -122,6 +123,11 @@ struct plx_pci_card {
|
||||||
#define ESD_PCI_SUB_SYS_ID_PCIE2000 0x0200
|
#define ESD_PCI_SUB_SYS_ID_PCIE2000 0x0200
|
||||||
#define ESD_PCI_SUB_SYS_ID_PCI104200 0x0501
|
#define ESD_PCI_SUB_SYS_ID_PCI104200 0x0501
|
||||||
|
|
||||||
|
#define CAN200PCI_DEVICE_ID 0x9030
|
||||||
|
#define CAN200PCI_VENDOR_ID 0x10b5
|
||||||
|
#define CAN200PCI_SUB_DEVICE_ID 0x0301
|
||||||
|
#define CAN200PCI_SUB_VENDOR_ID 0xe1c5
|
||||||
|
|
||||||
#define IXXAT_PCI_VENDOR_ID 0x10b5
|
#define IXXAT_PCI_VENDOR_ID 0x10b5
|
||||||
#define IXXAT_PCI_DEVICE_ID 0x9050
|
#define IXXAT_PCI_DEVICE_ID 0x9050
|
||||||
#define IXXAT_PCI_SUB_SYS_ID 0x2540
|
#define IXXAT_PCI_SUB_SYS_ID 0x2540
|
||||||
|
@ -233,6 +239,14 @@ static struct plx_pci_card_info plx_pci_card_info_cti = {
|
||||||
/* based on PLX9030 */
|
/* based on PLX9030 */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct plx_pci_card_info plx_pci_card_info_elcus = {
|
||||||
|
"Eclus CAN-200-PCI", 2,
|
||||||
|
PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR,
|
||||||
|
{1, 0x00, 0x00}, { {2, 0x00, 0x80}, {3, 0x00, 0x80} },
|
||||||
|
&plx_pci_reset_common
|
||||||
|
/* based on PLX9030 */
|
||||||
|
};
|
||||||
|
|
||||||
static DEFINE_PCI_DEVICE_TABLE(plx_pci_tbl) = {
|
static DEFINE_PCI_DEVICE_TABLE(plx_pci_tbl) = {
|
||||||
{
|
{
|
||||||
/* Adlink PCI-7841/cPCI-7841 */
|
/* Adlink PCI-7841/cPCI-7841 */
|
||||||
|
@ -318,6 +332,13 @@ static DEFINE_PCI_DEVICE_TABLE(plx_pci_tbl) = {
|
||||||
0, 0,
|
0, 0,
|
||||||
(kernel_ulong_t)&plx_pci_card_info_cti
|
(kernel_ulong_t)&plx_pci_card_info_cti
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
/* Elcus CAN-200-PCI */
|
||||||
|
CAN200PCI_VENDOR_ID, CAN200PCI_DEVICE_ID,
|
||||||
|
CAN200PCI_SUB_VENDOR_ID, CAN200PCI_SUB_DEVICE_ID,
|
||||||
|
0, 0,
|
||||||
|
(kernel_ulong_t)&plx_pci_card_info_elcus
|
||||||
|
},
|
||||||
{ 0,}
|
{ 0,}
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(pci, plx_pci_tbl);
|
MODULE_DEVICE_TABLE(pci, plx_pci_tbl);
|
||||||
|
|
|
@ -518,10 +518,10 @@ static netdev_tx_t ti_hecc_xmit(struct sk_buff *skb, struct net_device *ndev)
|
||||||
data = (cf->can_id & CAN_SFF_MASK) << 18;
|
data = (cf->can_id & CAN_SFF_MASK) << 18;
|
||||||
hecc_write_mbx(priv, mbxno, HECC_CANMID, data);
|
hecc_write_mbx(priv, mbxno, HECC_CANMID, data);
|
||||||
hecc_write_mbx(priv, mbxno, HECC_CANMDL,
|
hecc_write_mbx(priv, mbxno, HECC_CANMDL,
|
||||||
be32_to_cpu(*(u32 *)(cf->data)));
|
be32_to_cpu(*(__be32 *)(cf->data)));
|
||||||
if (cf->can_dlc > 4)
|
if (cf->can_dlc > 4)
|
||||||
hecc_write_mbx(priv, mbxno, HECC_CANMDH,
|
hecc_write_mbx(priv, mbxno, HECC_CANMDH,
|
||||||
be32_to_cpu(*(u32 *)(cf->data + 4)));
|
be32_to_cpu(*(__be32 *)(cf->data + 4)));
|
||||||
else
|
else
|
||||||
*(u32 *)(cf->data + 4) = 0;
|
*(u32 *)(cf->data + 4) = 0;
|
||||||
can_put_echo_skb(skb, ndev, mbxno);
|
can_put_echo_skb(skb, ndev, mbxno);
|
||||||
|
@ -569,12 +569,10 @@ static int ti_hecc_rx_pkt(struct ti_hecc_priv *priv, int mbxno)
|
||||||
cf->can_id |= CAN_RTR_FLAG;
|
cf->can_id |= CAN_RTR_FLAG;
|
||||||
cf->can_dlc = get_can_dlc(data & 0xF);
|
cf->can_dlc = get_can_dlc(data & 0xF);
|
||||||
data = hecc_read_mbx(priv, mbxno, HECC_CANMDL);
|
data = hecc_read_mbx(priv, mbxno, HECC_CANMDL);
|
||||||
*(u32 *)(cf->data) = cpu_to_be32(data);
|
*(__be32 *)(cf->data) = cpu_to_be32(data);
|
||||||
if (cf->can_dlc > 4) {
|
if (cf->can_dlc > 4) {
|
||||||
data = hecc_read_mbx(priv, mbxno, HECC_CANMDH);
|
data = hecc_read_mbx(priv, mbxno, HECC_CANMDH);
|
||||||
*(u32 *)(cf->data + 4) = cpu_to_be32(data);
|
*(__be32 *)(cf->data + 4) = cpu_to_be32(data);
|
||||||
} else {
|
|
||||||
*(u32 *)(cf->data + 4) = 0;
|
|
||||||
}
|
}
|
||||||
spin_lock_irqsave(&priv->mbx_lock, flags);
|
spin_lock_irqsave(&priv->mbx_lock, flags);
|
||||||
hecc_clear_bit(priv, HECC_CANME, mbx_mask);
|
hecc_clear_bit(priv, HECC_CANME, mbx_mask);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue