xref: /openbmc/qemu/hw/sd/sdmmc-internal.h (revision d1fd31f8)
1 /*
2  * SD/MMC cards common
3  *
4  * Copyright (c) 2018  Philippe Mathieu-Daudé <f4bug@amsat.org>
5  *
6  * This work is licensed under the terms of the GNU GPL, version 2 or later.
7  * See the COPYING file in the top-level directory.
8  * SPDX-License-Identifier: GPL-2.0-or-later
9  */
10 #ifndef SD_INTERNAL_H
11 #define SD_INTERNAL_H
12 
13 #define SDMMC_CMD_MAX 64
14 
15 /**
16  * sd_cmd_name:
17  * @cmd: A SD "normal" command, up to SDMMC_CMD_MAX.
18  *
19  * Returns a human-readable name describing the command.
20  * The return value is always a static string which does not need
21  * to be freed after use.
22  *
23  * Returns: The command name of @cmd or "UNKNOWN_CMD".
24  */
25 const char *sd_cmd_name(uint8_t cmd);
26 
27 /**
28  * sd_acmd_name:
29  * @cmd: A SD "Application-Specific" command, up to SDMMC_CMD_MAX.
30  *
31  * Returns a human-readable name describing the application command.
32  * The return value is always a static string which does not need
33  * to be freed after use.
34  *
35  * Returns: The application command name of @cmd or "UNKNOWN_ACMD".
36  */
37 const char *sd_acmd_name(uint8_t cmd);
38 
39 #endif
40