1. 07 7月, 2012 27 次提交
  2. 06 7月, 2012 4 次提交
    • H
      mtd: nandsim: don't open code a do_div helper · 596fd462
      Herton Ronaldo Krzesinski 提交于
      We don't need to open code the divide function, just use div_u64 that
      already exists and do the same job. While this is a straightforward
      clean up, there is more to that, the real motivation for this.
      
      While building on a cross compiling environment in armel, using gcc
      4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5), I was getting the following build
      error:
      
      ERROR: "__aeabi_uldivmod" [drivers/mtd/nand/nandsim.ko] undefined!
      
      After investigating with objdump and hand built assembly version
      generated with the compiler, I narrowed __aeabi_uldivmod as being
      generated from the divide function. When nandsim.c is built with
      -fno-inline-functions-called-once, that happens when
      CONFIG_DEBUG_SECTION_MISMATCH is enabled, the do_div optimization in
      arch/arm/include/asm/div64.h doesn't work as expected with the open
      coded divide function: even if the do_div we are using doesn't have a
      constant divisor, the compiler still includes the else parts of the
      optimized do_div macro, and translates the divisions there to use
      __aeabi_uldivmod, instead of only calling __do_div_asm -> __do_div64 and
      optimizing/removing everything else out.
      
      So to reproduce, gcc 4.6 plus CONFIG_DEBUG_SECTION_MISMATCH=y and
      CONFIG_MTD_NAND_NANDSIM=m should do it, building on armel.
      
      After this change, the compiler does the intended thing even with
      -fno-inline-functions-called-once, and optimizes out as expected the
      constant handling in the optimized do_div on arm. As this also avoids a
      build issue, I'm marking for Stable, as I think is applicable for this
      case.
      Signed-off-by: NHerton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
      Cc: stable@vger.kernel.org
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      596fd462
    • S
      mtd: gpmi-nand: fix read page when reading to vmalloced area · 6023813a
      Sascha Hauer 提交于
      The gpmi-nand driver uses virt_addr_valid() to check whether a buffer
      is suitable for dma. If it's not, a driver allocated buffer is used
      instead. Then after a page read the driver allocated buffer must be
      copied to the user supplied buffer. This does not happen since commit
      7725cc85.
      
      This patch fixes the issue. The bug is encountered with UBI which uses a
      vmalloced buffer for the volume table.
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Tested-by: snijsure@grid-net.com
      Acked-by: NHuang Shijie <b32955@freescale.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      6023813a
    • S
      mtd: mxc_nand: use 32bit copy functions · 096bcc23
      Sascha Hauer 提交于
      The following commit changes the function used to copy from/to
      the hardware buffer to memcpy_[from|to]io. This does not work
      since the hardware cannot handle the byte accesses used by these
      functions. Instead of reverting this patch introduce 32bit
      correspondents of these functions.
      
      | commit 5775ba36ea9c760c2d7e697dac04f2f7fc95aa62
      | Author: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
      | Date:   Tue Apr 24 10:05:22 2012 +0200
      |
      |    mtd: mxc_nand: fix several sparse warnings about incorrect address space
      |
      |     Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
      |     Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      096bcc23
    • D
      mtd: cafe_nand: fix an & vs | mistake · 48f8b641
      Dan Carpenter 提交于
      The intent here was clearly to set result to true if the 0x40000000 flag
      was set.  But instead there was a | vs & typo and we always set result
      to true.
      
      Artem: check the spec at
      wiki.laptop.org/images/5/5c/88ALP01_Datasheet_July_2007.pdf
      and this fix looks correct.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      48f8b641
  3. 09 6月, 2012 1 次提交
  4. 02 6月, 2012 2 次提交
    • S
      mtd: mxc_nand: move ecc strengh setup before nand_scan_tail · 4a43faf5
      Sascha Hauer 提交于
      Since commit 6a918bad, the mxc_nand driver
      fails with:
      
      Driver must set ecc.strength when using hardware ECC
      
      This is because nand_scan_tail checks for correct ecc strength
      settings, so we must set them up before nand_scan_tail.
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Cc: stable@vger.kernel.org [3.4+]
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      4a43faf5
    • M
      mtd: gpmi-nand: define ecc.strength · 5636ce0f
      Marek Vasut 提交于
      Fix an issue which was introduced by the recent addition of ecc.strength.
      
      The ecc.strength wasn't set in gpmi-nand, resulting in the following crash:
      [    2.550000] kernel BUG at drivers/mtd/nand/nand_base.c:3347!
      ...
      [    2.550000] [<c020841c>] (nand_scan_tail+0x328/0x650) from [<c02f68e0>] (gpmi_nand_probe+0x43c/0x5a4)
      [    2.550000] [<c02f68e0>] (gpmi_nand_probe+0x43c/0x5a4) from [<c01f6618>] (platform_drv_probe+0x14/0x18)
      [    2.550000] [<c01f6618>] (platform_drv_probe+0x14/0x18) from [<c01f55b0>] (driver_probe_device+0x74/0x1fc)
      [    2.550000] [<c01f55b0>] (driver_probe_device+0x74/0x1fc) from [<c01f57cc>] (__driver_attach+0x94/0x98)
      [    2.550000] [<c01f57cc>] (__driver_attach+0x94/0x98) from [<c01f3d40>] (bus_for_each_dev+0x50/0x80)
      [    2.550000] [<c01f3d40>] (bus_for_each_dev+0x50/0x80) from [<c01f4e18>] (bus_add_driver+0x188/0x25c)
      [    2.550000] [<c01f4e18>] (bus_add_driver+0x188/0x25c) from [<c01f5a70>] (driver_register+0x78/0x138)
      [    2.550000] [<c01f5a70>] (driver_register+0x78/0x138) from [<c043dc7c>] (gpmi_nand_init+0xc/0x30)
      [    2.550000] [<c043dc7c>] (gpmi_nand_init+0xc/0x30) from [<c0008824>] (do_one_initcall+0x108/0x17c)
      [    2.550000] [<c0008824>] (do_one_initcall+0x108/0x17c) from [<c042a8b8>] (kernel_init+0xfc/0x1bc)
      [    2.550000] [<c042a8b8>] (kernel_init+0xfc/0x1bc) from [<c000fab4>] (kernel_thread_exit+0x0/0x8)
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      5636ce0f
  5. 29 5月, 2012 1 次提交
  6. 19 5月, 2012 1 次提交
  7. 15 5月, 2012 1 次提交
    • J
      mtd: Add orion_nand devicetree bindings · a0fabf72
      Jamie Lentin 提交于
      Allow a NAND chip using the orion_nand driver to be described using devicetree.
      
      Changes since last submission (V4) [Addressing comments by]:-
      * WARN when bank-width is out of range [Andrew Lunn]
      
      Changes since last submission (V3):-
      * Document all parameters [Grant Likely]
      * Convert bank-width to be in bytes
      * Add explicit defaults for cle, ale and bank-width
      Signed-off-by: NJamie Lentin <jm@lentin.co.uk>
      Signed-off-by: NJason Cooper <jason@lakedaemon.net>
      a0fabf72
  8. 14 5月, 2012 3 次提交