diff --git a/bsp/at91sam9260/applications/application.c b/bsp/at91sam9260/applications/application.c index fa2f06377..1fd9324cd 100644 --- a/bsp/at91sam9260/applications/application.c +++ b/bsp/at91sam9260/applications/application.c @@ -138,8 +138,6 @@ void rt_init_thread_entry(void* parameter) /* register ethernetif device */ eth_system_device_init(); rt_hw_macb_init(); - /* re-init device driver */ - rt_device_init_all(); /* init lwip system */ lwip_sys_init(); } diff --git a/bsp/avr32uc3b0/startup.c b/bsp/avr32uc3b0/startup.c index 79098bd31..481ff1448 100644 --- a/bsp/avr32uc3b0/startup.c +++ b/bsp/avr32uc3b0/startup.c @@ -39,7 +39,6 @@ int main(void) #endif rt_system_scheduler_init(); - rt_device_init_all(); rt_application_init(); #ifdef RT_USING_FINSH diff --git a/bsp/bf533/startup.c b/bsp/bf533/startup.c index a3cd60dd6..b1bf9884c 100644 --- a/bsp/bf533/startup.c +++ b/bsp/bf533/startup.c @@ -62,9 +62,6 @@ void rtthread_startup(void) RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_STREAM, &uart0); - /* init all device */ - rt_device_init_all(); - rt_console_set_device("uart0"); #endif diff --git a/bsp/efm32/startup.c b/bsp/efm32/startup.c index 3e95603be..f997c6aad 100644 --- a/bsp/efm32/startup.c +++ b/bsp/efm32/startup.c @@ -114,9 +114,6 @@ void rtthread_startup(void) /* init scheduler system */ rt_system_scheduler_init(); - /* init all devices */ - rt_device_init_all(); - /* init finsh */ #ifdef RT_USING_FINSH finsh_system_init(); diff --git a/bsp/lm3s8962/applications/startup.c b/bsp/lm3s8962/applications/startup.c index a38733494..7f34aeef9 100644 --- a/bsp/lm3s8962/applications/startup.c +++ b/bsp/lm3s8962/applications/startup.c @@ -118,8 +118,6 @@ void rtthread_startup(void) /* init sd card device */ rt_hw_sdcard_init(); #endif - /* init all device */ - rt_device_init_all(); /* init application */ rt_application_init(); diff --git a/bsp/lm3s9b9x/applications/startup.c b/bsp/lm3s9b9x/applications/startup.c index 9f72d9c8d..c13e80da5 100644 --- a/bsp/lm3s9b9x/applications/startup.c +++ b/bsp/lm3s9b9x/applications/startup.c @@ -118,8 +118,6 @@ void rtthread_startup(void) /* init sd card device */ rt_hw_sdcard_init(); #endif - /* init all device */ - rt_device_init_all(); /* init application */ rt_application_init(); diff --git a/bsp/lm4f232/applications/startup.c b/bsp/lm4f232/applications/startup.c index 4572ab350..b22095f06 100644 --- a/bsp/lm4f232/applications/startup.c +++ b/bsp/lm4f232/applications/startup.c @@ -118,8 +118,6 @@ void rtthread_startup(void) /* init sd card device */ rt_hw_sdcard_init(); #endif - /* init all device */ - rt_device_init_all(); /* init application */ rt_application_init(); diff --git a/bsp/lpc176x/applications/startup.c b/bsp/lpc176x/applications/startup.c index f332155b1..9c0829456 100644 --- a/bsp/lpc176x/applications/startup.c +++ b/bsp/lpc176x/applications/startup.c @@ -16,20 +16,13 @@ #include #include -#include "LPC17xx.h" -#include "board.h" - -#ifdef RT_USING_DFS -#include "sd.h" -#endif - /** - * @addtogroup LPC17 + * @addtogroup LPC176x */ /*@{*/ - -extern int rt_application_init(void); +#include +extern int rt_application_init(void); #ifdef __CC_ARM extern int Image$$RW_IRAM1$$ZI$$Limit; @@ -84,14 +77,6 @@ void rtthread_startup(void) /* initialize scheduler system */ rt_system_scheduler_init(); -#ifdef RT_USING_DEVICE -#ifdef RT_USING_DFS - rt_hw_sdcard_init(); -#endif - /* initialize all device */ - rt_device_init_all(); -#endif - /* initialize application */ rt_application_init(); diff --git a/bsp/lpc178x/applications/application.c b/bsp/lpc178x/applications/application.c index c5ab98da3..e2086fb40 100644 --- a/bsp/lpc178x/applications/application.c +++ b/bsp/lpc178x/applications/application.c @@ -65,8 +65,6 @@ void rt_init_thread_entry(void *parameter) /* register ethernetif device */ lpc17xx_emac_hw_init(); - /* init all device */ - rt_device_init_all(); /* init lwip system */ lwip_sys_init(); @@ -78,13 +76,11 @@ void rt_init_thread_entry(void *parameter) { extern void rtgui_system_server_init(void); extern void application_init(void); - + rt_device_t lcd; /* init lcd */ rt_hw_lcd_init(); - /* re-init device driver */ - rt_device_init_all(); /* find lcd device */ lcd = rt_device_find("lcd"); diff --git a/bsp/lpc2148/applications/startup.c b/bsp/lpc2148/applications/startup.c index b0f72afd4..5efc41fd8 100644 --- a/bsp/lpc2148/applications/startup.c +++ b/bsp/lpc2148/applications/startup.c @@ -100,9 +100,6 @@ void rtthread_startup(void) /* init hardware serial device */ rt_hw_serial_init(); - - /*init all registed devices*/ - rt_device_init_all(); #endif /* init application */ diff --git a/bsp/ls1bdev/applications/application.c b/bsp/ls1bdev/applications/application.c index d010f0f22..db345a1bb 100644 --- a/bsp/ls1bdev/applications/application.c +++ b/bsp/ls1bdev/applications/application.c @@ -33,14 +33,11 @@ void rt_init_thread_entry(void *parameter) /* init Display Controller */ rt_hw_dc_init(); - - /* re-init device driver */ - rt_device_init_all(); - + /* find Display Controller device */ dc = rt_device_find("dc"); - - /* set Display Controller device as rtgui graphic driver */ + + /* set Display Controller device as rtgui graphic driver */ rtgui_graphic_set_device(dc); } #endif @@ -59,7 +56,7 @@ int rt_application_init(void) tid = rt_thread_create("init", rt_init_thread_entry, RT_NULL, 4096, 8, 20); - if (tid != RT_NULL) + if (tid != RT_NULL) rt_thread_startup(tid); return 0; diff --git a/bsp/ls1bdev/applications/startup.c b/bsp/ls1bdev/applications/startup.c index 36ec17e46..befa929d3 100644 --- a/bsp/ls1bdev/applications/startup.c +++ b/bsp/ls1bdev/applications/startup.c @@ -64,11 +64,6 @@ void rtthread_startup(void) /* init scheduler system */ rt_system_scheduler_init(); -#ifdef RT_USING_DEVICE - /* init all device */ - rt_device_init_all(); -#endif - /* init application */ rt_application_init(); @@ -85,7 +80,7 @@ void rtthread_startup(void) rt_system_scheduler_start(); /* never reach here */ - return; + return ; } /*@}*/ diff --git a/bsp/ls1bdev/ls1b_ram.lds b/bsp/ls1bdev/ls1b_ram.lds index 28a6cef00..95fb2496f 100644 --- a/bsp/ls1bdev/ls1b_ram.lds +++ b/bsp/ls1bdev/ls1b_ram.lds @@ -50,7 +50,7 @@ SECTIONS . = ALIGN(4); __rt_init_start = .; KEEP(*(SORT(.rti_fn*))) - __rt_init_end = .; + __rt_init_end = .; . = ALIGN(4); } diff --git a/bsp/m16c62p/applications/startup.c b/bsp/m16c62p/applications/startup.c index 3857b6cda..a73fcd90e 100644 --- a/bsp/m16c62p/applications/startup.c +++ b/bsp/m16c62p/applications/startup.c @@ -68,11 +68,6 @@ void rtthread_startup(void) /* init scheduler system */ rt_system_scheduler_init(); - -#ifdef RT_USING_DEVICE - /* init all device */ - rt_device_init_all(); -#endif /* init application */ rt_application_init(); diff --git a/bsp/mb9bf500r/application.c b/bsp/mb9bf500r/application.c index fe17f240c..ff22c008b 100644 --- a/bsp/mb9bf500r/application.c +++ b/bsp/mb9bf500r/application.c @@ -44,10 +44,7 @@ void rt_init_thread_entry(void *parameter) rt_hw_adc_init(); rt_hw_lcd_init(); rt_hw_cpu_init(); - - /* re-init device driver */ - rt_device_init_all(); - + #ifdef RT_USING_RTGUI extern void rtgui_system_server_init(void); diff --git a/bsp/mb9bf506r/applications/startup.c b/bsp/mb9bf506r/applications/startup.c index ab838c4fe..9076d572d 100644 --- a/bsp/mb9bf506r/applications/startup.c +++ b/bsp/mb9bf506r/applications/startup.c @@ -59,13 +59,9 @@ void rtthread_startup(void) rt_system_scheduler_init(); #ifdef RT_USING_DEVICE -#ifdef RT_USING_DFS -#ifdef RT_USING_DFS_UFFS +#if defined(RT_USING_DFS) && defined(RT_USING_DFS_UFFS) rt_hw_nand_init(); #endif -#endif - /* initialize all device */ - rt_device_init_all(); #endif /* initialize application */ @@ -91,7 +87,7 @@ int main(void) { /* disable interrupt first */ rt_hw_interrupt_disable(); - + /* startup RT-Thread RTOS */ rtthread_startup(); diff --git a/bsp/microblaze/startup.c b/bsp/microblaze/startup.c index c98098c03..fdcf5a171 100755 --- a/bsp/microblaze/startup.c +++ b/bsp/microblaze/startup.c @@ -86,8 +86,6 @@ void rtthread_startup(void) #ifdef RT_USING_DEVICE /* init hardware serial device */ rt_hw_serial_init(); - /* init all device */ - rt_device_init_all(); #endif /* init application */ diff --git a/bsp/mini2440/application.c b/bsp/mini2440/application.c index 4f911980a..fe2626a82 100644 --- a/bsp/mini2440/application.c +++ b/bsp/mini2440/application.c @@ -151,9 +151,6 @@ void rt_init_thread_entry(void *parameter) /* init keypad */ rt_hw_key_init(); - - /* re-init device driver */ - rt_device_init_all(); /* find lcd device */ lcd = rt_device_find("lcd"); @@ -175,9 +172,6 @@ void rt_init_thread_entry(void *parameter) /* register ethernetif device */ rt_hw_dm9000_init(); - /* re-init device driver */ - rt_device_init_all(); - /* init lwip system */ lwip_sys_init(); rt_kprintf("TCP/IP initialized!\n"); @@ -197,9 +191,6 @@ void rt_init_thread_entry(void *parameter) /* init keypad */ rt_hw_key_init(); - /* re-init device driver */ - rt_device_init_all(); - /* create ftk thread */ ftk_thread = rt_thread_create("ftk", rt_ftk_thread_entry, RT_NULL, diff --git a/bsp/mini2440/startup.c b/bsp/mini2440/startup.c index cf8ff261c..349d5f68f 100644 --- a/bsp/mini2440/startup.c +++ b/bsp/mini2440/startup.c @@ -126,9 +126,6 @@ void rtthread_startup(void) /* rtc init */ rt_hw_rtc_init(); - - /*init all registed devices */ - rt_device_init_all(); #endif /* init application */ diff --git a/bsp/mini4020/applications/startup.c b/bsp/mini4020/applications/startup.c index 852b9dc89..bb43044a3 100644 --- a/bsp/mini4020/applications/startup.c +++ b/bsp/mini4020/applications/startup.c @@ -79,9 +79,6 @@ void rtthread_startup() eth_system_device_init(); rt_hw_dm9161_init(); #endif - - /*init all registed devices */ - rt_device_init_all(); #endif /* init application */ @@ -108,10 +105,8 @@ void rtthread_startup() int main() { - rt_uint32_t UNUSED level; - /* disable interrupt first */ - level = rt_hw_interrupt_disable(); + rt_hw_interrupt_disable(); /* startup RT-Thread RTOS */ rtthread_startup(); diff --git a/bsp/sam7x/applications/startup.c b/bsp/sam7x/applications/startup.c index 770573910..441f41385 100644 --- a/bsp/sam7x/applications/startup.c +++ b/bsp/sam7x/applications/startup.c @@ -116,9 +116,6 @@ void rtthread_startup(void) #ifdef RT_USING_DFS rt_hw_sdcard_init(); #endif - - /*init all registed devices*/ - rt_device_init_all(); #endif /* init application */ diff --git a/bsp/sep6200/application/startup.c b/bsp/sep6200/application/startup.c index 6c9d390fa..1514b1114 100644 --- a/bsp/sep6200/application/startup.c +++ b/bsp/sep6200/application/startup.c @@ -78,20 +78,6 @@ void rtthread_startup() /* init scheduler system */ rt_system_scheduler_init(); -#ifdef RT_USING_DEVICE - -#ifdef RT_USING_DFS - /* Not implemented */ -#endif - -#ifdef RT_USING_LWIP - /* Not implemented */ -#endif - - /*init all registed devices */ - rt_device_init_all(); -#endif - /* init application */ rt_application_init(); diff --git a/bsp/simulator/applications/startup.c b/bsp/simulator/applications/startup.c index 2b21c6901..bd6502da6 100644 --- a/bsp/simulator/applications/startup.c +++ b/bsp/simulator/applications/startup.c @@ -58,10 +58,6 @@ void rtthread_startup(void) /* init scheduler system */ rt_system_scheduler_init(); - /* init all device */ -#ifdef RT_USING_DEVICE - rt_device_init_all(); -#endif /* init application */ rt_application_init(); diff --git a/bsp/stm32f0x/applications/startup.c b/bsp/stm32f0x/applications/startup.c index 52d473b8b..b3ace8038 100644 --- a/bsp/stm32f0x/applications/startup.c +++ b/bsp/stm32f0x/applications/startup.c @@ -86,11 +86,6 @@ void rtthread_startup(void) /* init scheduler system */ rt_system_scheduler_init(); -#ifdef RT_USING_DEVICE - /* init all device */ - rt_device_init_all(); -#endif - /* init application */ rt_application_init(); diff --git a/bsp/stm32f107/applications/startup.c b/bsp/stm32f107/applications/startup.c index eae71a17e..9041d5900 100644 --- a/bsp/stm32f107/applications/startup.c +++ b/bsp/stm32f107/applications/startup.c @@ -81,9 +81,6 @@ void rtthread_startup(void) /* init scheduler system */ rt_system_scheduler_init(); - /* init all device */ - rt_device_init_all(); - /* init application */ rt_application_init(); diff --git a/bsp/stm32f10x/applications/application.c b/bsp/stm32f10x/applications/application.c index d57bb4e4c..58720cf0f 100644 --- a/bsp/stm32f10x/applications/application.c +++ b/bsp/stm32f10x/applications/application.c @@ -122,9 +122,6 @@ void rt_init_thread_entry(void* parameter) /* init touch panel */ rtgui_touch_hw_init(); - /* re-init device driver */ - rt_device_init_all(); - /* find lcd device */ lcd = rt_device_find("lcd"); diff --git a/bsp/stm32f20x/applications/application.c b/bsp/stm32f20x/applications/application.c index 23c2bb817..b288a26bb 100644 --- a/bsp/stm32f20x/applications/application.c +++ b/bsp/stm32f20x/applications/application.c @@ -66,12 +66,9 @@ void rt_init_thread_entry(void* parameter) /* register ethernetif device */ eth_system_device_init(); - + /* initialize eth interface */ rt_hw_stm32_eth_init(); - - /* re-init device driver */ - rt_device_init_all(); /* init lwip system */ lwip_sys_init(); diff --git a/bsp/stm32f20x/applications/startup.c b/bsp/stm32f20x/applications/startup.c index dd9969168..d07e4ad5a 100644 --- a/bsp/stm32f20x/applications/startup.c +++ b/bsp/stm32f20x/applications/startup.c @@ -107,9 +107,6 @@ void rtthread_startup(void) rt_hw_rtc_init(); - /* init all device */ - rt_device_init_all(); - /* init application */ rt_application_init(); diff --git a/bsp/stm32f40x/applications/application.c b/bsp/stm32f40x/applications/application.c index d4ad72f64..2a01107f6 100644 --- a/bsp/stm32f40x/applications/application.c +++ b/bsp/stm32f40x/applications/application.c @@ -34,8 +34,6 @@ void rt_init_thread_entry(void* parameter) eth_system_device_init(); rt_hw_stm32_eth_init(); - /* re-init device driver */ - rt_device_init_all(); /* init lwip system */ lwip_sys_init(); diff --git a/bsp/stm32f40x/applications/startup.c b/bsp/stm32f40x/applications/startup.c index d5d31fa5e..e0547efb7 100644 --- a/bsp/stm32f40x/applications/startup.c +++ b/bsp/stm32f40x/applications/startup.c @@ -85,9 +85,6 @@ void rtthread_startup(void) /* init scheduler system */ rt_system_scheduler_init(); - /* init all device */ - rt_device_init_all(); - /* init application */ rt_application_init(); diff --git a/bsp/upd70f3454/applications/startup.c b/bsp/upd70f3454/applications/startup.c index f609fc7cb..1a06957b0 100644 --- a/bsp/upd70f3454/applications/startup.c +++ b/bsp/upd70f3454/applications/startup.c @@ -68,11 +68,6 @@ void rtthread_startup(void) /* init scheduler system */ rt_system_scheduler_init(); -#ifdef RT_USING_DEVICE - /* init all device */ - rt_device_init_all(); -#endif - /* init application */ rt_application_init();