Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128192
b: refs/heads/master
c: fefae48
h: refs/heads/master
v: v3
  • Loading branch information
Wolfgang Grandegger authored and David Woodhouse committed Jan 9, 2009
1 parent 07381f3 commit 20f7bc5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a808ad3b0d28411e2838117c5b2ae680ae42483c
refs/heads/master: fefae48bf8caab7d56ee4f8181f06602cf73d29e
10 changes: 10 additions & 0 deletions trunk/drivers/mtd/chips/cfi_cmdset_0002.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 cfi_private *cfi = map->fldrv_priv;
Expand Down Expand Up @@ -363,6 +371,8 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
return NULL;
}

cfi_fixup_major_minor(cfi, extp);

if (extp->MajorVersion != '1' ||
(extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/mtd/cfi.h
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ struct cfi_fixup {

#define CFI_MFR_AMD 0x0001
#define CFI_MFR_ATMEL 0x001F
#define CFI_MFR_SAMSUNG 0x00EC
#define CFI_MFR_ST 0x0020 /* STMicroelectronics */

void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup* fixups);
Expand Down

0 comments on commit 20f7bc5

Please sign in to comment.