Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sdmmc pass sdhc_softc instead of sdhc_host to sc_ven...
details: https://anonhg.NetBSD.org/src/rev/135ca5130d2a
branches: trunk
changeset: 332704:135ca5130d2a
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Oct 04 18:09:32 2014 +0000
description:
pass sdhc_softc instead of sdhc_host to sc_vendor_transfer_data_dma, since the vendor specific code has no visibility into struct sdhc_host and can easily do device_private(sdhc_softc->sc_dev)
diffstat:
sys/dev/sdmmc/sdhc.c | 7 ++++---
sys/dev/sdmmc/sdhcvar.h | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)
diffs (53 lines):
diff -r f75b17b43727 -r 135ca5130d2a sys/dev/sdmmc/sdhc.c
--- a/sys/dev/sdmmc/sdhc.c Sat Oct 04 16:58:17 2014 +0000
+++ b/sys/dev/sdmmc/sdhc.c Sat Oct 04 18:09:32 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdhc.c,v 1.50 2014/10/02 18:14:38 mlelstv Exp $ */
+/* $NetBSD: sdhc.c,v 1.51 2014/10/04 18:09:32 jmcneill Exp $ */
/* $OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $ */
/*
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.50 2014/10/02 18:14:38 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.51 2014/10/04 18:09:32 jmcneill Exp $");
#ifdef _KERNEL_OPT
#include "opt_sdmmc.h"
@@ -1272,6 +1272,7 @@
static void
sdhc_transfer_data(struct sdhc_host *hp, struct sdmmc_command *cmd)
{
+ struct sdhc_softc *sc = hp->sc;
int error;
DPRINTF(1,("%s: data transfer: resp=%08x datalen=%u\n", HDEVNAME(hp),
@@ -1289,7 +1290,7 @@
if (cmd->c_dmamap != NULL) {
if (hp->sc->sc_vendor_transfer_data_dma != NULL) {
- error = hp->sc->sc_vendor_transfer_data_dma(hp, cmd);
+ error = hp->sc->sc_vendor_transfer_data_dma(sc, cmd);
if (error == 0 && !sdhc_wait_intr(hp,
SDHC_TRANSFER_COMPLETE, SDHC_TRANSFER_TIMEOUT)) {
error = ETIMEDOUT;
diff -r f75b17b43727 -r 135ca5130d2a sys/dev/sdmmc/sdhcvar.h
--- a/sys/dev/sdmmc/sdhcvar.h Sat Oct 04 16:58:17 2014 +0000
+++ b/sys/dev/sdmmc/sdhcvar.h Sat Oct 04 18:09:32 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdhcvar.h,v 1.14 2014/09/12 19:45:16 jakllsch Exp $ */
+/* $NetBSD: sdhcvar.h,v 1.15 2014/10/04 18:09:32 jmcneill Exp $ */
/* $OpenBSD: sdhcvar.h,v 1.3 2007/09/06 08:01:01 jsg Exp $ */
/*
@@ -60,7 +60,7 @@
int (*sc_vendor_write_protect)(struct sdhc_softc *);
int (*sc_vendor_card_detect)(struct sdhc_softc *);
int (*sc_vendor_bus_clock)(struct sdhc_softc *, int);
- int (*sc_vendor_transfer_data_dma)(struct sdhc_host *, struct sdmmc_command *);
+ int (*sc_vendor_transfer_data_dma)(struct sdhc_softc *, struct sdmmc_command *);
};
/* Host controller functions called by the attachment driver. */
Home |
Main Index |
Thread Index |
Old Index