drivers/mtd/gd25.c: Add support for a new FLASH vendor.

This commit is contained in:
zhangbo_a 2019-09-15 08:17:19 -06:00 committed by Gregory Nutt
parent c5ed221e87
commit 636d180219

View File

@ -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))
{