]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
starfive: manually refresh patches for v6.18
authorZhihao Xu <ngc7331@outlook.com>
Tue, 17 Feb 2026 12:11:45 +0000 (20:11 +0800)
committerZoltan HERPAI <wigyori@uid0.hu>
Tue, 21 Apr 2026 12:49:35 +0000 (14:49 +0200)
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>
target/linux/starfive/patches-6.18/0004-spi-spl022-Get-and-deassert-reset-in-probe.patch
target/linux/starfive/patches-6.18/0007-driver-mailbox-Add-mailbox-driver.patch
target/linux/starfive/patches-6.18/0009-uart-8250-Add-dw-auto-flow-ctrl-support.patch
target/linux/starfive/patches-6.18/0013-drivers-nvme-Add-precheck-and-delay-for-CQE-pending-.patch
target/linux/starfive/patches-6.18/0014-riscv-Optimize-memcpy-with-aligned-version.patch

index 68b181065e3c0be7df6bda06a465270ea34671ca..cefc322653338a258c626c93dd51d81587a6f5a0 100644 (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:
index e8a81d12bc26c9bf4d5ce841cc0be6c5688f6166..e4800c0cb49bfc5f046d5ac0dc898a321661a60f 100644 (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
index 92515582c61bacfefc6f749fbb9f8b6880fad04c..9383402793fdb6660eb1e606a2f89282f67460bb 100644 (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 {
index ef84c85305f30f4675f5b5e6faaff0a94f43a5a2..18bf27e0155012ff476378c8f3a5df1bae698728 100644 (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;
                /*
index 6b690ae9424f16683214f7613e3cb1a4885e6e78..0ccbf04de305a0ecf1d1472dc52e7ad79978f7a3 100644 (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 @@