Commit ca572e8b authored by David Woodhouse's avatar David Woodhouse

MTD: Fix JEDEC probe of chips which don't require unlock sequence

Signed-off-by: default avatarThayne Harbaugh <tharbaugh@lnxi.com>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 29c7edf9
/* /*
Common Flash Interface probe code. Common Flash Interface probe code.
(C) 2000 Red Hat. GPL'd. (C) 2000 Red Hat. GPL'd.
$Id: jedec_probe.c,v 1.59 2004/11/17 09:46:24 dvrabel Exp $ $Id: jedec_probe.c,v 1.61 2004/11/19 20:52:16 thayne Exp $
See JEDEC (http://www.jedec.org/) standard JESD21C (section 3.5) See JEDEC (http://www.jedec.org/) standard JESD21C (section 3.5)
for the standard this probe goes back to. for the standard this probe goes back to.
...@@ -227,6 +227,11 @@ static const struct unlock_addr unlock_addrs[] = { ...@@ -227,6 +227,11 @@ static const struct unlock_addr unlock_addrs[] = {
[MTD_UADDR_DONT_CARE] = { [MTD_UADDR_DONT_CARE] = {
.addr1 = 0x0000, /* Doesn't matter which address */ .addr1 = 0x0000, /* Doesn't matter which address */
.addr2 = 0x0000 /* is used - must be last entry */ .addr2 = 0x0000 /* is used - must be last entry */
},
[MTD_UADDR_UNNECESSARY] = {
.addr1 = 0x0000,
.addr2 = 0x0000
} }
}; };
...@@ -1795,7 +1800,6 @@ static int cfi_jedec_setup(struct cfi_private *p_cfi, int index) ...@@ -1795,7 +1800,6 @@ static int cfi_jedec_setup(struct cfi_private *p_cfi, int index)
return 0; return 0;
} }
/* Mask out address bits which are smaller than the device type */
p_cfi->addr_unlock1 = unlock_addrs[uaddr].addr1; p_cfi->addr_unlock1 = unlock_addrs[uaddr].addr1;
p_cfi->addr_unlock2 = unlock_addrs[uaddr].addr2; p_cfi->addr_unlock2 = unlock_addrs[uaddr].addr2;
...@@ -1938,7 +1942,6 @@ static int jedec_probe_chip(struct map_info *map, __u32 base, ...@@ -1938,7 +1942,6 @@ static int jedec_probe_chip(struct map_info *map, __u32 base,
if (MTD_UADDR_UNNECESSARY == uaddr_idx) if (MTD_UADDR_UNNECESSARY == uaddr_idx)
return 0; return 0;
/* Mask out address bits which are smaller than the device type */
cfi->addr_unlock1 = unlock_addrs[uaddr_idx].addr1; cfi->addr_unlock1 = unlock_addrs[uaddr_idx].addr1;
cfi->addr_unlock2 = unlock_addrs[uaddr_idx].addr2; cfi->addr_unlock2 = unlock_addrs[uaddr_idx].addr2;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment