[U-Boot] U-boot Driver Model - MMC - missing uclass implementation?
Philipp Rossak
embed3d at gmail.com
Fri Sep 23 17:30:58 CEST 2016
Hi,
I would like to develop an mmc driver for the STM32 boards with the new
driver model.
I already built up the basic structure and I discovered some strange
behaviour compared to net or serial drivers:
When I place only the following statement in the driver .c file:
U_BOOT_DRIVER(sdhci_stm32) = {
.name = "stm32_sdhci",
.id = UCLASS_MMC,
.ops = &stm32_mmc_ops,
.probe = stm32_mmc_probe,
...
};
I receive the following Message when i perform the "dm uclass" command in
u-boot:
Cannot find uclass for id 31: please add the UCLASS_DRIVER() declaration
for this UCLASS_... id
But when I had a look at the sources, i found some UCLASS_DRIVER()
declaration in drivers/mmc/mmc-uclass.c for the mmc driver.
The driver is copied from the sandbox_mmc driver. I only renamed the
functions and added some debug messages.
When i add this statement to my driver:
UCLASS_DRIVER(sdhci_stm32) = {
.name = "stm32_sdhci",
.id = UCLASS_MMC,
};
And I perform the dm uclass command in u-boot i receive the following:
uclass 31: stm32_sdhci
Do you have any idea what i'm doing wrong / what i missed?
Is there maybe some UCLASS implementation missing or not linked?
Best,
Philipp
More information about the U-Boot
mailing list