1. 04 1月, 2014 3 次提交
    • H
      mtd: gpmi: remove the unnecessary pr_err() · 43a34b8b
      Huang Shijie 提交于
      The error messages for the failure of dmaengine_prep_slave_sg are
      not necessary, this patch removes all these pr_err, and returns with
      the proper error code -EINVAL, not -1.
      Signed-off-by: NHuang Shijie <b32955@freescale.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      43a34b8b
    • H
      mtd: gpmi: do not use the local array to do the DMA transfer · df877fb3
      Huang Shijie 提交于
      The local array feature[] is in the stack. We can see the warning
      when we enable the CONFIG_DMA_API_DEBUG:
      ----------------------------------------------------------
      WARNING: at lib/dma-debug.c:950 check_for_stack+0xac/0xf8()
      gpmi-nand 112000.gpmi-nand: DMA-API: device driver maps memory fromstack [addr=dc05be34]
      Modules linked in:
      CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.17-16851-g2414a73 #1324
      [<80014cbc>] (unwind_backtrace+0x0/0x138) from [<8001251c>] (show_stack+0x10/0x14)
      [<8001251c>] (show_stack+0x10/0x14) from [<8002699c>] (warn_slowpath_common+0x4c/0x68)
      [<8002699c>] (warn_slowpath_common+0x4c/0x68) from [<80026a4c>] (warn_slowpath_fmt+0x30/0x40)
      [<80026a4c>] (warn_slowpath_fmt+0x30/0x40) from [<8028e2f8>] (check_for_stack+0xac/0xf8)
      [<8028e2f8>] (check_for_stack+0xac/0xf8) from [<8028e438>] (debug_dma_map_sg+0xf4/0x188)
      [<8028e438>] (debug_dma_map_sg+0xf4/0x188) from [<803968d0>] (prepare_data_dma+0xb8/0x1a8)
      [<803968d0>] (prepare_data_dma+0xb8/0x1a8) from [<80397b20>] (gpmi_send_data+0x84/0xfc)
      [<80397b20>] (gpmi_send_data+0x84/0xfc) from [<8038c2b4>] (nand_onfi_set_features+0x50/0x74)
      [<8038c2b4>] (nand_onfi_set_features+0x50/0x74) from [<80397198>] (gpmi_extra_init+0x90/0x170)
      [<80397198>] (gpmi_extra_init+0x90/0x170) from [<8039520c>] (gpmi_nand_probe+0x2f8/0xb3c)
      [<8039520c>] (gpmi_nand_probe+0x2f8/0xb3c) from [<8031b974>] (platform_drv_probe+0x18/0x1c)
      ----------------------------------------------------------
      
      The patch uses the kzalloc to allocate the buffer, and free it when
      we do not use it anymore.
      Signed-off-by: NHuang Shijie <b32955@freescale.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      df877fb3
    • F
      mtd: gpmi-lib: Make checkpatch happy · 76c930be
      Fabio Estevam 提交于
      Fix the following checkpatch warnings:
      
      WARNING: line over 80 characters
      #268: FILE: mtd/nand/gpmi-nand/gpmi-lib.c:268:
      +	* consecutive reboots. The latter case has not been seen on the MX23 yet,
      
      WARNING: space prohibited before semicolon
      #356: FILE: mtd/nand/gpmi-nand/gpmi-lib.c:356:
      +		(target.tRHOH_in_ns >= 0) ;
      
      WARNING: space prohibited before semicolon
      #1006: FILE: mtd/nand/gpmi-nand/gpmi-lib.c:1006:
      +		BF_GPMI_TIMING0_DATA_SETUP(hw.data_setup_in_cycles)       ;
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Acked-by: NHuang Shijie <b32955@freescale.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      76c930be
  2. 07 11月, 2013 2 次提交
  3. 04 2月, 2013 2 次提交
  4. 13 12月, 2012 1 次提交
  5. 15 11月, 2012 1 次提交
  6. 29 9月, 2012 8 次提交
  7. 14 5月, 2012 3 次提交
  8. 27 3月, 2012 2 次提交
    • H
      mtd: gpmi: fix the wrong DMA command. · 09ef90d9
      Huang Shijie 提交于
      The last DMA command of ECC read page is used to disable the BCH module.
      But the original code missed to set the pio[2] which is used to set the
      GPMI_HW_GPMI_ECCCTRL register. fix it now.
      Signed-off-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>
      09ef90d9
    • H
      mxs-dma : rewrite the last parameter of mxs_dma_prep_slave_sg() · 921de864
      Huang Shijie 提交于
      [1] Background :
          The GPMI does ECC read page operation with a DMA chain consist of three DMA
          Command Structures. The middle one of the chain is used to enable the BCH,
          and read out the NAND page.
      
          The WAIT4END(wait for command end) is a comunication signal between
          the GPMI and MXS-DMA.
      
      [2] The current DMA code sets the WAIT4END bit at the last one, such as:
      
          +-----+               +-----+                      +-----+
          | cmd | ------------> | cmd | ------------------>  | cmd |
          +-----+               +-----+                      +-----+
                                                                ^
                                                                |
                                                                |
                                                           set WAIT4END here
      
          This chain works fine in the mx23/mx28.
      
      [3] But in the new GPMI version (used in MX50/MX60), the WAIT4END bit should
          be set not only at the last DMA Command Structure,
          but also at the middle one, such as:
      
          +-----+               +-----+                      +-----+
          | cmd | ------------> | cmd | ------------------>  | cmd |
          +-----+               +-----+                      +-----+
                                   ^                            ^
                                   |                            |
                                   |                            |
                              set WAIT4END here too        set WAIT4END here
      
          If we do not set WAIT4END, the BCH maybe stalls in "ECC reading page" state.
          In the next ECC write page operation, a DMA-timeout occurs.
          This has been catched in the MX6Q board.
      
      [4] In order to fix the bug, rewrite the last parameter of mxs_dma_prep_slave_sg(),
          and use the dma_ctrl_flags:
          ---------------------------------------------------------
            DMA_PREP_INTERRUPT : append a new DMA Command Structrue.
            DMA_CTRL_ACK       : set the WAIT4END bit for this DMA Command Structure.
          ---------------------------------------------------------
      
      [5] changes to the relative drivers:
          <1> For mxs-mmc driver, just use the new flags, do not change any logic.
          <2> For gpmi-nand driver, and use the new flags to set the DMA
              chain, especially for ecc read page.
      Acked-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NHuang Shijie <b32955@freescale.com>
      Acked-by: NVinod Koul <vinod.koul@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      921de864
  9. 21 3月, 2012 1 次提交
  10. 11 1月, 2012 1 次提交
  11. 28 12月, 2011 1 次提交
  12. 24 12月, 2011 1 次提交
  13. 11 9月, 2011 1 次提交