041-0002-ARM-BCM5301X-Fix-NAND-ECC-parameters-for-D-Link-DIR-.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From 70a0ae1c33572f012b734d4b574f38136c57f1a0 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
  3. Date: Mon, 6 Jun 2016 09:43:50 +0200
  4. Subject: [PATCH 2/2] ARM: BCM5301X: Fix NAND ECC parameters for D-Link
  5. DIR-885L
  6. MIME-Version: 1.0
  7. Content-Type: text/plain; charset=UTF-8
  8. Content-Transfer-Encoding: 8bit
  9. This device uses BCH-1 instead of BCH-8. This fixes ECC errors and makes
  10. NAND usable with brcmnand.
  11. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
  12. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
  13. ---
  14. arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 2 +-
  15. arch/arm/boot/dts/bcm5301x-nand-cs0-bch1.dtsi | 15 +++++++++++++++
  16. 2 files changed, 16 insertions(+), 1 deletion(-)
  17. create mode 100644 arch/arm/boot/dts/bcm5301x-nand-cs0-bch1.dtsi
  18. --- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
  19. +++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
  20. @@ -10,7 +10,7 @@
  21. /dts-v1/;
  22. #include "bcm4708.dtsi"
  23. -#include "bcm5301x-nand-cs0-bch8.dtsi"
  24. +#include "bcm5301x-nand-cs0-bch1.dtsi"
  25. / {
  26. compatible = "dlink,dir-885l", "brcm,bcm47094", "brcm,bcm4708";
  27. --- /dev/null
  28. +++ b/arch/arm/boot/dts/bcm5301x-nand-cs0-bch1.dtsi
  29. @@ -0,0 +1,15 @@
  30. +/*
  31. + * Broadcom Northstar NAND.
  32. + *
  33. + * Copyright (C) 2016 Rafał Miłecki <rafal.milecki@gmail.com>
  34. + *
  35. + * Licensed under the ISC license.
  36. + */
  37. +
  38. +#include "bcm5301x-nand-cs0.dtsi"
  39. +
  40. +&nandcs {
  41. + nand-ecc-algo = "bch";
  42. + nand-ecc-strength = <1>;
  43. + nand-ecc-step-size = <512>;
  44. +};