aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/layerscape/patches-5.4/802-can-0019-can-flexcan-add-CAN-FD-mode-support.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/layerscape/patches-5.4/802-can-0019-can-flexcan-add-CAN-FD-mode-support.patch')
-rw-r--r--target/linux/layerscape/patches-5.4/802-can-0019-can-flexcan-add-CAN-FD-mode-support.patch24
1 files changed, 12 insertions, 12 deletions
diff --git a/target/linux/layerscape/patches-5.4/802-can-0019-can-flexcan-add-CAN-FD-mode-support.patch b/target/linux/layerscape/patches-5.4/802-can-0019-can-flexcan-add-CAN-FD-mode-support.patch
index e9c8740e6b..b6f8a3a3cf 100644
--- a/target/linux/layerscape/patches-5.4/802-can-0019-can-flexcan-add-CAN-FD-mode-support.patch
+++ b/target/linux/layerscape/patches-5.4/802-can-0019-can-flexcan-add-CAN-FD-mode-support.patch
@@ -93,7 +93,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
};
struct flexcan_devtype_data {
-@@ -337,6 +367,30 @@ static const struct can_bittiming_const
+@@ -336,6 +366,30 @@ static const struct can_bittiming_const
.brp_inc = 1,
};
@@ -124,7 +124,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
/* FlexCAN module is essentially modelled as a little-endian IP in most
* SoCs, i.e the registers as well as the message buffer areas are
* implemented in a little-endian fashion.
-@@ -631,7 +685,7 @@ static netdev_tx_t flexcan_start_xmit(st
+@@ -630,7 +684,7 @@ static netdev_tx_t flexcan_start_xmit(st
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
u32 can_id;
u32 data;
@@ -133,7 +133,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
int i;
if (can_dropped_invalid_skb(dev, skb))
-@@ -649,6 +703,9 @@ static netdev_tx_t flexcan_start_xmit(st
+@@ -648,6 +702,9 @@ static netdev_tx_t flexcan_start_xmit(st
if (cfd->can_id & CAN_RTR_FLAG)
ctrl |= FLEXCAN_MB_CNT_RTR;
@@ -143,7 +143,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
for (i = 0; i < cfd->len; i += sizeof(u32)) {
data = be32_to_cpup((__be32 *)&cfd->data[i]);
priv->write(data, &priv->tx_mb->data[i / sizeof(u32)]);
-@@ -859,7 +916,10 @@ static struct sk_buff *flexcan_mailbox_r
+@@ -858,7 +915,10 @@ static struct sk_buff *flexcan_mailbox_r
reg_ctrl = priv->read(&mb->can_ctrl);
}
@@ -155,7 +155,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
if (unlikely(!skb)) {
skb = ERR_PTR(-ENOMEM);
goto mark_as_read;
-@@ -874,9 +934,17 @@ static struct sk_buff *flexcan_mailbox_r
+@@ -873,9 +933,17 @@ static struct sk_buff *flexcan_mailbox_r
else
cfd->can_id = (reg_id >> 18) & CAN_SFF_MASK;
@@ -176,7 +176,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
for (i = 0; i < cfd->len; i += sizeof(u32)) {
__be32 data = cpu_to_be32(priv->read(&mb->data[i / sizeof(u32)]));
-@@ -1021,27 +1089,14 @@ static irqreturn_t flexcan_irq(int irq,
+@@ -1020,27 +1088,14 @@ static irqreturn_t flexcan_irq(int irq,
static void flexcan_set_bittiming(struct net_device *dev)
{
@@ -209,7 +209,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
if (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)
reg |= FLEXCAN_CTRL_LPB;
if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
-@@ -1052,9 +1107,102 @@ static void flexcan_set_bittiming(struct
+@@ -1051,9 +1106,102 @@ static void flexcan_set_bittiming(struct
netdev_dbg(dev, "writing ctrl=0x%08x\n", reg);
priv->write(reg, &regs->ctrl);
@@ -315,7 +315,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
}
/* flexcan_chip_start
-@@ -1066,7 +1214,7 @@ static int flexcan_chip_start(struct net
+@@ -1065,7 +1213,7 @@ static int flexcan_chip_start(struct net
{
struct flexcan_priv *priv = netdev_priv(dev);
struct flexcan_regs __iomem *regs = priv->regs;
@@ -324,7 +324,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
u64 reg_imask;
int err, i;
struct flexcan_mb __iomem *mb;
-@@ -1163,6 +1311,26 @@ static int flexcan_chip_start(struct net
+@@ -1162,6 +1310,26 @@ static int flexcan_chip_start(struct net
netdev_dbg(dev, "%s: writing ctrl=0x%08x", __func__, reg_ctrl);
priv->write(reg_ctrl, &regs->ctrl);
@@ -351,7 +351,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
if ((priv->devtype_data->quirks & FLEXCAN_QUIRK_ENABLE_EACEN_RRS)) {
reg_ctrl2 = priv->read(&regs->ctrl2);
reg_ctrl2 |= FLEXCAN_CTRL2_EACEN | FLEXCAN_CTRL2_RRS;
-@@ -1310,6 +1478,12 @@ static int flexcan_open(struct net_devic
+@@ -1309,6 +1477,12 @@ static int flexcan_open(struct net_devic
struct flexcan_priv *priv = netdev_priv(dev);
int err;
@@ -364,7 +364,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
err = pm_runtime_get_sync(priv->dev);
if (err < 0)
return err;
-@@ -1322,7 +1496,10 @@ static int flexcan_open(struct net_devic
+@@ -1321,7 +1495,10 @@ static int flexcan_open(struct net_devic
if (err)
goto out_close;
@@ -376,7 +376,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
priv->mb_count = (sizeof(priv->regs->mb[0]) / priv->mb_size) +
(sizeof(priv->regs->mb[1]) / priv->mb_size);
-@@ -1667,6 +1844,18 @@ static int flexcan_probe(struct platform
+@@ -1666,6 +1843,18 @@ static int flexcan_probe(struct platform
priv->devtype_data = devtype_data;
priv->reg_xceiver = reg_xceiver;