]> Git Repo - J-u-boot.git/blame - cmd/ufs.c
pxe: Move common parsing coding into pxe_util
[J-u-boot.git] / cmd / ufs.c
CommitLineData
a539c8bd
FA
1// SPDX-License-Identifier: GPL-2.0+
2/**
3 * ufs.c - UFS specific U-boot commands
4 *
5 * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com
6 *
7 */
8#include <common.h>
9#include <command.h>
10#include <ufs.h>
11
09140113 12static int do_ufs(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
a539c8bd
FA
13{
14 int dev, ret;
15
16 if (argc >= 2) {
17 if (!strcmp(argv[1], "init")) {
18 if (argc == 3) {
0b1284eb 19 dev = dectoul(argv[2], NULL);
a539c8bd
FA
20 ret = ufs_probe_dev(dev);
21 if (ret)
22 return CMD_RET_FAILURE;
23 } else {
24 ufs_probe();
25 }
26
27 return CMD_RET_SUCCESS;
28 }
29 }
30
31 return CMD_RET_USAGE;
32}
33
34U_BOOT_CMD(ufs, 3, 1, do_ufs,
35 "UFS sub system",
36 "init [dev] - init UFS subsystem\n"
37);
This page took 0.0942 seconds and 4 git commands to generate.