mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 22:47:56 +00:00
b9d58f7e06
generic: Add/rename patches for upstream consistency ipq40xx: generic-level patch replaces same-source patches-4.19/ 082-v4.20-mtd-spinand-winbond-Add-support-for-W25N01GV.patch The SPI-NAND framework from Linux uses common driver code that is then "tuned" by a tiny struct of chip-specific data that describes available commands, timing, and layout (data and OOB data). Several manufacturers and chips have been added since 4.19, several of which are used in devices already supported by OpenWrt (typically with no or "legacy" access to their NAND memory). This commit catches up the supported-chip definitions through Linux 5.2-rc6 and linux/next. The driver is only compiled for platforms with CONFIG_MTD_SPI_NAND=y. This presently includes ipq40xx and pistachio, with the addition of ath79-nand in these commits (and not ath79-generic or ath79-tiny). Upstream patches refreshed against 4.19.75 Build-tested-on: ipq40xx Run-tested-on: ath79-nand Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
49 lines
1.7 KiB
Diff
49 lines
1.7 KiB
Diff
From 53dd94a79d3bfdaae30e5a4ebf474ea1af1d572e Mon Sep 17 00:00:00 2001
|
|
From: Jeff Kletsky <git-commits@allycomm.com>
|
|
Date: Wed, 22 May 2019 15:05:54 -0700
|
|
Subject: [PATCH 2/3] mtd: spinand: Add support for two-byte device IDs
|
|
|
|
The GigaDevice GD5F1GQ4UFxxG SPI NAND utilizes two-byte device IDs.
|
|
|
|
http://www.gigadevice.com/datasheet/gd5f1gq4xfxxg/
|
|
|
|
Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
|
|
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
|
|
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
|
---
|
|
drivers/mtd/nand/spi/core.c | 2 +-
|
|
include/linux/mtd/spinand.h | 4 ++--
|
|
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
--- a/drivers/mtd/nand/spi/core.c
|
|
+++ b/drivers/mtd/nand/spi/core.c
|
|
@@ -853,7 +853,7 @@ spinand_select_op_variant(struct spinand
|
|
*/
|
|
int spinand_match_and_init(struct spinand_device *spinand,
|
|
const struct spinand_info *table,
|
|
- unsigned int table_size, u8 devid)
|
|
+ unsigned int table_size, u16 devid)
|
|
{
|
|
struct nand_device *nand = spinand_to_nand(spinand);
|
|
unsigned int i;
|
|
--- a/include/linux/mtd/spinand.h
|
|
+++ b/include/linux/mtd/spinand.h
|
|
@@ -290,7 +290,7 @@ struct spinand_ecc_info {
|
|
*/
|
|
struct spinand_info {
|
|
const char *model;
|
|
- u8 devid;
|
|
+ u16 devid;
|
|
u32 flags;
|
|
struct nand_memory_organization memorg;
|
|
struct nand_ecc_req eccreq;
|
|
@@ -445,7 +445,7 @@ static inline void spinand_set_of_node(s
|
|
|
|
int spinand_match_and_init(struct spinand_device *dev,
|
|
const struct spinand_info *table,
|
|
- unsigned int table_size, u8 devid);
|
|
+ unsigned int table_size, u16 devid);
|
|
|
|
int spinand_upd_cfg(struct spinand_device *spinand, u8 mask, u8 val);
|
|
int spinand_select_target(struct spinand_device *spinand, unsigned int target);
|