summaryrefslogtreecommitdiffstats
path: root/sys/dev/sdmmc/sdmmc_mem.c
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2018-06-04 13:33:10 +0000
committerpatrick <patrick@openbsd.org>2018-06-04 13:33:10 +0000
commita47fed74bfd9dfb48e3e63ee79668122c1f8b9a8 (patch)
tree6aa4d9834abf27032e8d614673fbdb7a8d95766a /sys/dev/sdmmc/sdmmc_mem.c
parentRemove the extra pager code when compiled without the BACKWARDS flag. (diff)
downloadwireguard-openbsd-a47fed74bfd9dfb48e3e63ee79668122c1f8b9a8.tar.xz
wireguard-openbsd-a47fed74bfd9dfb48e3e63ee79668122c1f8b9a8.zip
4-bit bus width is mandatory for SDIO cards that support High Speed
mode, so switch from 1-bit to 4-bit bus width if the host controller supports it. ok kettenis@
Diffstat (limited to 'sys/dev/sdmmc/sdmmc_mem.c')
-rw-r--r--sys/dev/sdmmc/sdmmc_mem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/sdmmc/sdmmc_mem.c b/sys/dev/sdmmc/sdmmc_mem.c
index 0afcbf6af1a..9412593de04 100644
--- a/sys/dev/sdmmc/sdmmc_mem.c
+++ b/sys/dev/sdmmc/sdmmc_mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdmmc_mem.c,v 1.32 2018/05/01 18:30:37 patrick Exp $ */
+/* $OpenBSD: sdmmc_mem.c,v 1.33 2018/06/04 13:33:10 patrick Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -50,7 +50,7 @@ int sdmmc_mem_decode_scr(struct sdmmc_softc *, uint32_t *,
struct sdmmc_function *);
int sdmmc_mem_send_cxd_data(struct sdmmc_softc *, int, void *, size_t);
-int sdmmc_set_bus_width(struct sdmmc_function *, int);
+int sdmmc_mem_set_bus_width(struct sdmmc_function *, int);
int sdmmc_mem_mmc_switch(struct sdmmc_function *, uint8_t, uint8_t, uint8_t);
int sdmmc_mem_sd_init(struct sdmmc_softc *, struct sdmmc_function *);
@@ -452,7 +452,7 @@ out:
}
int
-sdmmc_set_bus_width(struct sdmmc_function *sf, int width)
+sdmmc_mem_set_bus_width(struct sdmmc_function *sf, int width)
{
struct sdmmc_softc *sc = sf->sc;
struct sdmmc_command cmd;
@@ -613,7 +613,7 @@ sdmmc_mem_sd_init(struct sdmmc_softc *sc, struct sdmmc_function *sf)
if (ISSET(sc->sc_caps, SMC_CAPS_4BIT_MODE) &&
ISSET(sf->scr.bus_width, SCR_SD_BUS_WIDTHS_4BIT)) {
DPRINTF(("%s: change bus width\n", DEVNAME(sc)));
- error = sdmmc_set_bus_width(sf, 4);
+ error = sdmmc_mem_set_bus_width(sf, 4);
if (error) {
printf("%s: can't change bus width\n", DEVNAME(sc));
return error;