On 9 March 2018 at 15:36, Philippe Mathieu-Daudé <f4...@amsat.org> wrote: > The SDBus will reuse these functions, so we put them in a new source file. > > Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> > --- > hw/sd/sdmmc-internal.h | 20 ++++++++++++++ > hw/sd/sd.c | 13 +++++---- > hw/sd/sdmmc-internal.c | 72 > ++++++++++++++++++++++++++++++++++++++++++++++++++ > hw/sd/Makefile.objs | 2 +- > hw/sd/trace-events | 8 +++--- > 5 files changed, 105 insertions(+), 10 deletions(-) > create mode 100644 hw/sd/sdmmc-internal.c > > diff --git a/hw/sd/sdmmc-internal.h b/hw/sd/sdmmc-internal.h > index 0e96cb0081..bf6fb06128 100644 > --- a/hw/sd/sdmmc-internal.h > +++ b/hw/sd/sdmmc-internal.h > @@ -12,4 +12,24 @@ > > #define SDMMC_CMD_MAX 64 > > +/** > + * sd_cmd_name: > + * @cmd: A SD "normal" command, upto SDMMC_CMD_MAX. > + * > + * Returns an human useful name describing the command. > + * > + * Returns: The command name of @cmd or "UNKNOWN_CMD". > + */ > +const char *sd_cmd_name(uint8_t cmd); > + > +/** > + * sd_acmd_name: > + * @cmd: A SD "Application-Specific" command, upto SDMMC_CMD_MAX. > + * > + * Returns an human useful name describing the application command. > + * > + * Returns: The application command name of @cmd or "UNKNOWN_ACMD". > + */ > +const char *sd_acmd_name(uint8_t cmd); > +
"up to", and "a human-readable name". Otherwise: Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> thanks -- PMM