911-add-ar300m-nand-support.patch 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. --- a/drivers/mtd/nand/Kconfig
  2. +++ b/drivers/mtd/nand/Kconfig
  3. @@ -566,4 +566,12 @@ config MTD_NAND_AR934X_HW_ECC
  4. bool "Hardware ECC support for the AR934X NAND Controller (EXPERIMENTAL)"
  5. depends on MTD_NAND_AR934X
  6. +config MTD_NAND_ATH79
  7. + tristate "Nand flash support for Qualcomm-Atheros SoCs 71xx & 9xxx"
  8. + default n
  9. + depends on MTD_NAND
  10. + help
  11. + Enables the driver for NAND flash controller on Qualcomm-Atheros System on Chips
  12. + This controller is used on families AR71xx and AR9xxx.
  13. +
  14. endif # MTD_NAND
  15. --- a/drivers/mtd/nand/Makefile
  16. +++ b/drivers/mtd/nand/Makefile
  17. @@ -10,6 +10,7 @@ obj-$(CONFIG_MTD_SM_COMMON) += sm_comm
  18. obj-$(CONFIG_MTD_NAND_CAFE) += cafe_nand.o
  19. obj-$(CONFIG_MTD_NAND_AMS_DELTA) += ams-delta.o
  20. +obj-$(CONFIG_MTD_NAND_ATH79) += ath79_spinand.o
  21. obj-$(CONFIG_MTD_NAND_DENALI) += denali.o
  22. obj-$(CONFIG_MTD_NAND_DENALI_PCI) += denali_pci.o
  23. obj-$(CONFIG_MTD_NAND_DENALI_DT) += denali_dt.o
  24. --- a/drivers/mtd/nand/nand_ids.c
  25. +++ b/drivers/mtd/nand/nand_ids.c
  26. @@ -52,6 +52,30 @@ struct nand_flash_dev nand_flash_ids[] =
  27. { .id = {0xad, 0xde, 0x94, 0xda, 0x74, 0xc4} },
  28. SZ_8K, SZ_8K, SZ_2M, 0, 6, 640, NAND_ECC_INFO(40, SZ_1K),
  29. 4 },
  30. + {"GD5F1GQ4U 1G 3.3V 8-bit",
  31. + { .id = {0xc8, 0xb1} },
  32. + SZ_2K, SZ_128, SZ_128K, 0, 2, 128, NAND_ECC_INFO(4, SZ_512) },
  33. + {"GD5F2GQ4U 2G 3.3V 8-bit",
  34. + { .id = {0xc8, 0xb2} },
  35. + SZ_2K, SZ_256, SZ_128K, 0, 2, 128, NAND_ECC_INFO(4, SZ_512) },
  36. + {"GD5F1GQ4R 1G 1.8V 8-bit",
  37. + { .id = {0xc8, 0xa1} },
  38. + SZ_2K, SZ_128, SZ_128K, 0, 2, 128, NAND_ECC_INFO(4, SZ_512) },
  39. + {"GD5F2GQ4R 2G 1.8V 8-bit",
  40. + { .id = {0xc8, 0xa2} },
  41. + SZ_2K, SZ_256, SZ_128K, 0, 2, 128, NAND_ECC_INFO(4, SZ_512) },
  42. + {"MX35LF1G4EAB 1G 3.3V 8-bit",
  43. + { .id = {0xc2, 0x12} },
  44. + SZ_2K, SZ_128, SZ_128K, 0, 2, 64, NAND_ECC_INFO(4, SZ_512) },
  45. + {"MX35LF2G4EAB 2G 3.3V 8-bit",
  46. + { .id = {0xc2, 0x22} },
  47. + SZ_2K, SZ_256, SZ_128K, 0, 2, 64, NAND_ECC_INFO(4, SZ_512) },
  48. + {"W25N01GV 1G 3.3V 8-bit",
  49. + { .id = {0xef, 0xaa} },
  50. + SZ_2K, SZ_128, SZ_128K, 0, 2, 64, NAND_ECC_INFO(4, SZ_512) },
  51. + {"HYF1GQ4UAACAE-P1 128MiB 3.3V 8-bit",
  52. + { .id = { 0xc9, 0x59 }},
  53. + SZ_2K, SZ_128, SZ_128K, 0, 2, SZ_128, NAND_ECC_INFO(4, SZ_512) },
  54. LEGACY_ID_NAND("NAND 4MiB 5V 8-bit", 0x6B, 4, SZ_8K, SP_OPTIONS),
  55. LEGACY_ID_NAND("NAND 4MiB 3,3V 8-bit", 0xE3, 4, SZ_8K, SP_OPTIONS),
  56. @@ -181,6 +205,9 @@ struct nand_manufacturers nand_manuf_ids
  57. {NAND_MFR_SANDISK, "SanDisk"},
  58. {NAND_MFR_INTEL, "Intel"},
  59. {NAND_MFR_ATO, "ATO"},
  60. + {NAND_MFR_GIGADEVICE, "Giga Device"},
  61. + {NAND_MFR_WINBOND, "Winbond"},
  62. + {NAND_MFR_HEYANGTEK, "HeYang Tek"},
  63. {0x0, "Unknown"}
  64. };
  65. --- a/include/linux/mtd/nand.h
  66. +++ b/include/linux/mtd/nand.h
  67. @@ -732,6 +732,9 @@ struct nand_chip {
  68. #define NAND_MFR_MICRON 0x2c
  69. #define NAND_MFR_AMD 0x01
  70. #define NAND_MFR_MACRONIX 0xc2
  71. +#define NAND_MFR_GIGADEVICE 0xc8
  72. +#define NAND_MFR_WINBOND 0xef
  73. +#define NAND_MFR_HEYANGTEK 0xc9
  74. #define NAND_MFR_EON 0x92
  75. #define NAND_MFR_SANDISK 0x45
  76. #define NAND_MFR_INTEL 0x89