diff --git a/bsp/at91sam9260/applications/application.c b/bsp/at91sam9260/applications/application.c index cbb1899ad0..5800ba53d2 100644 --- a/bsp/at91sam9260/applications/application.c +++ b/bsp/at91sam9260/applications/application.c @@ -73,9 +73,6 @@ int main(void) #endif #ifdef RT_USING_SDIO - rt_mmcsd_core_init(); - rt_mmcsd_blk_init(); - at91_mci_init(); timeout = 0; while ((rt_device_find("sd0") == RT_NULL) && (timeout++ < RT_TICK_PER_SECOND*2)) { diff --git a/bsp/at91sam9260/drivers/at91_mci.c b/bsp/at91sam9260/drivers/at91_mci.c index fdfdcf459c..25d408810c 100644 --- a/bsp/at91sam9260/drivers/at91_mci.c +++ b/bsp/at91sam9260/drivers/at91_mci.c @@ -834,7 +834,7 @@ static void mci_gpio_init() #endif } -rt_int32_t at91_mci_init(void) +int at91_mci_init(void) { struct rt_mmcsd_host *host; struct at91_mci *mci; @@ -903,6 +903,7 @@ err: return -RT_ENOMEM; } +INIT_DEVICE_EXPORT(at91_mci_init); #include "finsh.h" FINSH_FUNCTION_EXPORT(at91_mci_init, at91sam9260 sd init); diff --git a/bsp/at91sam9260/drivers/at91_mci.h b/bsp/at91sam9260/drivers/at91_mci.h index 2591f20c98..4e3bae9999 100644 --- a/bsp/at91sam9260/drivers/at91_mci.h +++ b/bsp/at91sam9260/drivers/at91_mci.h @@ -119,6 +119,6 @@ #define AT91_MCI_IDR 0x48 /* Interrupt Disable Register */ #define AT91_MCI_IMR 0x4c /* Interrupt Mask Register */ -extern rt_int32_t at91_mci_init(void); +extern int at91_mci_init(void); #endif