diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-05-01 16:04:40 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-05-01 16:04:40 +0000 |
commit | 6bd1ebc4f6372213e2d48e527b38f1d9c3c14f0e (patch) | |
tree | 80ea831bd0078578a4716851e31069b80e26e830 /sys/dev/ic | |
parent | 9350001d745387d778c568a6f38cc76cb9f0beb8 (diff) |
Add support for changing the bus width to the sdmmc subsystem and the sdhc(4)
controller. Use this to switch SD cards to a 4-bit bus if they support it.
ok deraadt@, jsg@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/rtsx.c | 3 | ||||
-rw-r--r-- | sys/dev/ic/w83l518d_sdmmc.c | 10 |
2 files changed, 4 insertions, 9 deletions
diff --git a/sys/dev/ic/rtsx.c b/sys/dev/ic/rtsx.c index 38b16a4695b..ba734292ca6 100644 --- a/sys/dev/ic/rtsx.c +++ b/sys/dev/ic/rtsx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsx.c,v 1.12 2015/04/28 07:55:13 stsp Exp $ */ +/* $OpenBSD: rtsx.c,v 1.13 2016/05/01 16:04:39 kettenis Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -146,6 +146,7 @@ struct sdmmc_chip_functions rtsx_functions = { /* bus power and clock frequency */ rtsx_bus_power, rtsx_bus_clock, + NULL, /* command execution */ rtsx_exec_command, /* card interrupt */ diff --git a/sys/dev/ic/w83l518d_sdmmc.c b/sys/dev/ic/w83l518d_sdmmc.c index ec2902941ea..9e867ca7a12 100644 --- a/sys/dev/ic/w83l518d_sdmmc.c +++ b/sys/dev/ic/w83l518d_sdmmc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: w83l518d_sdmmc.c,v 1.2 2014/05/10 18:41:55 kettenis Exp $ */ +/* $OpenBSD: w83l518d_sdmmc.c,v 1.3 2016/05/01 16:04:39 kettenis Exp $ */ /* $NetBSD: w83l518d_sdmmc.c,v 1.1 2009/09/30 20:44:50 jmcneill Exp $ */ /* @@ -66,9 +66,7 @@ int wb_sdmmc_write_protect(sdmmc_chipset_handle_t); #endif int wb_sdmmc_bus_power(sdmmc_chipset_handle_t, uint32_t); int wb_sdmmc_bus_clock(sdmmc_chipset_handle_t, int); -#if 0 int wb_sdmmc_bus_width(sdmmc_chipset_handle_t, int); -#endif void wb_sdmmc_exec_command(sdmmc_chipset_handle_t, struct sdmmc_command *); void wb_sdmmc_card_intr_mask(sdmmc_chipset_handle_t, int); @@ -88,9 +86,7 @@ struct sdmmc_chip_functions wb_sdmmc_chip_functions = { /* bus power and clock frequency */ wb_sdmmc_bus_power, wb_sdmmc_bus_clock, -#if 0 - .bus_width = wb_sdmmc_bus_width, -#endif + wb_sdmmc_bus_width, /* command execution */ wb_sdmmc_exec_command, /* card interrupt */ @@ -304,7 +300,6 @@ wb_sdmmc_bus_clock(sdmmc_chipset_handle_t sch, int freq) return 0; } -#if 0 int wb_sdmmc_bus_width(sdmmc_chipset_handle_t sch, int width) { @@ -319,7 +314,6 @@ wb_sdmmc_bus_width(sdmmc_chipset_handle_t sch, int width) return 0; } -#endif void wb_sdmmc_rsp_read_long(struct wb_softc *wb, struct sdmmc_command *cmd) |