diff options
author | David S. Miller <davem@davemloft.net> | 2013-10-23 16:28:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-23 16:49:34 -0400 |
commit | c3fa32b9764dc45dcf8a2231b1c110abc4a63e0b (patch) | |
tree | 6cf2896a77b65bec64284681e1c3851eb3263e09 /drivers/net/can | |
parent | 34d92d5315b64a3e5292b7e9511c1bb617227fb6 (diff) | |
parent | 320437af954cbe66478f1f5e8b34cb5a8d072191 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/usb/qmi_wwan.c
include/net/dst.h
Trivial merge conflicts, both were overlapping changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/at91_can.c | 4 | ||||
-rw-r--r-- | drivers/net/can/flexcan.c | 14 |
2 files changed, 12 insertions, 6 deletions
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c index 64f2efaf7638..cf0f63e14e53 100644 --- a/drivers/net/can/at91_can.c +++ b/drivers/net/can/at91_can.c | |||
@@ -1405,10 +1405,10 @@ static int at91_can_remove(struct platform_device *pdev) | |||
1405 | 1405 | ||
1406 | static const struct platform_device_id at91_can_id_table[] = { | 1406 | static const struct platform_device_id at91_can_id_table[] = { |
1407 | { | 1407 | { |
1408 | .name = "at91_can", | 1408 | .name = "at91sam9x5_can", |
1409 | .driver_data = (kernel_ulong_t)&at91_at91sam9x5_data, | 1409 | .driver_data = (kernel_ulong_t)&at91_at91sam9x5_data, |
1410 | }, { | 1410 | }, { |
1411 | .name = "at91sam9x5_can", | 1411 | .name = "at91_can", |
1412 | .driver_data = (kernel_ulong_t)&at91_at91sam9263_data, | 1412 | .driver_data = (kernel_ulong_t)&at91_at91sam9263_data, |
1413 | }, { | 1413 | }, { |
1414 | /* sentinel */ | 1414 | /* sentinel */ |
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index df010d64ecbb..ae08cf129ebb 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c | |||
@@ -62,7 +62,7 @@ | |||
62 | #define FLEXCAN_MCR_BCC BIT(16) | 62 | #define FLEXCAN_MCR_BCC BIT(16) |
63 | #define FLEXCAN_MCR_LPRIO_EN BIT(13) | 63 | #define FLEXCAN_MCR_LPRIO_EN BIT(13) |
64 | #define FLEXCAN_MCR_AEN BIT(12) | 64 | #define FLEXCAN_MCR_AEN BIT(12) |
65 | #define FLEXCAN_MCR_MAXMB(x) ((x) & 0xf) | 65 | #define FLEXCAN_MCR_MAXMB(x) ((x) & 0x1f) |
66 | #define FLEXCAN_MCR_IDAM_A (0 << 8) | 66 | #define FLEXCAN_MCR_IDAM_A (0 << 8) |
67 | #define FLEXCAN_MCR_IDAM_B (1 << 8) | 67 | #define FLEXCAN_MCR_IDAM_B (1 << 8) |
68 | #define FLEXCAN_MCR_IDAM_C (2 << 8) | 68 | #define FLEXCAN_MCR_IDAM_C (2 << 8) |
@@ -735,9 +735,11 @@ static int flexcan_chip_start(struct net_device *dev) | |||
735 | * | 735 | * |
736 | */ | 736 | */ |
737 | reg_mcr = flexcan_read(®s->mcr); | 737 | reg_mcr = flexcan_read(®s->mcr); |
738 | reg_mcr &= ~FLEXCAN_MCR_MAXMB(0xff); | ||
738 | reg_mcr |= FLEXCAN_MCR_FRZ | FLEXCAN_MCR_FEN | FLEXCAN_MCR_HALT | | 739 | reg_mcr |= FLEXCAN_MCR_FRZ | FLEXCAN_MCR_FEN | FLEXCAN_MCR_HALT | |
739 | FLEXCAN_MCR_SUPV | FLEXCAN_MCR_WRN_EN | | 740 | FLEXCAN_MCR_SUPV | FLEXCAN_MCR_WRN_EN | |
740 | FLEXCAN_MCR_IDAM_C | FLEXCAN_MCR_SRX_DIS; | 741 | FLEXCAN_MCR_IDAM_C | FLEXCAN_MCR_SRX_DIS | |
742 | FLEXCAN_MCR_MAXMB(FLEXCAN_TX_BUF_ID); | ||
741 | netdev_dbg(dev, "%s: writing mcr=0x%08x", __func__, reg_mcr); | 743 | netdev_dbg(dev, "%s: writing mcr=0x%08x", __func__, reg_mcr); |
742 | flexcan_write(reg_mcr, ®s->mcr); | 744 | flexcan_write(reg_mcr, ®s->mcr); |
743 | 745 | ||
@@ -771,6 +773,10 @@ static int flexcan_chip_start(struct net_device *dev) | |||
771 | netdev_dbg(dev, "%s: writing ctrl=0x%08x", __func__, reg_ctrl); | 773 | netdev_dbg(dev, "%s: writing ctrl=0x%08x", __func__, reg_ctrl); |
772 | flexcan_write(reg_ctrl, ®s->ctrl); | 774 | flexcan_write(reg_ctrl, ®s->ctrl); |
773 | 775 | ||
776 | /* Abort any pending TX, mark Mailbox as INACTIVE */ | ||
777 | flexcan_write(FLEXCAN_MB_CNT_CODE(0x4), | ||
778 | ®s->cantxfg[FLEXCAN_TX_BUF_ID].can_ctrl); | ||
779 | |||
774 | /* acceptance mask/acceptance code (accept everything) */ | 780 | /* acceptance mask/acceptance code (accept everything) */ |
775 | flexcan_write(0x0, ®s->rxgmask); | 781 | flexcan_write(0x0, ®s->rxgmask); |
776 | flexcan_write(0x0, ®s->rx14mask); | 782 | flexcan_write(0x0, ®s->rx14mask); |
@@ -979,9 +985,9 @@ static void unregister_flexcandev(struct net_device *dev) | |||
979 | } | 985 | } |
980 | 986 | ||
981 | static const struct of_device_id flexcan_of_match[] = { | 987 | static const struct of_device_id flexcan_of_match[] = { |
982 | { .compatible = "fsl,p1010-flexcan", .data = &fsl_p1010_devtype_data, }, | ||
983 | { .compatible = "fsl,imx28-flexcan", .data = &fsl_imx28_devtype_data, }, | ||
984 | { .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, }, | 988 | { .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, }, |
989 | { .compatible = "fsl,imx28-flexcan", .data = &fsl_imx28_devtype_data, }, | ||
990 | { .compatible = "fsl,p1010-flexcan", .data = &fsl_p1010_devtype_data, }, | ||
985 | { /* sentinel */ }, | 991 | { /* sentinel */ }, |
986 | }; | 992 | }; |
987 | MODULE_DEVICE_TABLE(of, flexcan_of_match); | 993 | MODULE_DEVICE_TABLE(of, flexcan_of_match); |