Skip to content

Commit

Permalink
hw/sd/sdhci-internal: Unexport ESDHC defines
Browse files Browse the repository at this point in the history
These defines aren't used outside of sdhci.c, so can be defined there.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20221018210146.193159-4-shentey@gmail.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
  • Loading branch information
shentok authored and danielhb committed Oct 28, 2022
1 parent 334c388 commit c038e57
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 20 deletions.
20 changes: 0 additions & 20 deletions hw/sd/sdhci-internal.h
Expand Up @@ -288,26 +288,6 @@ enum {

extern const VMStateDescription sdhci_vmstate;


#define ESDHC_MIX_CTRL 0x48

#define ESDHC_VENDOR_SPEC 0xc0
#define ESDHC_IMX_FRC_SDCLK_ON (1 << 8)

#define ESDHC_DLL_CTRL 0x60

#define ESDHC_TUNING_CTRL 0xcc
#define ESDHC_TUNE_CTRL_STATUS 0x68
#define ESDHC_WTMK_LVL 0x44

/* Undocumented register used by guests working around erratum ERR004536 */
#define ESDHC_UNDOCUMENTED_REG27 0x6c

#define ESDHC_CTRL_4BITBUS (0x1 << 1)
#define ESDHC_CTRL_8BITBUS (0x2 << 1)

#define ESDHC_PRNSTS_SDSTB (1 << 3)

/*
* Default SD/MMC host controller features information, which will be
* presented in CAPABILITIES register of generic SD host controller at reset.
Expand Down
19 changes: 19 additions & 0 deletions hw/sd/sdhci.c
Expand Up @@ -1577,6 +1577,25 @@ static const TypeInfo sdhci_bus_info = {

/* --- qdev i.MX eSDHC --- */

#define ESDHC_MIX_CTRL 0x48

#define ESDHC_VENDOR_SPEC 0xc0
#define ESDHC_IMX_FRC_SDCLK_ON (1 << 8)

#define ESDHC_DLL_CTRL 0x60

#define ESDHC_TUNING_CTRL 0xcc
#define ESDHC_TUNE_CTRL_STATUS 0x68
#define ESDHC_WTMK_LVL 0x44

/* Undocumented register used by guests working around erratum ERR004536 */
#define ESDHC_UNDOCUMENTED_REG27 0x6c

#define ESDHC_CTRL_4BITBUS (0x1 << 1)
#define ESDHC_CTRL_8BITBUS (0x2 << 1)

#define ESDHC_PRNSTS_SDSTB (1 << 3)

static uint64_t usdhc_read(void *opaque, hwaddr offset, unsigned size)
{
SDHCIState *s = SYSBUS_SDHCI(opaque);
Expand Down

0 comments on commit c038e57

Please sign in to comment.