Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit 1c70a16

Browse files
drivers/sdhci_mmc: clean-up: do not mixup int and EFI_STATUS types
EFI_STATUS is not an integer. Its definition changes in 64-bits Change-Id: Ibea9386d576ab8c7ff441f50f85f862753190ba9 Signed-off-by: Jeremy Compostella <[email protected]>
1 parent ff9c68e commit 1c70a16

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

drivers/sdhci_mmc/sdhci.c

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,10 @@ static void sdhci_reset_tuning(struct sdhci *host)
6262
sdhci_write16(host, SDHCI_HOST_CTRL2, ctrl);
6363
}
6464

65-
static int sdhci_abort_tuning(struct sdhci *host)
65+
static void sdhci_abort_tuning(struct sdhci *host)
6666
{
6767
struct cmd tuning_cmd = {0};
6868
struct cmd wait_cmd;
69-
int ret;
7069

7170
sdhci_write32(host, SDHCI_INT_ENABLE, SDHCI_INT_DATA_AVAIL);
7271
sdhci_write32(host, SDHCI_SIGNAL_ENABLE, SDHCI_INT_DATA_AVAIL);
@@ -77,18 +76,14 @@ static int sdhci_abort_tuning(struct sdhci *host)
7776
tuning_cmd.flags |= CMDF_DATA_XFER | CMDF_USE_DMA;
7877
tuning_cmd.flags |= CMDF_WR_XFER;
7978

80-
ret = mmc_send_cmd(&tuning_cmd);
81-
if (ret)
82-
return EFI_DEVICE_ERROR;
79+
mmc_send_cmd(&tuning_cmd);
8380

8481
memset(&wait_cmd, 0, sizeof(wait_cmd));
8582
wait_cmd.flags = CMDF_DATA_XFER;
86-
ret = mmc_wait_cmd_done(&wait_cmd);
87-
88-
return EFI_SUCCESS;
83+
mmc_wait_cmd_done(&wait_cmd);
8984
}
9085

91-
static int sdhci_send_tuning(struct sdhci *host, uint32_t opcode)
86+
static EFI_STATUS sdhci_send_tuning(struct sdhci *host, uint32_t opcode)
9287
{
9388
struct cmd tuning_cmd = {0};
9489
uint32_t buf[256]={0};
@@ -130,15 +125,15 @@ static int sdhci_send_tuning(struct sdhci *host, uint32_t opcode)
130125
return EFI_NOT_READY;
131126
}
132127

133-
static int sdhci_execute_tuning(struct mmc *m)
128+
static EFI_STATUS sdhci_execute_tuning(struct mmc *m)
134129
{
135130
struct sdhci *host = m->host;
136131
uint32_t ier1;
137132
uint32_t ier2;
138133
uint16_t ctrl = 0;
139134
int counter;
140135
int ret = 0;
141-
int err = 0;
136+
EFI_STATUS err = 0;
142137

143138
ier1 = sdhci_read32(host, SDHCI_INT_ENABLE);
144139
ier2 = sdhci_read32(host, SDHCI_SIGNAL_ENABLE);

drivers/sdhci_mmc/sdhci.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct sdhci
5353
int (*wait_boot_done)(struct mmc *m, uintptr_t *dma_addr);
5454
void (*boot_stop)(struct mmc *m);
5555
int (*set_mode)(struct mmc *m);
56-
int (*execute_tuning)(struct mmc *m);
56+
EFI_STATUS (*execute_tuning)(struct mmc *m);
5757

5858
uint32_t caps1;
5959
uint32_t caps2;

0 commit comments

Comments
 (0)