drivers/sdcard_spi: remove auto-init#14476
Conversation
benpicco
left a comment
There was a problem hiding this comment.
Looks good to me.
The SD card will get initialized by mtd_sdcard_init() already, there is no reason for SD card to be more special than mtd_spi_nor or at24cxxx, at25xxx
I was going to implement an |
|
|
|
Ok, we have a board that needs to read something from an So what would help us IMO is an Second, I think it would be nice if the MTD e.g. How do you think about this? |
|
I understand your intention. However I think it is unrelated to this PR and also not in conflict. This contribution was made to remove auto-init for SD cards which are removable storage devices and IMHO a totally different case than a soldered EEPROM (which probably is even used without file system). When writing this I saw it as undesirable that the removal of a storage device would keep the application from booting into the user code. I still see this case as the desired solution. At the time of writing, the auto-init was tangled with the module and could not be used without. As the SD card was the single use case of the storage auto-init, I decided to completely remove it. I would generally agree with Ben that any storage device with a file system should be handled through the MTD layer. Maybe this is not the right place for discussing this matter but rather #11871 and related as mentioned above. |
Contribution description
This contribution removes the auto-init functionality from the sdcard_spi module for the following reasons:
Testing procedure
The changes have been tested with the following tests and examples:
examples/filesystem: works, tested with sdcard and fatfs / littlefstests/drivers_sdcard_spi: workstests/pkg_fatfs: workstests/pkg_fatfs_vfs: generally works, some tests unrelated to this PR failIssues/PRs references
None.