-
Notifications
You must be signed in to change notification settings - Fork 3k
Initial revision of the SDIO Design document #11847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Mahesh Mahadevan <[email protected]>
@mmahadevan108, thank you for your changes. |
I lightly compared this design document to the QSPI one in the main branch. I figured this would be comparable as the use cases and hardware features would be similar. The first issue I noticed is that there is no provision for a implementation defined SDIO structure that would hold data like hardware instance base address. Some boards have multiple SD controllers. If a structure is not used, you would be only able to use one of them. The second issue I noticed in the design document is that unlike the QSPI init function (or most of the HAL functions for the peripherals) there is no possibility of specifying the pins. Again, I’m ignorant here, but it seems like it is possible that some vendors might mux these pins out to potentially multiple places. I have found at least one board which has this capability. Alternatively, you could define a structure for the pins and other features that are important instead of calling several different functions and pass that to the init function. This may be for a future commit, but it seems like there also should be a few more public functions, such as a frequency selection, a mode selection (1-bit/4-bit SD or MMC, 8-bit MMC), and possibly PinMap functions. Finally, there are a few manufacturers that make SDIO based WiFi modules (such as Murata and Laird). Would this api be usable for both storage and these modules using SDIO? |
above comments from @pea-pod make sense. In case we only target SDcard and not SDIO connected WIFI modules, then we should make it clear or maybe name the driver accordingly (SDcard rater than SDIO). |
@mmahadevan108 it looks like you have removed sections from the template header or are using an out of date one. Could you please update to the latest one going forward and fill in all relevant sections. This really helps us to better understand the changes and their impact. |
@bulislaw could you review please. |
@LMESTM @jeromecoutant @ARMmbed/team-cypress do you guys have any comments? Or are you ok with this first draft being merged to the feature branch? |
I have similar concerns as expressed above. Additionally, there should be a sdio_free() function added to de-initialize the driver. |
Thanks @pea-pod for the review. @mmahadevan108 Can you review? As this is for the future branch, there can be made subsequent updatess to address the reviews (if not simple to do right away here) ? |
How can we progress here? I'll talk to @maclobdell |
This may not be what you are specifically asking for, but in any case, here are my two cents on the matter. If I had my druthers, I would prefer something similar to this:
Since whomever consumes this (i.e. not the programmer, but the actual purchaser) would not really care if an SD or MMC device was installed, I think implementing the Furthermore, if the initial requirement for the SDMMC interface is memory cards (which I do believe is reasonable), I would prefer that it be designed and specified in such a way as to do as much to implement the SDIO specific functionality, or at least not preclude it. The hal itself would contain the pin locations etc., handle bring up and teardown, etc. Finally, whatever does get implemented should have the DMA capabilities implemented out of the box (if there is any other way, for that matter). There's barely a benefit of speed going from SPI to SDMMC without including the DMA functionality. |
@maclobdell What shall we do with this one ? shall we park it (close it) and get back to it with an update? |
This pull request has automatically been marked as stale because it has had no recent activity. @mmahadevan108, please carry out any necessary work to get the changes merged. Thank you for your contributions. |
I'll close this PR. It is marked with feature: hal to track this PR separately. |
Description (required)
Initial revision of the SDIO design document
Pull request type (required)
Test results (required)