linguini1 commented on issue #16948:
URL: https://github.com/apache/nuttx/issues/16948#issuecomment-3319743232

   > @linguini1 I think cxd56_sdhci.c, kinetis_sdhc.c, sam_sdmmc.c and 
imx9_usdhc.c are basically SDHCI compatible controllers. Probably sam_sdmmc.c 
was implemented first because Mr. Greg had a contract with Atmel to add support 
to their chips (before Microchip acquired them and extinguish the contract).
   
   > I think having a common compatible driver is a good idea, but the 
implementation should be a little bit challenging because the differences. But 
there are already drivers that implement similar standard interfaces, i.e. 
drivers/serial/uart_16550.c, drivers/serial/uart_pl011.c, etc.
   
   I don't actually like at least the PL011 implementation. It's not very 
extendable and actually won't work for the RPI UARTs because it has so many and 
they share an IRQ. I will be making a PR to modify it when I get back to UART 
support. I can see from that why standard drivers are challenging.
   
   > The EHCI controller also could be a standard driver, recently I had to 
modify the imxrt EHCI driver to support two controllers because the orignal 
driver wasn't prepared to it. So, this kind of thing could be implemented in 
the original driver.
   
   That would be good! At least some helpers for the controllers would be a big 
time saver anyways. For instance, mapping SDHCI events to the SDIO event set 
from NuttX, or populating the transfer flag register from the command being 
sent.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to