- Fix Micron driver as some chips enable internal ECC correction
   during their discovery while they advertize they do not have any.
 
 Hyperbus:
 - Restrict the build to only ARM64 SoCs (and compile testing) which is
   what should have been done since the beginning.
 - Fix Kconfig issue by selection something instead of implying it.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEE9HuaYnbmDhq/XIDIJWrqGEe9VoQFAl1E0XAACgkQJWrqGEe9
 VoSVXAf/XyLI00EIj3L2KF8K8iYLPRN+lfbeN/YrFvFd9WYhyjY82NKQ/7A1WVjB
 k5VIJx4StnhvVBFj/amviK4NycZcJ8GXz5eQvd5oQYRP5pZ9rBBeed/7QAdQ1uEJ
 s8yZyFZKQblFyqTISDsfAmiRmwPipAn5TrBRPvpN094tSxoz8MB4SLvRsUy4FIrr
 zj6wGrIbSu2x/G3KUw7yTDAfL9QOdgHaCnmM04TOndoDPC+38yVs8ca/67AP44Ni
 j0cYivMZhVpavx2n3G01WUiyXAgkDilaG3F+Tn6754zxfQhJM5tVzZOiwSCBI9FS
 Cg2dgcRXfPlJJuD5Vs7aPFIGJHLEFg==
 =TWEV
 -----END PGP SIGNATURE-----

Merge tag 'mtd/fixes-for-5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux

Pull MTD fixes from Miquel Raynal:
 "NAND:

   - Fix Micron driver as some chips enable internal ECC correction
     during their discovery while they advertize they do not have any.

  Hyperbus:

   - Restrict the build to only ARM64 SoCs (and compile testing) which
     is what should have been done since the beginning.

   - Fix Kconfig issue by selection something instead of implying it"

* tag 'mtd/fixes-for-5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
  mtd: hyperbus: Add hardware dependency to AM654 driver
  mtd: hyperbus: Kconfig: Fix HBMC_AM654 dependencies
  mtd: rawnand: micron: handle on-die "ECC-off" devices correctly
This commit is contained in:
Linus Torvalds 2019-08-04 16:37:08 -07:00
commit 62d1716304
2 changed files with 13 additions and 4 deletions

View file

@ -14,8 +14,9 @@ if MTD_HYPERBUS
config HBMC_AM654
tristate "HyperBus controller driver for AM65x SoC"
depends on ARM64 || COMPILE_TEST
select MULTIPLEXER
select MUX_MMIO
imply MUX_MMIO
help
This is the driver for HyperBus controller on TI's AM65x and
other SoCs

View file

@ -390,6 +390,14 @@ static int micron_supports_on_die_ecc(struct nand_chip *chip)
(chip->id.data[4] & MICRON_ID_INTERNAL_ECC_MASK) != 0x2)
return MICRON_ON_DIE_UNSUPPORTED;
/*
* It seems that there are devices which do not support ECC officially.
* At least the MT29F2G08ABAGA / MT29F2G08ABBGA devices supports
* enabling the ECC feature but don't reflect that to the READ_ID table.
* So we have to guarantee that we disable the ECC feature directly
* after we did the READ_ID table command. Later we can evaluate the
* ECC_ENABLE support.
*/
ret = micron_nand_on_die_ecc_setup(chip, true);
if (ret)
return MICRON_ON_DIE_UNSUPPORTED;
@ -398,13 +406,13 @@ static int micron_supports_on_die_ecc(struct nand_chip *chip)
if (ret)
return MICRON_ON_DIE_UNSUPPORTED;
if (!(id[4] & MICRON_ID_ECC_ENABLED))
return MICRON_ON_DIE_UNSUPPORTED;
ret = micron_nand_on_die_ecc_setup(chip, false);
if (ret)
return MICRON_ON_DIE_UNSUPPORTED;
if (!(id[4] & MICRON_ID_ECC_ENABLED))
return MICRON_ON_DIE_UNSUPPORTED;
ret = nand_readid_op(chip, 0, id, sizeof(id));
if (ret)
return MICRON_ON_DIE_UNSUPPORTED;