1. 16 11月, 2012 6 次提交
    • 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
    • A
      mtd: diskonchip: don't warn about ARM architecture · ca796f85
      Arnd Bergmann 提交于
      Enabling the diskonchip drivers on most architectures results
      in a pointless warning "#warning Unknown architecture for
      DiskOnChip. No default probe locations defined". The driver
      can in fact handle the default location already through the
      CONFIG_MTD_DOCPROBE_ADDRESS, which gets set on the platforms
      that need it, and we get a run-time error if this is not
      set correctly.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      ca796f85
    • M
      mtd: nand_wait: warn if the nand is busy on exit · f251b8df
      Matthieu CASTET 提交于
      This patch allow to detect buggy driver/hardware with
      bad RnB (dev_ready) management or when timeout occurs in polling mode.
      
      This works when dev_ready is set or not set.
      There are 2 methods to wait for an erase/program command completion:
      
      1. Wait until nand RnB pin goes high (that's what chip->dev_ready usually does)
      2. Poll the device: send a status (0x70) command and read status byte in a loop
         until bit NAND_STATUS_READY is set
      
      In all cases, you should send a status command after completion, to check if
      the operation was successful. And if the operation completed, the status should
      have bit NAND_STATUS_READY set.
      Signed-off-by: NMatthieu CASTET <matthieu.castet@parrot.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      f251b8df
    • M
      mtd: davinci: add support for parition binding nodes · 192afdbf
      Murali Karicheri 提交于
      Enhance the driver to support partition subnodes inside the nand
      device bindings to describe partions on the nand device.
      Signed-off-by: NMurali Karicheri <m-karicheri2@ti.com>
      Reviewed-by: NGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      192afdbf
    • H
      mtd: cmdlinepart: fix the overflow of big mtd partitions · 6f9f59ee
      Huang Shijie 提交于
      When the kernel parses the following cmdline
      
      	#mtdparts=gpmi-nand:16m(boot),16m(kernel),1g(home),4g(test),-(usr)
      
      for a big nand chip Micron MT29F64G08AFAAAWP(8GB), we got the following wrong
      result:
      
      	.............................................
      		"mtd: partition size too small (0)"
      	.............................................
      
      We can not get any partition.
      
      The "4g(test)" partition triggers a overflow of the "size". The memparse()
      returns 4g to the "size", but the size is "unsigned long" type, so a overflow
      occurs, the "size" becomes zero in the end.
      
      This patch changes the "size"/"offset" to "unsigned long long" type,
      and replaces the UINT_MAX with ULLONG_MAX for macros SIZE_REMAINING and
      OFFSET_CONTINUOUS.
      Signed-off-by: NHuang Shijie <b32955@freescale.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      6f9f59ee
    • 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
  2. 15 11月, 2012 34 次提交