forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from openwrtdiy/openwrt-23.05
Openwrt 23.05
- Loading branch information
Showing
7 changed files
with
82 additions
and
16 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
package/boot/arm-trusted-firmware-tools/patches/002-darwin_compile.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- a/tools/fiptool/fiptool.c | ||
+++ b/tools/fiptool/fiptool.c | ||
@@ -3,7 +3,7 @@ | ||
* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
- | ||
+#define _DARWIN_C_SOURCE | ||
#ifndef _MSC_VER | ||
#include <sys/mount.h> | ||
#endif | ||
@@ -18,6 +18,9 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
+#include <unistd.h> | ||
+ | ||
+#define uuid_t fiptool_uuid_t | ||
|
||
#include "fiptool.h" | ||
#include "tbbr_config.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
49 changes: 49 additions & 0 deletions
49
target/linux/generic/backport-5.15/892-v6.5-mtd-spinand-winbond-Fix-ecc_get_status.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
From f5a05060670a4d8d6523afc7963eb559c2e3615f Mon Sep 17 00:00:00 2001 | ||
From: Olivier Maignial <[email protected]> | ||
Date: Fri, 23 Jun 2023 17:33:37 +0200 | ||
Subject: [PATCH] mtd: spinand: winbond: Fix ecc_get_status | ||
|
||
Reading ECC status is failing. | ||
|
||
w25n02kv_ecc_get_status() is using on-stack buffer for | ||
SPINAND_GET_FEATURE_OP() output. It is not suitable for | ||
DMA needs of spi-mem. | ||
|
||
Fix this by using the spi-mem operations dedicated buffer | ||
spinand->scratchbuf. | ||
|
||
See | ||
spinand->scratchbuf: | ||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/mtd/spinand.h?h=v6.3#n418 | ||
spi_mem_check_op(): | ||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/spi/spi-mem.c?h=v6.3#n199 | ||
|
||
Fixes: 6154c7a58348 ("mtd: spinand: winbond: add Winbond W25N02KV flash support") | ||
Cc: [email protected] | ||
Signed-off-by: Olivier Maignial <[email protected]> | ||
Signed-off-by: Miquel Raynal <[email protected]> | ||
Link: https://lore.kernel.org/linux-mtd/DB4P250MB1032EDB9E36B764A33769039FE23A@DB4P250MB1032.EURP250.PROD.OUTLOOK.COM | ||
--- | ||
drivers/mtd/nand/spi/winbond.c | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
--- a/drivers/mtd/nand/spi/winbond.c | ||
+++ b/drivers/mtd/nand/spi/winbond.c | ||
@@ -108,7 +108,7 @@ static int w25n02kv_ecc_get_status(struc | ||
{ | ||
struct nand_device *nand = spinand_to_nand(spinand); | ||
u8 mbf = 0; | ||
- struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, &mbf); | ||
+ struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, spinand->scratchbuf); | ||
|
||
switch (status & STATUS_ECC_MASK) { | ||
case STATUS_ECC_NO_BITFLIPS: | ||
@@ -126,7 +126,7 @@ static int w25n02kv_ecc_get_status(struc | ||
if (spi_mem_exec_op(spinand->spimem, &op)) | ||
return nanddev_get_ecc_conf(nand)->strength; | ||
|
||
- mbf >>= 4; | ||
+ mbf = *(spinand->scratchbuf) >> 4; | ||
|
||
if (WARN_ON(mbf > nanddev_get_ecc_conf(nand)->strength || !mbf)) | ||
return nanddev_get_ecc_conf(nand)->strength; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters