0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2025-07-16 08:04:43 +00:00
Files
openwrt/target/linux/airoha/patches-6.6/901-snand-mtk-bmt-support.patch
Leo Barsky cc932c1ea6 kernel: bump 6.6 to 6.6.98
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.98
Minor kernel update with a single fix:
- x86/CPU/AMD: Properly check the TSA microcode
Automatically refreshed:
- airoha/patches-6.6/901-snand-mtk-bmt-support.patch

Signed-off-by: Leo Barsky <leobrsky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/19411
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-16 09:40:36 +02:00

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)
{
@@ -1348,6 +1349,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;
@@ -1355,6 +1357,7 @@ static int spinand_probe(struct spi_mem
return 0;
err_spinand_cleanup:
+ mtk_bmt_detach(mtd);
spinand_cleanup(spinand);
return ret;
@@ -1373,6 +1376,7 @@ static int spinand_remove(struct spi_mem
if (ret)
return ret;
+ mtk_bmt_detach(mtd);
spinand_cleanup(spinand);
return 0;