mmc: Add LiteSDCard mmc driver
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v14 Latest3 patches 3 repliesIn review
- v133 patches 2 repliesSuperseded
- v123 patches 0 repliesSuperseded
Earlier versions · 11
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v11 | 3 patches | 5 replies | Superseded | |
| v10 | 3 patches | 2 replies | Superseded | |
| v9 | 3 patches | 5 replies | Superseded | |
| v8 | 3 patches | 8 replies | Superseded | |
| v7 | 3 patches | 9 replies | Superseded | |
| v6 | 3 patches | 10 replies | Superseded | |
| v5 | 3 patches | 14 replies | Superseded | |
| v4 | 3 patches | 5 replies | Superseded | |
| v3 | 3 patches | 5 replies | Superseded | |
| v2 | 3 patches | 19 replies | Superseded | |
| v1 | 3 patches | 16 replies | Superseded |
Patches in v14 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | MAINTAINERS: co-maintain LiteX platformMAINTAINERS | +7 | 0 replies | |
| 2/3 | dt-bindings: mmc: Add bindings for LiteSDCardDocumentation/ | +78 | 0 replies | |
| 3/3 | mmc: Add driver for LiteX's LiteSDCard interfacedrivers/ drivers/ drivers/ | +675 | 0 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Joel Stanley | Mateusz Holenko | Geert Uytterhoeven | Rob Herring | Andy Shevchenko |
|---|---|---|---|---|---|
| 1/3 | A-b | A-b | |||
| 2/3 | R-b | R-b | R-b | ||
| 3/3 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.
Cover letter [PATCH v14 0/3] mmc: Add LiteSDCard mmc driver
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 v14:Documentation/devicetree/bindings/mmc/litex,mmc.yaml:
- add missing vmmc-supply = ... property to example section
Quoted 171 lines
New in v13:
Documentation/devicetree/bindings/mmc/litex,mmc.yaml:
- addvmmc-supplyrequirementdrivers/mmc/host/Kconfig:
- add dependency on REGULATOR,REGULATOR_FIXED_VOLTAGEdrivers/mmc/host/litex_mmc.c:
- usemmc_regulator_get_supply(), with fallback to hardcoded 3.3VQuoted 163 lines
New in v12:
drivers/mmc/host/Kconfig:
- add dependency onHAVE_CLKforlitex_mmcdriver
- (re)add "If unsure, say N" to thelitex_mmcdriver help messagedrivers/mmc/host/litex_mmc.c:
- prints message usingdev_info()before returning success fromprobe()Quoted 156 lines
New in v11:
- picked up r/b from Andydrivers/mmc/host/litex_mmc.c:
- defensive coding oflitex_mmc_interrupt()return logic
- removedevmember ofstruct litex_mmc_host, only used during probeQuoted 150 lines
New in v10:
drivers/mmc/host/litex_mmc.c:
- grouplinux/mmc/*includes by themselves
- clean-up ofreturnstyle (multiple locations throughout source)
- createmmc_free_host()wrapper for use withdevm_add_action_or_reset()
- useGFP_KERNELwithdmam_alloc_coherent()Quoted 142 lines
New in v9:
drivers/mmc/host/Kconfig:
- fix OF dependencydrivers/mmc/host/litex_mmc.c:
- removelinux/of.hinclude, no longer needed since droppingof_match_ptr()
- addlinux/mod_devicetable.hinclude
- usedevm_action_or_reset()to devm-ifymmc_alloc_host(), and obviate the need to callmmc_free_host()explicitly during eitherprobe()error path or duringremove()Quoted 131 lines
New in v8:
commit blurbs:
- cosmetic editing of descriptions
- removedCc:linesdrivers/mmc/host/litex_mmc.c:
- fix file header comment (for real, this time)
- add explicitbits.hinclude
- removeof_match_ptr()wrapper from around .of_match_table argument
- fix devm ordering issues: usedevm_request_irq(), which precludes the need to callfree_irq()onprobe()error path or fromremove()Quoted 120 lines
New in v7:
drivers/mmc/host/Kconfig:
- added module name in LiteSDCardKconfigentry
drivers/mmc/host/litex_mmc.c:
- fixed comment formatting, ordering, and capitalization throughout the entire file
- sorted header #include statements
- removed redundant parantheses inreadx_poll_timeout()condition
- explicit handling ofreadx_poll_timeout()timeout scenarios
-dev_err()used inlitex_mmc_sdcard_wait_done()
- usememcpy_fromio()to grab command response
- no need to apply0xffffmask to a 32-bit value right-shifted by 16 (host->resp[3])
- useclamp()instead of min(max(...)...)
- reworkedplatform_get_irq_optional()error handling logic
- no need to explicitly zerohost->irq,kzalloc()does that already
- added missingfree_irq()inlitex_mmc_probe()error path
- reordered calls insidelitex_mmc_remove()(callingmmc_free_host()beforefree_irq()Quoted 98 lines
New in v6:
drivers/mmc/host/litex_mmc.c:
- fix handling of deferred probe vs.platform_get_irq_optional()
- don't #ifdefdma_set_mask_and_coherent(), since it automatically does the right thing on both 32- and 64-bit DMA capable arches
- removeMMC_CAP2_FULL_PWR_CYCLE, addMMC_CAP2_NO_MMCto list of hardcoded capabilities duringlitex_mmc_probe()
- hardcodemmc->ocr_availto the full 2.7-3.6V range allowed by the SDCard spec (the LiteSDCard device doesn't accept software configuration)Quoted 86 lines
New in v5:
MAINTAINERS:- picked up a/b Mateusz
Doc/dt/bindings/mmc/litex,mmc.yaml:- picked up r/b Rob, Joel
drivers/mmc/host/litex_mmc.c:- shorten #define constant names (cosmetic, make them less unwieldy)
- picked up r/b JoelQuoted 71 lines
New in v4:
Doc/dt/bindings/mmc/litex,mmc.yaml:- fixed
dt_binding_checkerrors uncovered by Rob's script
drivers/mmc/host/litex_mmc.c:- struct
litex_mmc_hostfields re-ordered so thatpaholereports no holes in either 32- or 64-bit builds
-litex_mmc_set_bus_width()now encapsulates check forhost->is_bus_width_set
-litex_mmc_request()- factor out dma data setup into separate helper function:litex_mmc_do_dma()Quoted 56 lines
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 <[email protected]> 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 informativeMODULE_AUTHOR()entries
- also added matching "Copyright" entries in file header
- fixed description inKconfig
- fixed DT documentation
- removed magic constants
- removedlitex_map_status(), havesdcard_wait_done()return *real* error codes directly instead.
- streamlinedlitex_mmc_reponse_len()
- calllitex_mmc_set_bus_width()only once, and ensure it returns correct error code(s)
- usereadx_poll_timeout()-- more concise -- instead ofread_poll_timeout()
- usedev_err()inlitex_mmc_send_cmd()(instead ofpr_err())
-litex_mmc_setclk()will updatehost->clockbefore returning
- separate irq initialization into its own function,litex_mmc_irq_init()
- document rationale forf_min,f_max
- usedmam_alloc_coherent(), which simplifies cleanup significantly
- largeif (data) { ... }block inlitex_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!
- bumpdma_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)Quoted 9 lines
New in v2:
- reword info message inlitex_set_clk()
- streamline code inlitex_map_status()
- fix typos inKconfig(thanks Randy Dunlap <[email protected]>)
- improvements suggested by Stafford Horne <[email protected]>
- allowCOMPILE_TESTinKconfig
- useread_poll_timeout()when waiting for cmd/data/DMA xfer completion
- includeinterrupt.h(thanks kernel test robot <[email protected]>)
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 | 78 +++ MAINTAINERS | 9 +- drivers/mmc/host/Kconfig | 13 + drivers/mmc/host/Makefile | 1 + drivers/mmc/host/litex_mmc.c | 661 ++++++++++++++++++ 5 files changed, 760 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/mmc/litex,mmc.yaml create mode 100644 drivers/mmc/host/litex_mmc.c
Signature · 1 line
2.31.1