1. 06 5月, 2013 1 次提交
  2. 14 3月, 2013 1 次提交
  3. 22 2月, 2013 1 次提交
  4. 04 2月, 2013 1 次提交
    • S
      mtd: cfi_cmdset_0002: Support Persistent Protection Bits (PPB) locking · 1648eaaa
      Stefan Roese 提交于
      Currently cfi_cmdset_0002.c does not support PPB locking of sectors. This
      patch adds support for this locking/unlocking mechanism. It is needed on
      some platforms, since newer U-Boot versions do support this PPB locking
      and protect for example their environment sector(s) this way.
      
      This PPB locking/unlocking will be enabled for all devices supported by
      cfi_cmdset_0002 reporting 8 in the CFI word 0x49 (Sector Protect/Unprotect
      scheme).
      
      Please note that PPB locking does support sector-by-sector locking. But
      the whole chip can only be unlocked together. So unlocking one sector
      will automatically unlock all sectors of this device. Because of this
      chip limitation, the PPB unlocking function saves the current locking
      status of all sectors before unlocking the whole device. After unlocking
      the saved locking status is re-configured. This way only the addressed
      sectors will be unlocked.
      
      To selectively enable this advanced sector protection mechanism, the
      device-tree property "use-advanced-sector-protection" has been created.
      To enable support for this locking this property needs to be present in the
      flash DT node. E.g.:
      
      nor_flash@0,0 {
      	compatible = "amd,s29gl256n", "cfi-flash";
      	bank-width = <2>;
      	use-advanced-sector-protection;
      	...
      
      Tested with Spansion S29GL512S10THI and Micron JS28F512M29EWx flash
      devices.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Tested-by: NHolger Brunck <holger.brunck@keymile.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      1648eaaa
  5. 03 12月, 2012 1 次提交
    • M
      mtd: nand: add NAND_BUSWIDTH_AUTO to autodetect bus width · 64b37b2a
      Matthieu CASTET 提交于
      The driver call nand_scan_ident in 8 bit mode, then
      readid or onfi detection are done (and detect bus width).
      The driver should update its bus width before calling nand_scan_tail.
      
      This work because readid and onfi are read work 8 byte mode.
      
      Note that nand_scan_ident send command (NAND_CMD_RESET, NAND_CMD_READID, NAND_CMD_PARAM), address and read data
      The ONFI specificication is not very clear for x16 device if high byte of address should be driven to 0,
      but according to [1] it should be ok to not drive it during autodetection.
      
      [1]
      3.3.2. Target Initialization
      
      [...]
      The Read ID and Read Parameter Page commands only use the lower 8-bits of the data bus.
      The host shall not issue commands that use a word data width on x16 devices until the host
      determines the device supports a 16-bit data bus width in the parameter page.
      Signed-off-by: NMatthieu CASTET <matthieu.castet@parrot.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      64b37b2a
  6. 21 11月, 2012 1 次提交
  7. 16 11月, 2012 3 次提交
    • A
      mtd: uninitialized variable warning in map.h · 5d27aa5a
      Arnd Bergmann 提交于
      The map_word_load() function initializes exactly
      as many words in the buffer as required, but gcc
      cannot figure this out and gives a misleading
      warning. Marking the local variable as
      uninitialized_var shuts up that warning.
      
      Without this patch, building acs5k_defconfig results in:
      
      drivers/mtd/chips/cfi_cmdset_0002.c: In function 'cfi_amdstd_panic_write':
      include/linux/mtd/map.h:331:11: warning: 'r.x[0]' may be used uninitialized in this function [-Wuninitialized]
      drivers/mtd/chips/cfi_cmdset_0002.c: In function 'cfi_amdstd_write_words':
      include/linux/mtd/map.h:331:11: warning: 'r.x[0]' may be used uninitialized in this function [-Wuninitialized]
      drivers/mtd/chips/cfi_cmdset_0001.c: In function 'cfi_intelext_write_words':
      include/linux/mtd/map.h:331:11: warning: 'r.x[0]' may be used uninitialized in this function [-Wuninitialized]
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      5d27aa5a
    • A
      mtd: diskonchip: use inline functions for DocRead/DocWrite · d611d41b
      Arnd Bergmann 提交于
      The diskonchip drivers traditionally use home-grown macros for
      doing MMIO accesses, which cause a lot of warnings, at least
      on ARM machines:
      
      drivers/mtd/devices/doc2000.c: In function 'doc_write':
      drivers/mtd/devices/doc2000.c:854:5: warning: value computed is not used [-Wunused-value]
      drivers/mtd/devices/doc2000.c: In function 'doc_erase':
      drivers/mtd/devices/doc2000.c:1123:5: warning: value computed is not used [-Wunused-value
      drivers/mtd/nand/diskonchip.c: In function 'doc2000_read_byte':
      drivers/mtd/nand/diskonchip.c:318:3: warning: value computed is not used [-Wunused-value]
      
      A nicer solution is to use the architecture-defined I/O accessors.
      Here, we use the __raw_readl/__raw_writel style, instead of the
      proper readl/writel ones, in order to preserve the odd semantics
      of the existing macros that have their own barrier implementation
      and no byte swap. It would be nice to fix this properly and use
      the correct accessors as well as make the word size independent
      from the architecture, but I guess the hardware is obsolete
      enough that we should better not mess the driver an more than
      necessary.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      d611d41b
    • V
      mtd: map: Fix compilation warning · 3e9ce49e
      Viresh Kumar 提交于
      This patch is an attempt to fix following compilation warning.
      
      In file included from drivers/mtd/chips/cfi_cmdset_0001.c:35:0:
      drivers/mtd/chips/cfi_cmdset_0001.c: In function 'cfi_intelext_write_words':
      include/linux/mtd/map.h:331:11: warning: 'r.x[0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
      
      I could have used uninitialized_var() too, but didn't used it as the final else
      part of map_word_load() is missing. So there is a chance that it might be passed
      uninitialized. Better initialize to zero.
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      3e9ce49e
  8. 15 11月, 2012 6 次提交
  9. 29 9月, 2012 10 次提交
  10. 04 9月, 2012 2 次提交
  11. 07 7月, 2012 9 次提交
  12. 21 5月, 2012 3 次提交
    • J
      UBI: modify ubi_wl_flush function to clear work queue for a lnum · 62f38455
      Joel Reardon 提交于
      This patch modifies ubi_wl_flush to force the erasure of
      particular volume id / logical eraseblock number pairs. Previous functionality
      is preserved when passing UBI_ALL for both values. The locations where ubi_wl_flush
      were called are appropriately changed: ubi_leb_erase only flushes for the
      erased LEB, and ubi_create_volume forces only flushing for its volume id.
      External code can call this new feature via the new function ubi_flush() added
      to kapi.c, which simply passes through to ubi_wl_flush().
      
      This was tested by disabling the call to do_work in ubi thread, which results
      in the work queue remaining unless explicitly called to remove. UBIFS was
      changed to call ubifs_leb_change 50 times for four different LEBs. Then the
      new function was called to clear the queue: passing wrong volume ids / lnum,
      correct ones, and finally UBI_ALL for both to ensure it was finally all
      cleard. The work queue was dumped each time and the selective removal
      of the particular LEB numbers was observed. Extra checks were enabled and
      ubifs's integck was also run. Finally, the drive was repeatedly filled and
      emptied to ensure that the queue was cleared normally.
      
      Artem: amended the patch.
      Signed-off-by: NJoel Reardon <reardonj@inf.ethz.ch>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      62f38455
    • A
      UBI: introduce UBI_ALL constant · 05a3cb7d
      Artem Bityutskiy 提交于
      Joel will use it in his 'ubi_flush()' extention to specify all eraseblocks.
      Also amend the comment for UBI_UNKNOWN - it is used beyond attaching info
      structure now.
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      05a3cb7d
    • R
      UBI: Kill data type hint · b36a261e
      Richard Weinberger 提交于
      We do not need this feature and to our shame it even was not working
      and there was a bug found very recently.
      	-- Artem Bityutskiy
      
      Without the data type hint UBI2 (fastmap) will be easier to implement.
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      b36a261e
  13. 14 5月, 2012 1 次提交