Page MenuHomeFreeBSD

mmc: implement mmc-pwrseq
Needs ReviewPublic

Authored by bz on Oct 19 2020, 9:37 PM.

Details

Summary

Implement a rudimentary mmc-pwrseq module which allows us to call
things on mmc power_off/up/on.

Implement a sample calling procedure for the one case where I am
expecting to need it: dwmmc/mmccam.

There's a couple of things to sort out still:

  • Locking the pwrseq tailq if it stay this way.
  • I am still unsure if we can make this a bus and link this up properly with a consumer which is probed rather than doing this on OF nodes. Help and suggestions welcome.
  • Given we use fdt_helpers we need to hook this into drivers and not common code. This, at least for mmccam, brings another challenge as the "simple" consumer working on the rk808 clock gets called with non-sleepable locks but rk808 uses i2c and locks can sleep.
  • Cleanup of fdt_helpers amongst various consumers is a bit .. to be improved. Start drawing up a mmc_fdt_free() function, which will do parts of the job in the future, so other drivers (aw_mmc.c, bcm2835_sdhci.c, ???) may need fixing as well.

I am putting this up so we can work this out.

Also add 'cap-sdio-irq' which (like its counterparts) is not used
yet and should probably be committed on its own.

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 34268
Build 31411: arc lint + arc unit