starfive: manually refresh patches for v6.18

Manually refresh patches:
- 0004-spi-spl022-Get-and-deassert-reset-in-probe.patch
- 0007-driver-mailbox-Add-mailbox-driver.patch
- 0009-uart-8250-Add-dw-auto-flow-ctrl-support.patch
- 0013-drivers-nvme-Add-precheck-and-delay-for-CQE-pending-.patch
- 0014-riscv-Optimize-memcpy-with-aligned-version.patch

Signed-off-by: Zhihao Xu <ngc7331@outlook.com>
This commit is contained in:
Zhihao Xu 2026-02-17 20:11:45 +08:00 committed by Zoltan HERPAI
parent 2c089a236f
commit 3e7aa18a4e
5 changed files with 35 additions and 35 deletions

View File

@ -13,15 +13,15 @@ Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -33,6 +33,7 @@
#include <linux/pm_runtime.h>
@@ -34,6 +34,7 @@
#include <linux/of.h>
#include <linux/pinctrl/consumer.h>
#include <linux/minmax.h>
+#include <linux/reset.h>
/*
* This macro is used to define some register default values.
@@ -363,6 +364,7 @@ struct pl022 {
@@ -364,6 +365,7 @@ struct pl022 {
resource_size_t phybase;
void __iomem *virtbase;
struct clk *clk;
@ -29,7 +29,7 @@ Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
struct spi_controller *host;
struct pl022_ssp_controller *host_info;
struct spi_transfer *cur_transfer;
@@ -1930,6 +1932,19 @@ static int pl022_probe(struct amba_devic
@@ -1927,6 +1929,19 @@ static int pl022_probe(struct amba_devic
goto err_no_clk;
}
@ -49,7 +49,7 @@ Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
/* Disable SSP */
writew((readw(SSP_CR1(pl022->virtbase)) & (~SSP_CR1_MASK_SSE)),
SSP_CR1(pl022->virtbase));
@@ -1985,6 +2000,8 @@ static int pl022_probe(struct amba_devic
@@ -1982,6 +1997,8 @@ static int pl022_probe(struct amba_devic
if (platform_info->enable_dma)
pl022_dma_remove(pl022);
err_no_irq:

View File

@ -18,9 +18,9 @@ Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
--- a/drivers/mailbox/Kconfig
+++ b/drivers/mailbox/Kconfig
@@ -295,4 +295,17 @@ config QCOM_IPCC
acts as an interrupt controller for receiving interrupts from clients.
Say Y here if you want to build this driver.
@@ -390,4 +390,17 @@ config RISCV_SBI_MPXY_MBOX
or HS-mode hypervisor). Say Y here if you want to have this support.
If unsure say N.
+config STARFIVE_MBOX
+ tristate "Platform Starfive Mailbox"
@ -38,10 +38,10 @@ Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
endif
--- a/drivers/mailbox/Makefile
+++ b/drivers/mailbox/Makefile
@@ -64,3 +64,7 @@ obj-$(CONFIG_SPRD_MBOX) += sprd-mailbox
obj-$(CONFIG_QCOM_CPUCP_MBOX) += qcom-cpucp-mbox.o
@@ -82,3 +82,7 @@ obj-$(CONFIG_CIX_MBOX) += cix-mailbox.o
obj-$(CONFIG_BCM74110_MAILBOX) += bcm74110-mailbox.o
obj-$(CONFIG_QCOM_IPCC) += qcom-ipcc.o
obj-$(CONFIG_RISCV_SBI_MPXY_MBOX) += riscv-sbi-mpxy-mbox.o
+
+obj-$(CONFIG_STARFIVE_MBOX) += starfive_mailbox.o
+ccflags-$(CONFIG_STARFIVE_MBOX) := -Wno-error=missing-prototypes

View File

@ -17,18 +17,18 @@ Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -810,6 +810,8 @@ int serial8250_register_8250_port(const
uart->dl_read = up->dl_read;
if (up->dl_write)
uart->dl_write = up->dl_write;
+ if (up->probe)
+ uart->probe = up->probe;
@@ -804,6 +804,8 @@ int serial8250_register_8250_port(const
uart->dl_read = up->dl_read;
if (up->dl_write)
uart->dl_write = up->dl_write;
+ if (up->probe)
+ uart->probe = up->probe;
if (uart->port.type != PORT_8250_CIR) {
if (uart_console_registered(&uart->port))
/* Check the type (again)! It might have changed by the port.type assignment above. */
if (uart->port.type != PORT_8250_CIR) {
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -594,6 +594,9 @@ static int dw8250_probe(struct platform_
@@ -775,6 +775,9 @@ static int dw8250_probe(struct platform_
data->msr_mask_off |= UART_MSR_TERI;
}
@ -40,7 +40,7 @@ Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
if (data->clk == NULL)
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -319,6 +319,14 @@ static const struct serial8250_config ua
@@ -311,6 +311,14 @@ static const struct serial8250_config ua
.rxtrig_bytes = {1, 8, 16, 30},
.flags = UART_CAP_FIFO | UART_CAP_AFE,
},
@ -55,7 +55,7 @@ Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
};
/* Uart divisor latch read */
@@ -1124,6 +1132,11 @@ static void autoconfig_16550a(struct uar
@@ -1057,6 +1065,11 @@ static void autoconfig_16550a(struct uar
up->port.type = PORT_U6_16550A;
up->capabilities |= UART_CAP_AFE;
}
@ -67,14 +67,14 @@ Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
}
/*
@@ -2774,7 +2787,6 @@ serial8250_do_set_termios(struct uart_po
if (termios->c_cflag & CRTSCTS)
up->mcr |= UART_MCR_AFE;
@@ -2565,7 +2578,6 @@ static unsigned int serial8250_get_baud_
min = port->uartclk / 16 / UART_DIV_MAX;
max = (port->uartclk + tolerance) / 16;
}
-
/*
* Update the per-port timeout.
*/
* Ask the core to calculate the divisor for us.
* Allow 1% tolerance at the upper limit so uart clks marginally
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -141,6 +141,7 @@ struct uart_8250_port {

View File

@ -14,17 +14,17 @@ Signed-off-by: Kevin.xie <kevin.xie@starfivetech.com>
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -28,6 +28,7 @@
@@ -27,6 +27,7 @@
#include <linux/io-64-nonatomic-lo-hi.h>
#include <linux/io-64-nonatomic-hi-lo.h>
#include <linux/sed-opal.h>
#include <linux/pci-p2pdma.h>
+#include <linux/delay.h>
#include "trace.h"
#include "nvme.h"
@@ -1156,6 +1157,15 @@ static inline int nvme_poll_cq(struct nv
@@ -1368,6 +1369,15 @@ static inline bool nvme_poll_cq(struct n
{
int found = 0;
bool found = false;
+ /*
+ * In some cases, such as udev trigger, cqe status may update
@ -36,5 +36,5 @@ Signed-off-by: Kevin.xie <kevin.xie@starfivetech.com>
+ udelay(1);
+
while (nvme_cqe_pending(nvmeq)) {
found++;
found = true;
/*

View File

@ -27,15 +27,15 @@ Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
lib-y += memset.o
lib-y += memmove.o
ifeq ($(CONFIG_KASAN_GENERIC)$(CONFIG_KASAN_SW_TAGS),)
@@ -16,6 +15,8 @@ lib-$(CONFIG_MMU) += uaccess.o
@@ -15,6 +14,8 @@ endif
lib-$(CONFIG_MMU) += uaccess.o
lib-$(CONFIG_64BIT) += tishift.o
lib-$(CONFIG_RISCV_ISA_ZICBOZ) += clear_page.o
lib-$(CONFIG_RISCV_ISA_ZBC) += crc32.o
+lib-y += string.o
+lib-y += memcpy_aligned.o
obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o
lib-$(CONFIG_RISCV_ISA_V) += xor.o
lib-$(CONFIG_RISCV_ISA_V) += riscv_v_helpers.o
--- a/arch/riscv/lib/memcpy.S
+++ /dev/null
@@ -1,110 +0,0 @@