1. 20 1月, 2018 1 次提交
  2. 16 12月, 2017 1 次提交
    • M
      mtd: nand: add ->exec_op() implementation · 8878b126
      Miquel Raynal 提交于
      Introduce a new interface to instruct NAND controllers to send specific
      NAND operations. The new interface takes the form of a single method
      called ->exec_op(). This method is designed to replace ->cmd_ctrl(),
      ->cmdfunc() and ->read/write_byte/word/buf() hooks.
      
      ->exec_op() is passed a set of instructions describing the operation
      to execute. Each instruction has a type (ADDR, CMD, DATA, WAITRDY)
      and delay. The delay is here to help simple controllers wait enough
      time between each instruction, advanced controllers with integrated
      timings control can ignore these delays.
      
      Controllers that natively support complex operations (operations
      formed of several instructions) can use the NAND op parser
      infrastructure. This infrastructure allows controller drivers to
      describe the sequence of instructions they support (called
      nand_op_pattern) and a hook for each of these supported sequences. The
      core then tries to find the best match for a given NAND operation, and
      calls the associated hook.
      
      Various other helpers are also added to ease NAND controller drivers
      writing.
      
      This new interface should ease support of vendor specific operations
      in that NAND manufacturer drivers now have a way to check if the
      controller they are connected to supports a specific operation, and
      complain or refuse to probe the NAND chip when that's not the case.
      Suggested-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      8878b126
  3. 14 12月, 2017 5 次提交
  4. 14 11月, 2017 1 次提交
  5. 07 11月, 2017 1 次提交
  6. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  7. 11 10月, 2017 1 次提交
    • K
      mtd: spi-nor: add spi_nor_init() function · 46dde01f
      Kamal Dasu 提交于
      This patch extracts some chunks from spi_nor_init_params and spi_nor_scan()
       and moves them into a new spi_nor_init() function.
      
      Indeed, spi_nor_init() regroups all the required SPI flash commands to be
      sent to the SPI flash memory before performing any runtime operations
      (Fast Read, Page Program, Sector Erase, ...). Hence spi_nor_init():
      1) removes the flash protection if applicable for certain vendors.
      2) sets the Quad Enable bit, if needed, before using Quad SPI protocols.
      3) makes the memory enter its (stateful) 4-byte address mode, if needed,
         for SPI flash memory > 128Mbits not supporting the 4-byte address
         instruction set.
      
      spi_nor_scan() now ends by calling spi_nor_init() once the probe phase has
      completed. Further patches could also use spi_nor_init() to implement the
      mtd->_resume() handler for the spi-nor framework.
      Signed-off-by: NKamal Dasu <kdasu.kdev@gmail.com>
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@wedev4u.fr>
      46dde01f
  8. 07 10月, 2017 1 次提交
  9. 18 9月, 2017 1 次提交
  10. 30 8月, 2017 1 次提交
  11. 23 8月, 2017 2 次提交
  12. 15 8月, 2017 1 次提交
    • A
      mtd: only use __xipram annotation when XIP_KERNEL is set · 129f6c48
      Arnd Bergmann 提交于
      When XIP_KERNEL is enabled, some functions are defined in the .data
      ELF section because we require them to be in RAM whenever we communicate
      with the flash chip. However this causes problems when FTRACE is
      enabled and gcc emits calls to __gnu_mcount_nc in the function
      prolog:
      
      drivers/built-in.o: In function `cfi_chip_setup':
      :(.data+0x272fc): relocation truncated to fit: R_ARM_CALL against symbol `__gnu_mcount_nc' defined in .text section in arch/arm/kernel/built-in.o
      drivers/built-in.o: In function `cfi_probe_chip':
      :(.data+0x27de8): relocation truncated to fit: R_ARM_CALL against symbol `__gnu_mcount_nc' defined in .text section in arch/arm/kernel/built-in.o
      /tmp/ccY172rP.s: Assembler messages:
      /tmp/ccY172rP.s:70: Warning: ignoring changed section attributes for .data
      /tmp/ccY172rP.s: Error: 1 warning, treating warnings as errors
      make[5]: *** [drivers/mtd/chips/cfi_probe.o] Error 1
      /tmp/ccK4rjeO.s: Assembler messages:
      /tmp/ccK4rjeO.s:421: Warning: ignoring changed section attributes for .data
      /tmp/ccK4rjeO.s: Error: 1 warning, treating warnings as errors
      make[5]: *** [drivers/mtd/chips/cfi_util.o] Error 1
      /tmp/ccUvhCYR.s: Assembler messages:
      /tmp/ccUvhCYR.s:1895: Warning: ignoring changed section attributes for .data
      /tmp/ccUvhCYR.s: Error: 1 warning, treating warnings as errors
      
      Specifically, this does not work because the .data section is not
      marked executable, which leads LD to not generate trampolines for
      long calls.
      
      This moves the __xipram functions into their own .xiptext section instead.
      The section is still placed next to .data and located in RAM but is marked
      executable, which avoids the build errors.
      
      Also, we only need to place the XIP functions into a separate section
      if both CONFIG_XIP_KERNEL and CONFIG_MTD_XIP are set: When only MTD_XIP
      is used, the whole kernel is still in RAM and we do not need to worry
      about pulling out the rug under it. When only XIP_KERNEL but not MTD_XIP
      is set, the kernel is in some form of ROM, but we never write to it.
      
      Note that MTD_XIP has been broken on ARM since around 2011 or 2012. I
      have sent another patch[2] to fix compilation, which I plan to merge
      through arm-soc unless there are objections. The obvious alternative
      to that would be to completely rip out the MTD_XIP support from the
      kernel, since obviously nobody has been using it in a long while.
      
      Link: [1] https://patchwork.kernel.org/patch/8109771/
      Link: [2] https://patchwork.kernel.org/patch/9855225/Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      129f6c48
  13. 13 8月, 2017 1 次提交
  14. 03 8月, 2017 1 次提交
  15. 02 8月, 2017 2 次提交
  16. 22 7月, 2017 1 次提交
  17. 18 7月, 2017 1 次提交
  18. 23 6月, 2017 1 次提交
    • R
      mtd: partitions: add support for partition parsers · 1a0915be
      Rafał Miłecki 提交于
      Some devices have partitions that are kind of containers with extra
      subpartitions / volumes instead of e.g. a simple filesystem data. To
      support such cases we need to first create normal flash device
      partitions and then take care of these special ones.
      
      It's very common case for home routers. Depending on the vendor there
      are formats like TRX, Seama, TP-Link, WRGG & more. All of them are used
      to embed few partitions into a single one / single firmware file.
      
      Ideally all vendors would use some well documented / standardized format
      like UBI (and some probably start doing so), but there are still
      countless devices on the market using these poor vendor specific
      formats.
      
      This patch extends MTD subsystem by allowing to specify list of parsers
      that should be tried for a given partition. Supporting such poor formats
      is highly unlikely to be the top priority so these changes try to
      minimize maintenance cost to the minimum. It reuses existing code for
      these new parsers and just adds a one property and one new function.
      
      This implementation requires setting partition parsers in a flash
      parser. A proper change of bcm47xxpart will follow and in the future we
      will hopefully also find a solution for doing it with ofpart
      ("fixed-partitions").
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      1a0915be
  19. 10 6月, 2017 2 次提交
    • M
      mtd: nand: add a shorthand to generate nand_ecc_caps structure · a03c6017
      Masahiro Yamada 提交于
      struct nand_ecc_caps was designed as flexible as possible to support
      multiple stepsizes (like sunxi_nand.c).
      
      So, we need to write multiple arrays even for the simplest case.
      I guess many controllers support a single stepsize, so here is a
      shorthand macro for the case.
      
      It allows to describe like ...
      
      NAND_ECC_CAPS_SINGLE(denali_pci_ecc_caps, denali_calc_ecc_bytes, 512, 8, 15);
      
      ... instead of
      
      static const int denali_pci_ecc_strengths[] = {8, 15};
      static const struct nand_ecc_step_info denali_pci_ecc_stepinfo = {
              .stepsize = 512,
              .strengths = denali_pci_ecc_strengths,
              .nstrengths = ARRAY_SIZE(denali_pci_ecc_strengths),
      };
      static const struct nand_ecc_caps denali_pci_ecc_caps = {
              .stepinfos = &denali_pci_ecc_stepinfo,
              .nstepinfos = 1,
              .calc_ecc_bytes = denali_calc_ecc_bytes,
      };
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      a03c6017
    • M
      mtd: nand: add generic helpers to check, match, maximize ECC settings · 2c8f8afa
      Masahiro Yamada 提交于
      Driver are responsible for setting up ECC parameters correctly.
      Those include:
        - Check if ECC parameters specified (usually by DT) are valid
        - Meet the chip's ECC requirement
        - Maximize ECC strength if NAND_ECC_MAXIMIZE flag is set
      
      The logic can be generalized by factoring out common code.
      
      This commit adds 3 helpers to the NAND framework:
      nand_check_ecc_caps - Check if preset step_size and strength are valid
      nand_match_ecc_req - Match the chip's requirement
      nand_maximize_ecc - Maximize the ECC strength
      
      To use the helpers above, a driver needs to provide:
        - Data array of supported ECC step size and strength
        - A hook that calculates ECC bytes from the combination of
          step_size and strength.
      
      By using those helpers, code duplication among drivers will be
      reduced.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      2c8f8afa
  20. 01 6月, 2017 3 次提交
    • B
      mtd: nand: Drop the ->errstat() hook · 7d135bcc
      Boris Brezillon 提交于
      The ->errstat() hook is no longer implemented NAND controller drivers.
      Get rid of it before someone starts abusing it.
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      7d135bcc
    • B
      mtd: nand: Pass the CS line to ->setup_data_interface() · 104e442a
      Boris Brezillon 提交于
      Some NAND controllers can assign different NAND timings to different
      CS lines. Pass the CS line information to ->setup_data_interface() so
      that the NAND controller driver knows which CS line is concerned by
      the setup_data_interface() request.
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      104e442a
    • T
      mtd: nand: add support for Micron on-die ECC · 9748e1d8
      Thomas Petazzoni 提交于
      Now that the core NAND subsystem has support for on-die ECC, this commit
      brings the necessary code to support on-die ECC on Micron NANDs.
      
      In micron_nand_init(), we detect if the Micron NAND chip supports on-die
      ECC mode, by checking a number of conditions:
      
       - It must be an ONFI NAND
       - It must be a SLC NAND
      
       - Enabling *and* disabling on-die ECC must work
      
       - The on-die ECC must be correcting 4 bits per 512 bytes of data. Some
         Micron NAND chips have an on-die ECC able to correct 8 bits per 512
         bytes of data, but they work slightly differently and therefore we
         don't support them in this patch.
      
      Then, if the on-die ECC cannot be disabled (some Micron NAND have on-die
      ECC forcefully enabled), we bail out, as we don't support such
      NANDs. Indeed, the implementation of raw_read()/raw_write() make the
      assumption that on-die ECC can be disabled. Support for Micron NANDs
      with on-die ECC forcefully enabled can easily be added, but in the
      absence of such HW for testing, we preferred to simply bail out.
      
      If the on-die ECC is supported, and requested in the Device Tree, then
      it is indeed enabled, by using custom implementations of the
      ->read_page(), ->read_page_raw(), ->write_page() and ->write_page_raw()
      operation to properly handle the on-die ECC.
      
      In the non-raw functions, we need to enable the internal ECC engine
      before issuing the NAND_CMD_READ0 or NAND_CMD_SEQIN commands, which is
      why we set the NAND_ECC_CUSTOM_PAGE_ACCESS option at initialization
      time (it asks the NAND core to let the NAND driver issue those
      commands).
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      9748e1d8
  21. 30 5月, 2017 1 次提交
  22. 16 5月, 2017 4 次提交
    • M
      mtd: adjust kernel-docs to avoid Sphinx/kerneldoc warnings · b6f6c294
      Mauro Carvalho Chehab 提交于
      ./drivers/mtd/nand/nand_bbt.c:1: warning: no structured comments found
      ./include/linux/mtd/nand.h:785: ERROR: Unexpected indentation.
      ./drivers/mtd/nand/nand_base.c:449: WARNING: Definition list ends without a blank line; unexpected unindent.
      ./drivers/mtd/nand/nand_base.c:1161: ERROR: Unexpected indentation.
      ./drivers/mtd/nand/nand_base.c:1162: WARNING: Block quote ends without a blank line; unexpected unindent.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      b6f6c294
    • C
      mtd: spi-nor: introduce Octo SPI protocols · fe488a5e
      Cyrille Pitchen 提交于
      This patch starts adding support to Octo SPI protocols (SPI x-y-8).
      
      Op codes for Fast Read and/or Page Program operations using Octo SPI
      protocols are not known yet (no JEDEC specification has defined them yet)
      but we'd rather introduce the Octo SPI protocols now so it's done as it
      should be.
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Reviewed-by: NMarek Vasut <marek.vasut@gmail.com>
      fe488a5e
    • C
      mtd: spi-nor: introduce Double Transfer Rate (DTR) SPI protocols · 15f55331
      Cyrille Pitchen 提交于
      This patch introduces support to Double Transfer Rate (DTR) SPI protocols.
      DTR is used only for Fast Read operations.
      
      According to manufacturer datasheets, whatever the number of I/O lines
      used during instruction (x) and address/mode/dummy (y) clock cycles, DTR
      is used only during data (z) clock cycles of SPI x-y-z protocols.
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Reviewed-by: NMarek Vasut <marek.vasut@gmail.com>
      15f55331
    • C
      mtd: spi-nor: introduce SPI 1-2-2 and SPI 1-4-4 protocols · cfc5604c
      Cyrille Pitchen 提交于
      This patch changes the prototype of spi_nor_scan(): its 3rd parameter
      is replaced by a 'struct spi_nor_hwcaps' pointer, which tells the spi-nor
      framework about the actual hardware capabilities supported by the SPI
      controller and its driver.
      
      Besides, this patch also introduces a new 'struct spi_nor_flash_parameter'
      telling the spi-nor framework about the hardware capabilities supported by
      the SPI flash memory and the associated settings required to use those
      hardware caps.
      
      Then, to improve the readability of spi_nor_scan(), the discovery of the
      memory settings and the memory initialization are now split into two
      dedicated functions.
      
      1 - spi_nor_init_params()
      
      The spi_nor_init_params() function is responsible for initializing the
      'struct spi_nor_flash_parameter'. Currently this structure is filled with
      legacy values but further patches will allow to override some parameter
      values dynamically, for instance by reading the JESD216 Serial Flash
      Discoverable Parameter (SFDP) tables from the SPI memory.
      The spi_nor_init_params() function only deals with the hardware
      capabilities of the SPI flash memory: especially it doesn't care about
      the hardware capabilities supported by the SPI controller.
      
      2 - spi_nor_setup()
      
      The second function is called once the 'struct spi_nor_flash_parameter'
      has been initialized by spi_nor_init_params().
      With both 'struct spi_nor_flash_parameter' and 'struct spi_nor_hwcaps',
      the new argument of spi_nor_scan(), spi_nor_setup() computes the best
      match between hardware caps supported by both the (Q)SPI memory and
      controller hence selecting the relevant settings for (Fast) Read and Page
      Program operations.
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Reviewed-by: NMarek Vasut <marek.vasut@gmail.com>
      cfc5604c
  23. 15 5月, 2017 2 次提交
    • T
      mtd: nand: export nand_{read,write}_page_raw() · cc0f51ec
      Thomas Petazzoni 提交于
      The nand_read_page_raw() and nand_write_page_raw() functions might be
      re-used by vendor-specific implementations of the read_page/write_page
      functions. Instead of having vendor-specific code duplicate this code,
      it is much better to export those functions and allow them to be
      re-used.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Reviewed-by: NRichard Weinberger <richard@nod.at>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      cc0f51ec
    • T
      mtd: nand: add core support for on-die ECC · 785818fa
      Thomas Petazzoni 提交于
      A number of NAND flashes have a capability called "on-die ECC" where the
      NAND chip itself is capable of detecting and correcting errors.
      
      Linux already has support for using the ECC implementation of the NAND
      controller, or a software based ECC implementation, but not for using
      the ECC implementation of the NAND controller. However, such an
      implementation is sometimes useful in situations where the NAND
      controller provides ECC algorithms that are not strong enough for the
      NAND chip used on the system. A typical case is a NAND chip that
      requires a 4-bit ECC, while the NAND controller only provides a 1-bit
      ECC algorithm.
      
      This commit introduces the support for the NAND_ECC_ON_DIE ECC mode:
      
       - Parsing of the "on-die" value for the "nand-ecc-mode" Device Tree
         property
      
       - Handling NAND_ECC_ON_DIE case in nand_scan_tail(). The idea is that
         the vendor specific code for the NAND chip must implement
         ->read_page() and ->write_page(). It may optionally provide its own
         ->read_page_raw() and ->write_page_raw() as well. For OOB operation,
         we assume the standard operations are good enough, but they can be
         overridden by the vendor specific code if needed.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Reviewed-by: NRichard Weinberger <richard@nod.at>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      785818fa
  24. 25 4月, 2017 3 次提交
  25. 21 4月, 2017 1 次提交
    • J
      mtd: Convert to dynamically allocated bdi infrastructure · fa06052d
      Jan Kara 提交于
      MTD already allocates backing_dev_info dynamically. Convert it to use
      generic infrastructure for this including proper refcounting. We drop
      mtd->backing_dev_info as its only use was to pass mtd_bdi pointer from
      one file into another and if we wanted to keep that in a clean way, we'd
      have to make mtd hold and drop bdi reference as needed which seems
      pointless for passing one global pointer...
      
      CC: David Woodhouse <dwmw2@infradead.org>
      CC: Brian Norris <computersforpeace@gmail.com>
      CC: linux-mtd@lists.infradead.org
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      fa06052d