mirror of
https://github.com/openwrt/openwrt.git
synced 2025-12-21 17:04:28 +04:00
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.62 Manually rebased: bcm27xx/patches-6.12/950-0358-mmc-sdhci-of-dwcmshc-define-sdio-timeout-clocks.patch Removed upstreamed: backport-6.12/830-v6.18-spi-bcm63xx-fix-premature-CS-deassertion-on-RX-only-transactions.patch[1] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.62&id=e31194bf494f6900a5f96f55ed194a00e458f8d1 Build system: x86/64 Build-tested: flogic/glinet_gl-mt6000, ramips/tplink_archer-a6-v3, x86/64-glibc Run-tested: flogic/glinet_gl-mt6000, ramips/tplink_archer-a6-v3, x86/64-glibc Signed-off-by: John Audia <therealgraysky@proton.me> Link: https://github.com/openwrt/openwrt/pull/21126 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
35 lines
808 B
Diff
35 lines
808 B
Diff
--- a/drivers/mtd/nand/spi/core.c
|
|
+++ b/drivers/mtd/nand/spi/core.c
|
|
@@ -19,6 +19,7 @@
|
|
#include <linux/string.h>
|
|
#include <linux/spi/spi.h>
|
|
#include <linux/spi/spi-mem.h>
|
|
+#include <linux/mtd/mtk_bmt.h>
|
|
|
|
static int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val)
|
|
{
|
|
@@ -1577,6 +1578,7 @@ static int spinand_probe(struct spi_mem
|
|
if (ret)
|
|
return ret;
|
|
|
|
+ mtk_bmt_attach(mtd);
|
|
ret = mtd_device_register(mtd, NULL, 0);
|
|
if (ret)
|
|
goto err_spinand_cleanup;
|
|
@@ -1584,6 +1586,7 @@ static int spinand_probe(struct spi_mem
|
|
return 0;
|
|
|
|
err_spinand_cleanup:
|
|
+ mtk_bmt_detach(mtd);
|
|
spinand_cleanup(spinand);
|
|
|
|
return ret;
|
|
@@ -1602,6 +1605,7 @@ static int spinand_remove(struct spi_mem
|
|
if (ret)
|
|
return ret;
|
|
|
|
+ mtk_bmt_detach(mtd);
|
|
spinand_cleanup(spinand);
|
|
|
|
return 0;
|