mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-24 04:34:22 +08:00
0914011310
We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
38 lines
703 B
C
38 lines
703 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/**
|
|
* ufs.c - UFS specific U-boot commands
|
|
*
|
|
* Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com
|
|
*
|
|
*/
|
|
#include <common.h>
|
|
#include <command.h>
|
|
#include <ufs.h>
|
|
|
|
static int do_ufs(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
|
{
|
|
int dev, ret;
|
|
|
|
if (argc >= 2) {
|
|
if (!strcmp(argv[1], "init")) {
|
|
if (argc == 3) {
|
|
dev = simple_strtoul(argv[2], NULL, 10);
|
|
ret = ufs_probe_dev(dev);
|
|
if (ret)
|
|
return CMD_RET_FAILURE;
|
|
} else {
|
|
ufs_probe();
|
|
}
|
|
|
|
return CMD_RET_SUCCESS;
|
|
}
|
|
}
|
|
|
|
return CMD_RET_USAGE;
|
|
}
|
|
|
|
U_BOOT_CMD(ufs, 3, 1, do_ufs,
|
|
"UFS sub system",
|
|
"init [dev] - init UFS subsystem\n"
|
|
);
|