diff options
| author | bigmagic <[email protected]> | 2020-12-29 17:56:12 +0800 |
|---|---|---|
| committer | bigmagic <[email protected]> | 2020-12-29 18:54:12 +0800 |
| commit | 68689c7c4307cdcb4b97a77cd0b59ed6379528ce (patch) | |
| tree | 110d6bb0ff12f0a83d75f752fd009ff677789817 /bsp/ls2kdev/applications | |
| parent | eaf3e4795d5fc3b54b95b1d9ccca259983ae5909 (diff) | |
add ls2k sata ssd driver
Diffstat (limited to 'bsp/ls2kdev/applications')
| -rw-r--r-- | bsp/ls2kdev/applications/mnt.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/bsp/ls2kdev/applications/mnt.c b/bsp/ls2kdev/applications/mnt.c new file mode 100644 index 0000000000..f6057806a5 --- /dev/null +++ b/bsp/ls2kdev/applications/mnt.c @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2006-2020, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2020-12-29 bigmagic first version + */ +#include <rthw.h> +#include <rtthread.h> +#include <dfs.h> +#include <dfs_fs.h> +#include <dfs_file.h> +#include <ext4.h> +#include <ext4_debug.h> +#include <blk_device.h> +#include <stdint.h> +#include <pci.h> + +int mount_ssd(void) +{ + struct blk_device *blkdev = (struct blk_device *)rt_device_find("dwc_ahsata_blk"); + + if(blkdev == RT_NULL) + { + rt_kprintf("dwc_ahsata_blk not found!\n"); + return; + } + + //ext4_dmask_set(0xFFFFFFFF); + blk_device_init(blkdev); + dfs_mount("dwc_ahsata_blk","/","ext",0,(void *)1); + dfs_mount("dwc_ahsata_blk","/boot","ext",0,(void *)0); + + return 0; +} + +INIT_ENV_EXPORT(mount_ssd); |
