diff --git a/bsp/imx6ull-artpi-smart/applications/init_em.c b/bsp/imx6ull-artpi-smart/applications/init_em.c index d7a5d8fd6222e861def7dc3a979fd829fc31e44b..376503e02663014ccff8d1425df7022b80dac42c 100644 --- a/bsp/imx6ull-artpi-smart/applications/init_em.c +++ b/bsp/imx6ull-artpi-smart/applications/init_em.c @@ -21,12 +21,12 @@ int em_init(void) { int count = 5; - char *em_cmd = "/bin/em.elf &"; + char *em_cmd = "/services/em.elf &"; while (count --) { int fd; - fd = open("/bin/em.elf", O_RDONLY); + fd = open("/services/em.elf", O_RDONLY); if (fd >= 0) { close(fd); diff --git a/bsp/imx6ull-artpi-smart/applications/init_sdtask.c b/bsp/imx6ull-artpi-smart/applications/init_sdtask.c index 30a8e3ec987ba843ad31308d3d0bb6ba109fffbd..2041dc17d46bf3ed2b1f83d5ef9705b69dc9e700 100644 --- a/bsp/imx6ull-artpi-smart/applications/init_sdtask.c +++ b/bsp/imx6ull-artpi-smart/applications/init_sdtask.c @@ -61,7 +61,7 @@ _remount: void filesysytem_try_unmount(char *mount_point) { struct stat filestat = {0}; - LOG_I("unmount(\"%s\");", mount_point); + LOG_I("unmount(\"%s\");", mount_point); if ((dfs_file_stat(mount_point, &filestat) >= 0) && (S_ISDIR(filestat.st_mode))) { dfs_unmount(mount_point); @@ -72,7 +72,7 @@ static void sd_task_entry(void *parameter) { volatile unsigned int *IN_STATUS; - IN_STATUS = (volatile unsigned int *)rt_ioremap((void *)0x2190030, 4); //cd status + IN_STATUS = (volatile unsigned int *)rt_ioremap((void *)0x2190030, 4); // cd status int change = 0; while (1) @@ -89,27 +89,28 @@ static void sd_task_entry(void *parameter) *IN_STATUS = (0x80); change = 2; } - if(change > 0) + if (change > 0) { - LOG_D("sdio host change: %d", change); + LOG_D("sdio host change: %d", change); mmcsd_wait_cd_changed(0); // clear - host_change(); // send cd change to host + host_change(); // send cd change to host int result = mmcsd_wait_cd_changed(RT_TICK_PER_SECOND); if (result == MMCSD_HOST_PLUGED) { LOG_D("mmcsd change pluged"); - filesysytem_try_mount("sd0","/sd","elm",0); - }else - if(result == MMCSD_HOST_UNPLUGED) + filesysytem_try_mount("sd0", "/mnt/sd0", "elm", 0); + } + else if (result == MMCSD_HOST_UNPLUGED) { LOG_D("mmcsd change unpluged"); - filesysytem_try_unmount("/sd"); - }else{ - LOG_I("mmcsd wait_cd_changed %d",result); + filesysytem_try_unmount("/mnt/sd0"); + } + else + { + LOG_I("mmcsd wait_cd_changed %d", result); } } - } } @@ -130,5 +131,4 @@ int sd_task_init(void) return RT_EOK; } INIT_APP_EXPORT(sd_task_init); - #endif diff --git a/bsp/imx6ull-artpi-smart/applications/mnt.c b/bsp/imx6ull-artpi-smart/applications/mnt.c index 3190751385f671458c9aa4b87d4d7d3366698ff7..65879480c5afc72cfd7cbcf59739eac0616601b6 100644 --- a/bsp/imx6ull-artpi-smart/applications/mnt.c +++ b/bsp/imx6ull-artpi-smart/applications/mnt.c @@ -19,8 +19,8 @@ int mnt_init(void) #ifdef RT_USING_SDIO2 rt_thread_mdelay(500); - int part_id = 3; - if (dfs_mount("emmc","/","elm",0,(void *)part_id) != 0) + int part_id = 0; + if (dfs_mount("emmc0", "/", "elm", 0, (void *)part_id) != 0) { rt_kprintf("Dir / emmc mount failed!\n"); return -1; @@ -30,10 +30,10 @@ int mnt_init(void) rt_kprintf("emmc file system initialization done!\n"); } - part_id = 1; - if (dfs_mount("sd0","/sd","elm",0,(void *)part_id) != 0) + part_id = 0; + if (dfs_mount("sd0", "/mnt/sd0", "elm", 0, (void *)part_id) != 0) { - rt_kprintf("Dir / sd0 mount failed!\n"); + rt_kprintf("Dir /mnt/sd0 mount failed!\n"); return -1; } else diff --git a/bsp/imx6ull-artpi-smart/drivers/drv_eth.c b/bsp/imx6ull-artpi-smart/drivers/drv_eth.c index 582605fda327328efa6ec3c2becf3da585a67f1c..fe87422fc98163ba56455aab276cf6ecef889482 100644 --- a/bsp/imx6ull-artpi-smart/drivers/drv_eth.c +++ b/bsp/imx6ull-artpi-smart/drivers/drv_eth.c @@ -514,7 +514,7 @@ static void phy_detect_thread_entry(void *param) } else { - LOG_E("PHY Link down, please check the cable connection and link partner setting."); + LOG_W("PHY Link down, please check the cable connection and link partner setting."); } while(1) @@ -564,14 +564,14 @@ static int imx6ul_eth_init(void) state = eth_device_init(&(_imx6ul_eth_device[idx].parent), _imx6ul_eth_device[idx].mac_name); if (RT_EOK == state) { - LOG_E("emac device init success"); + LOG_I("emac device init success"); } else { LOG_E("emac device init faild: %d", state); state = -RT_ERROR; } - + rt_sprintf(link_detect,"link_d%d",_imx6ul_eth_device[idx].mac_num); /* start phy link detect */ rt_thread_t phy_link_tid;