aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic/hack-4.14/204-module_strip.patch2
-rw-r--r--target/linux/generic/hack-4.14/930-crashlog.patch2
-rw-r--r--target/linux/generic/pending-4.14/203-kallsyms_uncompressed.patch2
-rw-r--r--target/linux/generic/pending-4.14/840-can-flexcan-flexcan_chip_freeze-fix-chip-freeze-for-.patch50
-rw-r--r--target/linux/generic/pending-4.14/920-mangle_bootargs.patch2
-rw-r--r--target/linux/layerscape/patches-4.14/809-flexcan-support-layerscape.patch54
6 files changed, 31 insertions, 81 deletions
diff --git a/target/linux/generic/hack-4.14/204-module_strip.patch b/target/linux/generic/hack-4.14/204-module_strip.patch
index fe4ca47f16..9d8f0f9af8 100644
--- a/target/linux/generic/hack-4.14/204-module_strip.patch
+++ b/target/linux/generic/hack-4.14/204-module_strip.patch
@@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -1904,6 +1904,13 @@ config TRIM_UNUSED_KSYMS
+@@ -1903,6 +1903,13 @@ config TRIM_UNUSED_KSYMS
If unsure, or if you need to build out-of-tree modules, say N.
diff --git a/target/linux/generic/hack-4.14/930-crashlog.patch b/target/linux/generic/hack-4.14/930-crashlog.patch
index 397046ad62..fd58841af0 100644
--- a/target/linux/generic/hack-4.14/930-crashlog.patch
+++ b/target/linux/generic/hack-4.14/930-crashlog.patch
@@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+#endif
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -1010,6 +1010,10 @@ config RELAY
+@@ -1009,6 +1009,10 @@ config RELAY
If unsure, say N.
diff --git a/target/linux/generic/pending-4.14/203-kallsyms_uncompressed.patch b/target/linux/generic/pending-4.14/203-kallsyms_uncompressed.patch
index 159a79988f..1f5c83e94f 100644
--- a/target/linux/generic/pending-4.14/203-kallsyms_uncompressed.patch
+++ b/target/linux/generic/pending-4.14/203-kallsyms_uncompressed.patch
@@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -1082,6 +1082,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
+@@ -1081,6 +1081,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
the unaligned access emulation.
see arch/parisc/kernel/unaligned.c for reference
diff --git a/target/linux/generic/pending-4.14/840-can-flexcan-flexcan_chip_freeze-fix-chip-freeze-for-.patch b/target/linux/generic/pending-4.14/840-can-flexcan-flexcan_chip_freeze-fix-chip-freeze-for-.patch
deleted file mode 100644
index 20c84617d1..0000000000
--- a/target/linux/generic/pending-4.14/840-can-flexcan-flexcan_chip_freeze-fix-chip-freeze-for-.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 47c5e474bc1e1061fb037d13b5000b38967eb070 Mon Sep 17 00:00:00 2001
-From: Angelo Dureghello <angelo@kernel-space.org>
-Date: Tue, 16 Mar 2021 00:15:10 +0100
-Subject: can: flexcan: flexcan_chip_freeze(): fix chip freeze for missing bitrate
-
-From: Angelo Dureghello <angelo@kernel-space.org>
-
-commit 47c5e474bc1e1061fb037d13b5000b38967eb070 upstream.
-
-For cases when flexcan is built-in, bitrate is still not set at
-registering. So flexcan_chip_freeze() generates:
-
-[ 1.860000] *** ZERO DIVIDE *** FORMAT=4
-[ 1.860000] Current process id is 1
-[ 1.860000] BAD KERNEL TRAP: 00000000
-[ 1.860000] PC: [<402e70c8>] flexcan_chip_freeze+0x1a/0xa8
-
-To allow chip freeze, using an hardcoded timeout when bitrate is still
-not set.
-
-Fixes: ec15e27cc890 ("can: flexcan: enable RX FIFO after FRZ/HALT valid")
-Link: https://lore.kernel.org/r/20210315231510.650593-1-angelo@kernel-space.org
-Signed-off-by: Angelo Dureghello <angelo@kernel-space.org>
-[mkl: use if instead of ? operator]
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-Cc: Koen Vandeputte <koen.vandeputte@citymesh.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/net/can/flexcan.c | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
---- a/drivers/net/can/flexcan.c
-+++ b/drivers/net/can/flexcan.c
-@@ -413,9 +413,15 @@ static int flexcan_chip_disable(struct f
- static int flexcan_chip_freeze(struct flexcan_priv *priv)
- {
- struct flexcan_regs __iomem *regs = priv->regs;
-- unsigned int timeout = 1000 * 1000 * 10 / priv->can.bittiming.bitrate;
-+ unsigned int timeout;
-+ u32 bitrate = priv->can.bittiming.bitrate;
- u32 reg;
-
-+ if (bitrate)
-+ timeout = 1000 * 1000 * 10 / bitrate;
-+ else
-+ timeout = FLEXCAN_TIMEOUT_US / 10;
-+
- reg = flexcan_read(&regs->mcr);
- reg |= FLEXCAN_MCR_FRZ | FLEXCAN_MCR_HALT;
- flexcan_write(reg, &regs->mcr);
diff --git a/target/linux/generic/pending-4.14/920-mangle_bootargs.patch b/target/linux/generic/pending-4.14/920-mangle_bootargs.patch
index 4d7dd3364d..2f6a52c23d 100644
--- a/target/linux/generic/pending-4.14/920-mangle_bootargs.patch
+++ b/target/linux/generic/pending-4.14/920-mangle_bootargs.patch
@@ -13,7 +13,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -1428,6 +1428,15 @@ config EMBEDDED
+@@ -1427,6 +1427,15 @@ config EMBEDDED
an embedded system so certain expert options are available
for configuration.
diff --git a/target/linux/layerscape/patches-4.14/809-flexcan-support-layerscape.patch b/target/linux/layerscape/patches-4.14/809-flexcan-support-layerscape.patch
index b2ac8a0096..112b6e658a 100644
--- a/target/linux/layerscape/patches-4.14/809-flexcan-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.14/809-flexcan-support-layerscape.patch
@@ -155,9 +155,9 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
return -ETIMEDOUT;
return 0;
-@@ -416,14 +432,14 @@ static int flexcan_chip_freeze(struct fl
- unsigned int timeout = 1000 * 1000 * 10 / priv->can.bittiming.bitrate;
- u32 reg;
+@@ -422,14 +438,14 @@ static int flexcan_chip_freeze(struct fl
+ else
+ timeout = FLEXCAN_TIMEOUT_US / 10;
- reg = flexcan_read(&regs->mcr);
+ reg = priv->read(&regs->mcr);
@@ -174,7 +174,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
return -ETIMEDOUT;
return 0;
-@@ -435,14 +451,14 @@ static int flexcan_chip_unfreeze(struct
+@@ -441,14 +457,14 @@ static int flexcan_chip_unfreeze(struct
unsigned int timeout = FLEXCAN_TIMEOUT_US / 10;
u32 reg;
@@ -193,7 +193,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
return -ETIMEDOUT;
return 0;
-@@ -453,11 +469,11 @@ static int flexcan_chip_softreset(struct
+@@ -459,11 +475,11 @@ static int flexcan_chip_softreset(struct
struct flexcan_regs __iomem *regs = priv->regs;
unsigned int timeout = FLEXCAN_TIMEOUT_US / 10;
@@ -208,7 +208,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
return -ETIMEDOUT;
return 0;
-@@ -468,7 +484,7 @@ static int __flexcan_get_berr_counter(co
+@@ -474,7 +490,7 @@ static int __flexcan_get_berr_counter(co
{
const struct flexcan_priv *priv = netdev_priv(dev);
struct flexcan_regs __iomem *regs = priv->regs;
@@ -217,7 +217,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
bec->txerr = (reg >> 0) & 0xff;
bec->rxerr = (reg >> 8) & 0xff;
-@@ -524,24 +540,24 @@ static int flexcan_start_xmit(struct sk_
+@@ -530,24 +546,24 @@ static int flexcan_start_xmit(struct sk_
if (cf->can_dlc > 0) {
data = be32_to_cpup((__be32 *)&cf->data[0]);
@@ -248,7 +248,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
&priv->tx_mb_reserved->can_ctrl);
return NETDEV_TX_OK;
-@@ -660,7 +676,7 @@ static unsigned int flexcan_mailbox_read
+@@ -666,7 +682,7 @@ static unsigned int flexcan_mailbox_read
u32 code;
do {
@@ -257,7 +257,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
} while (reg_ctrl & FLEXCAN_MB_CODE_RX_BUSY_BIT);
/* is this MB empty? */
-@@ -675,17 +691,17 @@ static unsigned int flexcan_mailbox_read
+@@ -681,17 +697,17 @@ static unsigned int flexcan_mailbox_read
offload->dev->stats.rx_errors++;
}
} else {
@@ -278,7 +278,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
if (reg_ctrl & FLEXCAN_MB_CNT_IDE)
cf->can_id = ((reg_id >> 0) & CAN_EFF_MASK) | CAN_EFF_FLAG;
else
-@@ -695,19 +711,19 @@ static unsigned int flexcan_mailbox_read
+@@ -701,19 +717,19 @@ static unsigned int flexcan_mailbox_read
cf->can_id |= CAN_RTR_FLAG;
cf->can_dlc = get_can_dlc((reg_ctrl >> 16) & 0xf);
@@ -304,7 +304,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
}
return 1;
-@@ -719,8 +735,8 @@ static inline u64 flexcan_read_reg_iflag
+@@ -725,8 +741,8 @@ static inline u64 flexcan_read_reg_iflag
struct flexcan_regs __iomem *regs = priv->regs;
u32 iflag1, iflag2;
@@ -315,7 +315,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
~FLEXCAN_IFLAG_MB(priv->tx_mb_idx);
return (u64)iflag2 << 32 | iflag1;
-@@ -736,7 +752,7 @@ static irqreturn_t flexcan_irq(int irq,
+@@ -742,7 +758,7 @@ static irqreturn_t flexcan_irq(int irq,
u32 reg_iflag1, reg_esr;
enum can_state last_state = priv->can.state;
@@ -324,7 +324,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
/* reception interrupt */
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
-@@ -759,7 +775,8 @@ static irqreturn_t flexcan_irq(int irq,
+@@ -765,7 +781,8 @@ static irqreturn_t flexcan_irq(int irq,
/* FIFO overflow interrupt */
if (reg_iflag1 & FLEXCAN_IFLAG_RX_FIFO_OVERFLOW) {
handled = IRQ_HANDLED;
@@ -334,7 +334,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
dev->stats.rx_over_errors++;
dev->stats.rx_errors++;
}
-@@ -773,18 +790,18 @@ static irqreturn_t flexcan_irq(int irq,
+@@ -779,18 +796,18 @@ static irqreturn_t flexcan_irq(int irq,
can_led_event(dev, CAN_LED_EVENT_TX);
/* after sending a RTR frame MB is in RX mode */
@@ -358,7 +358,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
}
/* state change interrupt or broken error state quirk fix is enabled */
-@@ -846,7 +863,7 @@ static void flexcan_set_bittiming(struct
+@@ -852,7 +869,7 @@ static void flexcan_set_bittiming(struct
struct flexcan_regs __iomem *regs = priv->regs;
u32 reg;
@@ -367,7 +367,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
reg &= ~(FLEXCAN_CTRL_PRESDIV(0xff) |
FLEXCAN_CTRL_RJW(0x3) |
FLEXCAN_CTRL_PSEG1(0x7) |
-@@ -870,11 +887,11 @@ static void flexcan_set_bittiming(struct
+@@ -876,11 +893,11 @@ static void flexcan_set_bittiming(struct
reg |= FLEXCAN_CTRL_SMP;
netdev_dbg(dev, "writing ctrl=0x%08x\n", reg);
@@ -381,7 +381,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
}
/* flexcan_chip_start
-@@ -913,7 +930,7 @@ static int flexcan_chip_start(struct net
+@@ -919,7 +936,7 @@ static int flexcan_chip_start(struct net
* choose format C
* set max mailbox number
*/
@@ -390,7 +390,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
reg_mcr &= ~FLEXCAN_MCR_MAXMB(0xff);
reg_mcr |= FLEXCAN_MCR_FRZ | FLEXCAN_MCR_HALT | FLEXCAN_MCR_SUPV |
FLEXCAN_MCR_WRN_EN | FLEXCAN_MCR_SRX_DIS | FLEXCAN_MCR_IRMQ |
-@@ -927,7 +944,7 @@ static int flexcan_chip_start(struct net
+@@ -933,7 +950,7 @@ static int flexcan_chip_start(struct net
FLEXCAN_MCR_MAXMB(priv->tx_mb_idx);
}
netdev_dbg(dev, "%s: writing mcr=0x%08x", __func__, reg_mcr);
@@ -399,7 +399,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
/* CTRL
*
-@@ -940,7 +957,7 @@ static int flexcan_chip_start(struct net
+@@ -946,7 +963,7 @@ static int flexcan_chip_start(struct net
* enable bus off interrupt
* (== FLEXCAN_CTRL_ERR_STATE)
*/
@@ -408,7 +408,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
reg_ctrl &= ~FLEXCAN_CTRL_TSYN;
reg_ctrl |= FLEXCAN_CTRL_BOFF_REC | FLEXCAN_CTRL_LBUF |
FLEXCAN_CTRL_ERR_STATE;
-@@ -960,45 +977,45 @@ static int flexcan_chip_start(struct net
+@@ -966,45 +983,45 @@ static int flexcan_chip_start(struct net
/* leave interrupts disabled for now */
reg_ctrl &= ~FLEXCAN_CTRL_ERR_ALL;
netdev_dbg(dev, "%s: writing ctrl=0x%08x", __func__, reg_ctrl);
@@ -470,7 +470,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
/* On Vybrid, disable memory error detection interrupts
* and freeze mode.
-@@ -1011,17 +1028,17 @@ static int flexcan_chip_start(struct net
+@@ -1017,17 +1034,17 @@ static int flexcan_chip_start(struct net
* and Correction of Memory Errors" to write to
* MECR register
*/
@@ -493,7 +493,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
}
err = flexcan_transceiver_enable(priv);
-@@ -1037,14 +1054,14 @@ static int flexcan_chip_start(struct net
+@@ -1043,14 +1060,14 @@ static int flexcan_chip_start(struct net
/* enable interrupts atomically */
disable_irq(dev->irq);
@@ -512,7 +512,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
return 0;
-@@ -1074,10 +1091,10 @@ static int __flexcan_chip_stop(struct ne
+@@ -1080,10 +1097,10 @@ static int __flexcan_chip_stop(struct ne
goto out_chip_unfreeze;
/* Disable all interrupts */
@@ -527,7 +527,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
flexcan_transceiver_disable(priv);
priv->can.state = CAN_STATE_STOPPED;
-@@ -1209,9 +1226,9 @@ static int register_flexcandev(struct ne
+@@ -1215,9 +1232,9 @@ static int register_flexcandev(struct ne
err = flexcan_chip_disable(priv);
if (err)
goto out_disable_per;
@@ -539,7 +539,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
err = flexcan_chip_enable(priv);
if (err)
-@@ -1223,16 +1240,16 @@ static int register_flexcandev(struct ne
+@@ -1229,16 +1246,16 @@ static int register_flexcandev(struct ne
goto out_chip_disable;
/* activate FIFO, restrict register access */
@@ -559,7 +559,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
if (!(reg & FLEXCAN_MCR_FEN)) {
netdev_err(dev, "Could not enable RX FIFO, unsupported core\n");
err = -ENODEV;
-@@ -1260,8 +1277,12 @@ static void unregister_flexcandev(struct
+@@ -1266,8 +1283,12 @@ static void unregister_flexcandev(struct
static const struct of_device_id flexcan_of_match[] = {
{ .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, },
{ .compatible = "fsl,imx28-flexcan", .data = &fsl_imx28_devtype_data, },
@@ -572,7 +572,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
{ /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, flexcan_of_match);
-@@ -1341,6 +1362,21 @@ static int flexcan_probe(struct platform
+@@ -1347,6 +1368,21 @@ static int flexcan_probe(struct platform
dev->flags |= IFF_ECHO;
priv = netdev_priv(dev);