“1b16447ba24ae39c7fe7133fcdcb4f174dec1901”上不存在“fs/git@gitcode.net:openeuler/kernel.git”
提交 fefae48b 编写于 作者: W Wolfgang Grandegger 提交者: David Woodhouse

[MTD] CFI: remove major/minor version check for command set 0x0002

The NOR Flash memory K8P2815UQB from Samsung uses the major version
number '0'. Add a quirk to cope with it.
Signed-off-by: NWolfgang Grandegger <wg@grandegger.com>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 a808ad3b
...@@ -322,6 +322,14 @@ static struct cfi_fixup fixup_table[] = { ...@@ -322,6 +322,14 @@ static struct cfi_fixup fixup_table[] = {
}; };
static void cfi_fixup_major_minor(struct cfi_private *cfi,
struct cfi_pri_amdstd *extp)
{
if (cfi->mfr == CFI_MFR_SAMSUNG && cfi->id == 0x257e &&
extp->MajorVersion == '0')
extp->MajorVersion = '1';
}
struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
{ {
struct cfi_private *cfi = map->fldrv_priv; struct cfi_private *cfi = map->fldrv_priv;
...@@ -363,6 +371,8 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) ...@@ -363,6 +371,8 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
return NULL; return NULL;
} }
cfi_fixup_major_minor(cfi, extp);
if (extp->MajorVersion != '1' || if (extp->MajorVersion != '1' ||
(extp->MinorVersion < '0' || extp->MinorVersion > '4')) { (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query " printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
......
...@@ -520,6 +520,7 @@ struct cfi_fixup { ...@@ -520,6 +520,7 @@ struct cfi_fixup {
#define CFI_MFR_AMD 0x0001 #define CFI_MFR_AMD 0x0001
#define CFI_MFR_ATMEL 0x001F #define CFI_MFR_ATMEL 0x001F
#define CFI_MFR_SAMSUNG 0x00EC
#define CFI_MFR_ST 0x0020 /* STMicroelectronics */ #define CFI_MFR_ST 0x0020 /* STMicroelectronics */
void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup* fixups); void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup* fixups);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部