Browse Source

[BSP][AT91SAM9260] update sdio drivers.

weety 7 years ago
parent
commit
222edd25c0

+ 0 - 3
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))
 	{

+ 2 - 1
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);

+ 1 - 1
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