Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-dm
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • linux-arm
  • linux-dm
  • Repository
  • linux-dm
  • drivers
  • mmc
  • host
  • tmio_mmc_core.c
Find file BlameHistoryPermalink
  • Masahiro Yamada's avatar
    mmc: tmio: simplify the DMA mode test · d3dd5db0
    Masahiro Yamada authored Oct 13, 2018
    host->chan_{rx,tx} represents the DMA capability of the platform.
    Even if DMA is supported, there are cases where we want to use PIO,
    for example, data length is short enough as commit 5f52c355
    
    
    ("mmc: tmio: use PIO for short transfers") mentioned.
    
    Regarding the hardware control flow, we are interested in whether DMA
    is currently enabled or not, instead of whether the platform has the
    DMA capability.
    
    Hence, the several conditionals in tmio_mmc_core.c end up with
    checking host->chan_{rx,tx} and !host->force_pio. This is not nice.
    
    Let's flip the flag host->force_pio into host->dma_on.
    
    host->dma_on represents whether the DMA is currently enabled or not.
    This flag is set false in the beginning of each command, then should
    be set true by tmio_mmc_start_dma() when the DMA is turned on.
    
    Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
    Reviewed-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
    Tested-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    d3dd5db0