Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7]: src/sys Pull up following revision(s) (requested by skrll in ...



details:   https://anonhg.NetBSD.org/src/rev/aced92e00ebe
branches:  netbsd-7
changeset: 798399:aced92e00ebe
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Oct 05 20:00:54 2014 +0000

description:
Pull up following revision(s) (requested by skrll in ticket #129):
        sys/dev/sdmmc/sdhcvar.h: revision 1.15
        sys/dev/sdmmc/sdhc.c: revision 1.51
        sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.19
Pass sdhc_softc instead of sdhc_host to sc_vendor_transfer_data_dma,
since the vendor specific code has no access to it otherwise,
but can easily do device_private(sdhc_softc->sc_dev).

diffstat:

 sys/arch/arm/broadcom/bcm2835_emmc.c |  10 +++++-----
 sys/dev/sdmmc/sdhc.c                 |   7 ++++---
 sys/dev/sdmmc/sdhcvar.h              |   4 ++--
 3 files changed, 11 insertions(+), 10 deletions(-)

diffs (92 lines):

diff -r 290cb0e7e657 -r aced92e00ebe sys/arch/arm/broadcom/bcm2835_emmc.c
--- a/sys/arch/arm/broadcom/bcm2835_emmc.c      Sun Oct 05 10:22:50 2014 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_emmc.c      Sun Oct 05 20:00:54 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcm2835_emmc.c,v 1.9.4.1 2014/10/03 18:53:56 martin Exp $      */
+/*     $NetBSD: bcm2835_emmc.c,v 1.9.4.2 2014/10/05 20:00:54 martin Exp $      */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_emmc.c,v 1.9.4.1 2014/10/03 18:53:56 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_emmc.c,v 1.9.4.2 2014/10/05 20:00:54 martin Exp $");
 
 #include "bcmdmac.h"
 
@@ -82,7 +82,7 @@
 static void bcmemmc_attach(device_t, device_t, void *);
 static void bcmemmc_attach_i(device_t);
 #if NBCMDMAC > 0
-static int bcmemmc_xfer_data_dma(struct sdhc_host *, struct sdmmc_command *);
+static int bcmemmc_xfer_data_dma(struct sdhc_softc *, struct sdmmc_command *);
 static void bcmemmc_dma_done(void *);
 #endif
 
@@ -239,9 +239,9 @@
 
 #if NBCMDMAC > 0
 static int
-bcmemmc_xfer_data_dma(struct sdhc_host *hp, struct sdmmc_command *cmd)
+bcmemmc_xfer_data_dma(struct sdhc_softc *sdhc_sc, struct sdmmc_command *cmd)
 {
-       struct bcmemmc_softc * const sc = *(void **)hp; /* XXX XXX XXX */
+       struct bcmemmc_softc * const sc = device_private(sdhc_sc->sc_dev);
        size_t seg;
        int error;
 
diff -r 290cb0e7e657 -r aced92e00ebe sys/dev/sdmmc/sdhc.c
--- a/sys/dev/sdmmc/sdhc.c      Sun Oct 05 10:22:50 2014 +0000
+++ b/sys/dev/sdmmc/sdhc.c      Sun Oct 05 20:00:54 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sdhc.c,v 1.44.2.4 2014/10/04 08:20:11 martin Exp $     */
+/*     $NetBSD: sdhc.c,v 1.44.2.5 2014/10/05 20:00:54 martin 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.44.2.4 2014/10/04 08:20:11 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.44.2.5 2014/10/05 20:00:54 martin 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 290cb0e7e657 -r aced92e00ebe sys/dev/sdmmc/sdhcvar.h
--- a/sys/dev/sdmmc/sdhcvar.h   Sun Oct 05 10:22:50 2014 +0000
+++ b/sys/dev/sdmmc/sdhcvar.h   Sun Oct 05 20:00:54 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sdhcvar.h,v 1.13.12.1 2014/10/03 18:53:56 martin Exp $ */
+/*     $NetBSD: sdhcvar.h,v 1.13.12.2 2014/10/05 20:00:54 martin 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