Hi Marek, On Sun, 3 Dec 2023 at 14:01, Marek Vasut <marek.va...@mailbox.org> wrote: > > On 12/3/23 18:44, Simon Glass wrote: > > Hi Marek, > > > > On Sat, 2 Dec 2023 at 16:41, Marek Vasut > > <marek.vasut+rene...@mailbox.org> wrote: > >> > >> In case the cyclic framework is enabled, poll the card detect of already > >> initialized cards and deinitialize them in case they are removed. Since > >> the card initialization is a longer process and card initialization is > >> done on first access to an uninitialized card anyway, avoid initializing > >> newly detected uninitialized cards in the cyclic callback. > >> > >> Signed-off-by: Marek Vasut <marek.vasut+rene...@mailbox.org> > >> --- > >> Cc: Jaehoon Chung <jh80.ch...@samsung.com> > >> Cc: Peng Fan <peng....@nxp.com> > >> --- > >> drivers/mmc/mmc-uclass.c | 27 +++++++++++++++++++++++++++ > >> 1 file changed, 27 insertions(+) > > > > This is really nice! > > I wonder whether we can use this cyclic stuff for USB , that's on my > roadmap to look at . We could auto-detect new devices in the background, > which would be tidy. And maybe do block transfers in the background ?
Just the detect would be amazing!! One thing on my mind is that we could have a console buffer, so that output from background tasks can be collected and written just before displaying the U-Boot prompt. I am itching to implement that part of it :-) > > > Is there a remove() method where we could unregister the cyclic? > > I guess I need to move this into mmc_init/mmc_deinit . Yes, I suppose so. Regards, Simon