1. 17 8月, 2015 4 次提交
    • J
      mmc: dw_mmc: fix the wrong condition checking · 9e747b7e
      Jaehoon Chung 提交于
      When num-slots is lower than 1, it's right that should be returned -ENODEV.
      Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com>
      9e747b7e
    • H
      mmc: dw_mmc: fix pio mode when internal dmac is enabled · 575c319d
      Heiko Stuebner 提交于
      The dw_mci_init_dma() may decide to not use dma, but pio instead, caused
      by things like wrong dma settings in the system.
      
      Till now the code dw_mci_init_slot() always assumed that dma is available
      when CONFIG_MMC_DW_IDMAC was defined, ignoring the host->use_dma var
      set during dma init.
      
      So when now the dma init failed for whatever reason, the transfer sizes
      would still be set for dma transfers, especially including the maximum
      block-count calculated from host->ring_size and resulting in a
      
      [    4.991109] ------------[ cut here ]------------
      [    4.991111] kernel BUG at drivers/mmc/core/core.c:256!
      [    4.991113] Internal error: Oops - BUG: 0 [#1] SMP ARM
      
      because host->ring_size is 0 in this case and the slot init code uses
      the wrong code to calculate the values.
      
      Fix this by selecting the correct calculations using the host->use_dma
      variable instead of the CONFIG_MMC_DW_IDMAC config option.
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com>
      575c319d
    • S
      mmc: dw_mmc: Fix coding style issues · 0e3a22c0
      Shawn Lin 提交于
      This patch fixes the following issues reported by checkpatch.pl:
      - use -EINVAL instead of -ENOSYS, to fix warning message:
         "ENOSYS means 'invalid syscall nr' and nothing else"
      - split lines whose length is greater than 80 characters
      - avoid quoted string split across lines
      - use min_t instead of min, to fix warning message:
         "min() should probably be min_t(int, cnt, host->part_buf_count)"
      - fix missing a blank line after declarations
      Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com>
      Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com>
      0e3a22c0
    • A
      mmc: dw_mmc: handle data blocks > than 4kB if IDMAC is used · 5959b32e
      Alexey Brodkin 提交于
      As per DW MobileStorage databook "each descriptor can transfer up to 4kB
      of data in chained mode", moreover buffer size that is put in "des1" is
      limited to 13 bits, i.e. for example on attempt to
      IDMAC_SET_BUFFER1_SIZE(desc, 8192) size value that's effectively written
      will be 0.
      
      On the platform with 8kB PAGE_SIZE I see dw_mmc gets data blocks in
      SG-list of 8kB size and that leads to unpredictable behavior of the
      SD/MMC controller.
      
      In particular on write to FAT partition of SD-card the controller will
      stuck in the middle of DMA transaction.
      
      Solution to the problem is simple - we need to pass large (> 4kB) data
      buffers to the controller via multiple descriptors. And that's what
      that change does.
      
      What's interesting I did try original driver on same platform but
      configured with 4kB PAGE_SIZE and may confirm that data blocks passed
      in SG-list to dw_mmc never exeed 4kB limit - that explains why nobody
      ever faced a problem I did.
      Signed-off-by: NAlexey Brodkin <abrodkin@synopsys.com>
      Cc: Seungwon Jeon <tgih.jun@samsung.com>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      Cc: Ulf Hansson <ulf.hansson@linaro.org>
      Cc: arc-linux-dev@synopsys.com
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com>
      5959b32e
  2. 12 6月, 2015 1 次提交
  3. 01 6月, 2015 2 次提交
  4. 08 5月, 2015 2 次提交
  5. 09 4月, 2015 5 次提交
  6. 31 3月, 2015 3 次提交
  7. 23 3月, 2015 8 次提交
  8. 19 1月, 2015 6 次提交
  9. 26 11月, 2014 3 次提交
  10. 10 11月, 2014 3 次提交
  11. 23 9月, 2014 1 次提交
  12. 19 9月, 2014 1 次提交
  13. 09 9月, 2014 1 次提交