From 636d180219376110a4a346bea39758b9761fa644 Mon Sep 17 00:00:00 2001 From: zhangbo_a Date: Sun, 15 Sep 2019 08:17:19 -0600 Subject: [PATCH] drivers/mtd/gd25.c: Add support for a new FLASH vendor. --- drivers/mtd/gd25.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/gd25.c b/drivers/mtd/gd25.c index 1382b8da3b..b005d0ddfd 100644 --- a/drivers/mtd/gd25.c +++ b/drivers/mtd/gd25.c @@ -97,6 +97,7 @@ /* JEDEC Read ID register values */ +#define P25_JEDEC_MANUFACTURER 0x85 #define GD25_JEDEC_MANUFACTURER 0xc8 /* GigaDevice manufacturer ID */ #define GD25L_JEDEC_MEMORY_TYPE 0x60 /* GD25L memory type, 1.8V */ #define GD25Q_JEDEC_MEMORY_TYPE 0x40 /* GD25Q memory type, 3V */ @@ -257,7 +258,8 @@ static inline int gd25_readid(struct gd25_dev_s *priv) /* Check for a valid manufacturer and memory type */ - if (manufacturer == GD25_JEDEC_MANUFACTURER && + if ((manufacturer == GD25_JEDEC_MANUFACTURER || + manufacturer == P25_JEDEC_MANUFACTURER) && (memory == GD25L_JEDEC_MEMORY_TYPE || memory == GD25Q_JEDEC_MEMORY_TYPE)) {