Skip to content

uSDHC Hotplugging #180

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

uSDHC Hotplugging #180

wants to merge 5 commits into from

Conversation

midnightveil
Copy link
Contributor

@midnightveil midnightveil commented Jul 31, 2024

  • Virtualiser reading the MBR and assigning partitions with a static partition index <-> client index mapping is split out into a separate virtualiser policy interface, implemented by mbr.c (& virt.h)
  • Added a hotplugging example that plays a "game" with a "safe" ejection state (see its README)
  • Split out blk_storage_info_t to a storage_info.h header with some helper functions
  • New interclient hotplug interface (sddf/hotplug/clients.h) and driver control interface (sddf/hotplug/control.h)
  • uSDHC driver polls GPIO pins for card detection

To-Do:

  • Design document (in progress) added to design doc
  • use gpio driver when it exists
  • integration with sdfgen tooling

@midnightveil midnightveil force-pushed the sdhc-hotplugging branch 4 times, most recently from b0988d2 to ece0f35 Compare August 2, 2024 05:04
@midnightveil midnightveil force-pushed the sdhc-hotplugging branch 2 times, most recently from fc6aa1f to aa77130 Compare August 2, 2024 07:17
Base automatically changed from sdhc-driver to main August 7, 2024 05:31
@midnightveil midnightveil force-pushed the sdhc-hotplugging branch 2 times, most recently from 7437ef4 to e1f81df Compare August 7, 2024 07:29
@midnightveil midnightveil changed the base branch from main to julia/mmc-usdhc-reliability August 9, 2024 03:33
@midnightveil midnightveil force-pushed the julia/mmc-usdhc-reliability branch from 9c86851 to 87fec26 Compare August 9, 2024 03:46
@midnightveil midnightveil force-pushed the sdhc-hotplugging branch 3 times, most recently from 91422e4 to befc924 Compare August 12, 2024 02:59
@midnightveil midnightveil force-pushed the julia/mmc-usdhc-reliability branch from 87fec26 to 5e0650c Compare August 12, 2024 09:57
@midnightveil midnightveil force-pushed the sdhc-hotplugging branch 2 times, most recently from 63eb458 to 1bbf0ce Compare August 14, 2024 03:29
@midnightveil midnightveil force-pushed the julia/mmc-usdhc-reliability branch 2 times, most recently from 6de03a8 to 69d1d63 Compare August 14, 2024 03:58
@midnightveil midnightveil force-pushed the julia/mmc-usdhc-reliability branch from 69d1d63 to 8f9e561 Compare August 14, 2024 04:08
@midnightveil midnightveil force-pushed the sdhc-hotplugging branch 2 times, most recently from f36ca2e to 775969b Compare August 23, 2024 06:59
@midnightveil midnightveil force-pushed the sdhc-hotplugging branch 4 times, most recently from bdcfa39 to 771b939 Compare September 5, 2024 01:58
@midnightveil midnightveil force-pushed the sdhc-hotplugging branch 2 times, most recently from e618d03 to bf29a2a Compare September 13, 2024 03:45
@midnightveil
Copy link
Contributor Author

Realised that I probably should port the other users of the block queues to send & receive the storage info ready channel?

At least, the drivers -- clients can busy poll if they don't care about the notification, but the virtualiser relies on the notifications now (and would also invoke null caps to notify the clients but that's a no-op)

@midnightveil midnightveil force-pushed the sdhc-hotplugging branch 3 times, most recently from d03393f to 1e4dd96 Compare October 28, 2024 06:07
@midnightveil
Copy link
Contributor Author

midnightveil commented Mar 7, 2025

Old code is https://github.com/au-ts/sddf/tree/sdhc-hotplugging-pre-sdfgen, in case the rebase broke anything. Should be deleted before merging.

I've rebased this on recent sddf changes, though sdfgen needs updates because of the extra channels.

@midnightveil midnightveil force-pushed the sdhc-hotplugging branch 5 times, most recently from 0847824 to 6f88363 Compare March 12, 2025 01:36
This should be replaced by a proper GPIO driver.

Signed-off-by: julia <[email protected]>
- Makes the driver able to go from ready->idle and idle->ready
- Makes the virt able to do the same
- Also adds a very basic GPIO driver with polling, this should be replaced
  with a proper GPIO driver. This is to test card hotplugging.
This allows clients to request for the device to be inserted or ejected.

Signed-off-by: julia <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants