Thread (9 messages) 9 messages, 4 authors, 2021-12-25
STALE1632d
Revisions (14)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 current
  4. v4 [diff vs current]
  5. v5 [diff vs current]
  6. v6 [diff vs current]
  7. v7 [diff vs current]
  8. v8 [diff vs current]
  9. v9 [diff vs current]
  10. v10 [diff vs current]
  11. v11 [diff vs current]
  12. v12 [diff vs current]
  13. v13 [diff vs current]
  14. v14 [diff vs current]

[PATCH v3 0/3] mmc: Add LiteSDCard mmc driver

From: Gabriel Somlo <gsomlo@gmail.com>
Date: 2021-12-08 13:20:56
Also in: linux-mmc, lkml

Add support for the LiteX SD-Card device, LiteSDCard.

LiteSDCard is a simple SD-Card interface available as part of the LiteX
environment, used with various RISC-V and other FPGA based SoCs.

New in v3:

  MAINTAINERS:

  - picked up acked-by Joel
  - added listing for liteeth driver
  - added Joel as additional co-maintainer (thanks!)

  Doc/dt/bindings/mmc/litex,mmc.yaml:

  - picked up r/b Geert Uytterhoeven [off-list ref] in DT
    bindings document (please let me know if that was premature, and
    happy to take further review if needed :)
  - add dedicated DT property for source clock frequency

  drivers/mmc/host/litex_mmc.c:

  - fixed function signature (no line split), and naming (litex_mmc_*)
  - more informative MODULE_AUTHOR() entries
    - also added matching "Copyright" entries in file header
  - fixed description in Kconfig
  - fixed DT documentation
  - removed magic constants
  - removed litex_map_status(), have sdcard_wait_done() return *real*
    error codes directly instead.
  - streamlined litex_mmc_reponse_len()
  - call litex_mmc_set_bus_width() only once, and ensure it returns
    correct error code(s)
  - use readx_poll_timeout() -- more concise -- instead of
    read_poll_timeout()
  - use dev_err() in litex_mmc_send_cmd() (instead of pr_err())
  - litex_mmc_setclk() will update host->clock before returning
  - separate irq initialization into its own function,
    litex_mmc_irq_init()
  - document rationale for f_min, f_max
  - use dmam_alloc_coherent(), which simplifies cleanup significantly
  - large `if (data) { ... }` block in litex_mmc_request() left as-is,
    there are too many variables shared with the rest of the parent
    function body to easily separate (e.g., `len`, `transfer`, `direct`).
    If this is indeed a blocker, I can take another shot at refactoring
    it in a future revision!
  - bump dma_set_mask_and_coherent() to 64-bits on suitable
    architectures
  - clock source picked up from dedicated DT clock reference property
  - remove gpio card-detect logic (needs testing and a dt binding
    example before being eligible for upstream inclusion)
New in v2:
  - reword info message in litex_set_clk()
  - streamline code in litex_map_status()
  - fix typos in Kconfig (thanks Randy Dunlap [off-list ref])
  - improvements suggested by Stafford Horne [off-list ref]
    - allow COMPILE_TEST in Kconfig
    - use read_poll_timeout() when waiting for cmd/data/DMA
      xfer completion
  - include interrupt.h (thanks kernel test robot [off-list ref])
Gabriel Somlo (3):
  MAINTAINERS: co-maintain LiteX platform
  dt-bindings: mmc: Add bindings for LiteSDCard
  mmc: Add driver for LiteX's LiteSDCard interface

 .../devicetree/bindings/mmc/litex,mmc.yaml    |  72 ++
 MAINTAINERS                                   |   9 +-
 drivers/mmc/host/Kconfig                      |   9 +
 drivers/mmc/host/Makefile                     |   1 +
 drivers/mmc/host/litex_mmc.c                  | 644 ++++++++++++++++++
 5 files changed, 733 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mmc/litex,mmc.yaml
 create mode 100644 drivers/mmc/host/litex_mmc.c

-- 
2.31.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help