1. 16 3月, 2018 1 次提交
  2. 16 1月, 2018 3 次提交
  3. 14 11月, 2017 1 次提交
  4. 27 9月, 2017 1 次提交
  5. 24 6月, 2017 1 次提交
  6. 23 6月, 2017 5 次提交
    • 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
    • R
      mtd: partitions: add support for subpartitions · 97519dc5
      Rafał Miłecki 提交于
      Some flash device partitions can be containers with extra subpartitions
      (volumes). All callbacks are already capable of this additional level of
      indirection.
      
      This patch makes sure we always display subpartitions using a tree
      structure and takes care of deleting subpartitions when parent gets
      removed.
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      97519dc5
    • R
      mtd: partitions: rename "master" to the "parent" where appropriate · 0a9d72b6
      Rafał Miłecki 提交于
      This prepares mtd subsystem for the new feature: subpartitions. In some
      cases flash device partition can be a container with extra subpartitions
      (volumes).
      
      So far there was a flat structure implemented. One master (flash device)
      could be partitioned into few partitions. Every partition got its master
      and it was enough to get things running.
      
      To support subpartitions we need to store pointer to the parent for each
      partition. This is required to implement more natural tree structure and
      handle all recursion and offsets calculation.
      
      To make code consistent this patch renamed "master" to the "parent" in
      places where we can be dealing with subpartitions.
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      0a9d72b6
    • R
      mtd: partitions: remove sysfs files when deleting all master's partitions · c5ceaba7
      Rafał Miłecki 提交于
      When support for sysfs "offset" file was added it missed to update the
      del_mtd_partitions function. It deletes partitions just like
      mtd_del_partition does so both should also take care of removing sysfs
      files.
      
      This change moves sysfs_remove_files call to the shared function to fix
      this issue.
      
      Fixes: a62c24d7 ("mtd: part: Add sysfs variable for offset of partition")
      Cc: Dan Ehrenberg <dehrenberg@chromium.org>
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      c5ceaba7
    • R
      mtd: partitions: add helper for deleting partition · 08263a9a
      Rafał Miłecki 提交于
      There are two similar functions handling deletion. One handles single
      partition and another the whole MTD flash device. They share (duplicate)
      some code so it makes sense to add a small helper for that part.
      
      Function del_mtd_partitions has been moved a bit to keep all deleting
      stuff together.
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      08263a9a
  7. 21 6月, 2017 1 次提交
  8. 14 6月, 2017 1 次提交
  9. 10 2月, 2017 1 次提交
  10. 09 2月, 2017 1 次提交
  11. 12 10月, 2016 1 次提交
  12. 29 9月, 2016 1 次提交
  13. 15 9月, 2016 1 次提交
    • B
      mtd: introduce the mtd_pairing_scheme concept · 477b0229
      Boris Brezillon 提交于
      MLC and TLC NAND devices are using NAND cells exposing more than one bit,
      but instead of attaching all the bits in a given cell to a single NAND
      page, each bit is usually attached to a different page. This concept is
      called 'page pairing', and has significant impacts on the flash storage
      usage.
      The main problem showed by these devices is that interrupting a page
      program operation may not only corrupt the page we are programming
      but also the page it is paired with, hence the need to expose to MTD
      users the pairing scheme information.
      
      The pairing APIs allows one to query pairing information attached to a
      given page (here called wunit), or the other way around (the wunit
      pointed by pairing information).
      It also provides several helpers to help the conversion between absolute
      offsets and wunits, and query the number of pairing groups.
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      Reviewed-by: NBrian Norris <computersforpeace@gmail.com>
      477b0229
  14. 20 4月, 2016 2 次提交
  15. 08 3月, 2016 1 次提交
  16. 10 12月, 2015 4 次提交
  17. 05 12月, 2015 1 次提交
  18. 20 11月, 2015 1 次提交
  19. 13 11月, 2015 1 次提交
  20. 27 10月, 2015 1 次提交
    • B
      mtd: mtdpart: Do not fail mtd probe when parsing partitions fails · 5a2415b0
      Brian Norris 提交于
      Due to wrong assumption in ofpart ofpart fails on Exynos on SPI chips
      with no partitions because the subnode containing controller data
      confuses the ofpart parser.
      
      Thus compiling in ofpart support automatically fails probing any SPI NOR
      flash without partitions on Exynos.
      
      Compiling in a partitioning scheme should not cause probe of otherwise
      valid device to fail.
      
      Instead, let's do the following:
       * try parsers until one succeeds
       * if no parser succeeds, report the first error we saw
       * even in the failure case, allow MTD to probe, with fallback
         partitions or no partitions at all -- the master device will still be
         registered
      
      Issue report and comments initially by Michal Suchanek.
      Reported-by: NMichal Suchanek <hramrach@gmail.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      5a2415b0
  21. 12 10月, 2015 1 次提交
  22. 01 10月, 2015 1 次提交
  23. 06 4月, 2015 3 次提交
  24. 21 1月, 2015 1 次提交
  25. 09 7月, 2014 2 次提交
  26. 11 3月, 2014 1 次提交
  27. 04 1月, 2014 1 次提交