1. 11 9月, 2011 9 次提交
  2. 25 5月, 2011 4 次提交
  3. 06 1月, 2011 1 次提交
    • A
      mtd: add writebufsize field to mtd_info struct · 0e4ca7e5
      Anatolij Gustschin 提交于
      This field will be used to indicate the write buffer size
      of the MTD device. UBI will set it's minimal I/O unit size
      (min_io_size) to the indicated write buffer size. By this
      change we intend to fix failed recovery of UBIFS partitions
      we currently observe on NOR flash when mounting the partition
      after unclean unmount.
      
      Currently the min_io_size is set to mtd->writesize (which is 1
      byte for NOR flash). But flash programming is often done from
      prepared write buffer containing multiple bytes and is performed
      in one programming operation which could be interrupted by a power
      cut or a system reset causing corrupted (partially written) areas
      in a flash sector. Knowing the size of potentially corrupted areas
      UBIFS scanning and recovery algorithms are able to perform
      successful recovery.
      
      In case of NOR flash minimal I/O size must be equal to the
      maximal size of the write buffer used by embedded flash
      programming algorithm. In case of NAND flash mtd->writebufsize
      should be equivalent to mtd->writesize.
      
      The subsequent patches will add mtd->writebufsize initialization
      where needed.
      Signed-off-by: NAnatolij Gustschin <agust@denx.de>
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      0e4ca7e5
  4. 25 10月, 2010 2 次提交
    • B
      mtd: edit comments on deprecation of ioctl ECCGETLAYOUT · 0ceacf36
      Brian Norris 提交于
      There were some improvements and additions necessary in the
      comments explaining of the expansion of nand_ecclayout, the
      introduction of nand_ecclayout_user, and the deprecation of the
      ioctl ECCGETLAYOUT.
      
      Also, I found a better placement for the macro MTD_MAX_ECCPOS_ENTRIES;
      next to the definition of MTD_MAX_OOBFREE_ENTRIES in mtd-abi.h. The macro
      is really only important for the ioctl code (found in drivers/mtd/mtdchar.c)
      but since there are small edits being made to the user-space header, I
      figured this is a better location.
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      0ceacf36
    • B
      mtd: nand: expand nand_ecc_layout, deprecate ioctl ECCGETLAYOUT · cc26c3cd
      Brian Norris 提交于
      struct nand_ecclayout is too small for many new chips; OOB regions can be as
      large as 448 bytes and may increase more in the future. Thus, copying that
      struct to user-space with the ECCGETLAYOUT ioctl is not a good idea; the ioctl
      would have to be updated every time there's a change to the current largest
      size.
      
      Instead, the old nand_ecclayout is renamed to nand_ecclayout_user and a
      new struct nand_ecclayout is created that can accomodate larger sizes and
      expand without affecting the user-space. struct nand_ecclayout can still
      be used in board drivers without modification -- at least for now.
      
      A new function is provided to convert from the new to the old in order to
      allow the deprecated ioctl to continue to work with truncated data. Perhaps
      the ioctl, the conversion process, and the struct nand_ecclayout_user can be
      removed altogether in the future.
      
      Note: There are comments in nand/davinci_nand.c::nand_davinci_probe()
      regarding this issue; this driver (and maybe others) can be updated to
      account for extra space. All kernel drivers can use the expanded
      nand_ecclayout as a drop-in replacement and ignore its benefits.
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      cc26c3cd
  5. 09 8月, 2010 2 次提交
  6. 02 8月, 2010 1 次提交
  7. 27 2月, 2010 2 次提交
  8. 25 2月, 2010 1 次提交
  9. 03 8月, 2009 1 次提交
  10. 04 4月, 2009 1 次提交
    • D
      [MTD] driver model updates · 1f24b5a8
      David Brownell 提交于
      Update driver model support in the MTD framework, so it fits
      better into the current udev-based hotplug framework:
      
       - Each mtd_info now has a device node.  MTD drivers should set
         the dev.parent field to point to the physical device, before
         setting up partitions or otherwise declaring MTDs.
      
       - Those device nodes always map to /sys/class/mtdX device nodes,
         which no longer depend on MTD_CHARDEV.
      
       - Those mtdX sysfs nodes have a "starter set" of attributes;
         it's not yet sufficient to replace /proc/mtd.
      
       - Enabling MTD_CHARDEV provides /sys/class/mtdXro/ nodes and the
         /sys/class/mtd*/dev attributes (for udev, mdev, etc).
      
       - Include a MODULE_ALIAS_CHARDEV_MAJOR macro.  It'll work with
         udev creating the /dev/mtd* nodes, not just a static rootfs.
      
      So the sysfs structure is pretty much what you'd expect, except
      that readonly chardev nodes are a bit quirky.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      1f24b5a8
  11. 24 3月, 2009 1 次提交
  12. 06 1月, 2009 1 次提交
  13. 10 12月, 2008 2 次提交
  14. 12 8月, 2008 1 次提交
  15. 30 7月, 2008 1 次提交
  16. 22 7月, 2008 1 次提交
  17. 05 6月, 2008 1 次提交
  18. 02 5月, 2008 1 次提交
  19. 07 2月, 2008 1 次提交
    • R
      [MTD] Add mtd panic_write function pointer · 388bbb09
      Richard Purdie 提交于
      MTDs are well suited for logging critical data and the mtdoops driver
      allows kernel panics/oops to be written to flash in a blackbox flight
      recorder fashion allowing better debugging and analysis of crashes.
      
      Any kernel oops in user context can be easily handled since the kernel
      continues as normal and any queued mtd writes are scheduled. Any kernel
      oops in interrupt context results in a panic and the delayed writes will
      not be scheduled however. The existing mtd->write function cannot be
      called in interrupt context so these messages can never be written to
      flash.
      
      This patch adds a panic_write function pointer that drivers can
      optionally implement which can be called in interrupt context. It is
      only intended to be called when its known the kernel is about to panic
      and we need to write to succeed. Since the kernel is not going to be
      running for much longer, this function can break locks and delay to
      ensure the write succeeds (but not sleep).
      Signed-off-by: NRichard Purdie <rpurdie@rpsys.net>
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      388bbb09
  20. 21 9月, 2007 1 次提交
  21. 09 5月, 2007 2 次提交
  22. 03 4月, 2007 1 次提交
  23. 08 3月, 2007 1 次提交
    • V
      [MTD] [NAND] make oobavail public · 1f92267c
      Vitaly Wool 提交于
      During the MTD rework the oobavail parameter of mtd_info structure has become
      private. This is not quite correct in terms of integrity and logic. If we have
      means to write to OOB area, then we'd like to know upfront how many bytes out
      of OOB are spare per page to be able to adapt to specific cases.
      The patch inlined adds the public oobavail parameter.
      Signed-off-by: NVitaly Wool <vwool@ru.mvista.com>
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      1f92267c
  24. 09 2月, 2007 1 次提交