041-0001-ARM-BCM5301X-Specify-NAND-chip-select-and-ECC-in-sep.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. From 8ab5f1fbd39c29125403678a0caf0a71046da361 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:49 +0200
  4. Subject: [PATCH 1/2] ARM: BCM5301X: Specify NAND chip select and ECC in
  5. separated files
  6. MIME-Version: 1.0
  7. Content-Type: text/plain; charset=UTF-8
  8. Content-Transfer-Encoding: 8bit
  9. Using separated file with common chip select parameters will allow us
  10. adding other ECC setups without code duplication.
  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/bcm5301x-nand-cs0-bch8.dtsi | 16 +++++-----------
  15. arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi | 18 ++++++++++++++++++
  16. 2 files changed, 23 insertions(+), 11 deletions(-)
  17. create mode 100644 arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
  18. --- a/arch/arm/boot/dts/bcm5301x-nand-cs0-bch8.dtsi
  19. +++ b/arch/arm/boot/dts/bcm5301x-nand-cs0-bch8.dtsi
  20. @@ -9,16 +9,10 @@
  21. * Licensed under the GNU/GPL. See COPYING for details.
  22. */
  23. -/ {
  24. - nand@18028000 {
  25. - nandcs@0 {
  26. - compatible = "brcm,nandcs";
  27. - reg = <0>;
  28. - #address-cells = <1>;
  29. - #size-cells = <1>;
  30. +#include "bcm5301x-nand-cs0.dtsi"
  31. - nand-ecc-strength = <8>;
  32. - nand-ecc-step-size = <512>;
  33. - };
  34. - };
  35. +&nandcs {
  36. + nand-ecc-algo = "bch";
  37. + nand-ecc-strength = <8>;
  38. + nand-ecc-step-size = <512>;
  39. };
  40. --- /dev/null
  41. +++ b/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
  42. @@ -0,0 +1,18 @@
  43. +/*
  44. + * Broadcom Northstar NAND.
  45. + *
  46. + * Copyright (C) 2015 Hauke Mehrtens <hauke@hauke-m.de>
  47. + *
  48. + * Licensed under the GNU/GPL. See COPYING for details.
  49. + */
  50. +
  51. +/ {
  52. + nand@18028000 {
  53. + nandcs: nandcs@0 {
  54. + compatible = "brcm,nandcs";
  55. + reg = <0>;
  56. + #address-cells = <1>;
  57. + #size-cells = <1>;
  58. + };
  59. + };
  60. +};