Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/rockchip Update for new dwc_mmc driver
details: https://anonhg.NetBSD.org/src/rev/af7ac2b39f9e
branches: trunk
changeset: 354547:af7ac2b39f9e
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Tue Jun 20 19:03:04 2017 +0000
description:
Update for new dwc_mmc driver
diffstat:
sys/arch/arm/rockchip/rockchip_dwcmmc.c | 22 ++++++----------------
1 files changed, 6 insertions(+), 16 deletions(-)
diffs (62 lines):
diff -r 7e54a313ce5c -r af7ac2b39f9e sys/arch/arm/rockchip/rockchip_dwcmmc.c
--- a/sys/arch/arm/rockchip/rockchip_dwcmmc.c Tue Jun 20 18:37:46 2017 +0000
+++ b/sys/arch/arm/rockchip/rockchip_dwcmmc.c Tue Jun 20 19:03:04 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rockchip_dwcmmc.c,v 1.5 2015/01/03 13:29:02 jmcneill Exp $ */
+/* $NetBSD: rockchip_dwcmmc.c,v 1.6 2017/06/20 19:03:04 jmcneill Exp $ */
/*-
* Copyright (c) 2014 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rockchip_dwcmmc.c,v 1.5 2015/01/03 13:29:02 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rockchip_dwcmmc.c,v 1.6 2017/06/20 19:03:04 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -46,8 +46,6 @@
static int rk_dwcmmc_match(device_t, cfdata_t, void *);
static void rk_dwcmmc_attach(device_t, device_t, void *);
-static void rk_dwcmmc_attach_i(device_t);
-
CFATTACH_DECL_NEW(rkdwcmmc, sizeof(struct dwc_mmc_softc),
rk_dwcmmc_match, rk_dwcmmc_attach, NULL, NULL);
@@ -68,8 +66,7 @@
sc->sc_dev = self;
sc->sc_bst = obio->obio_bst;
sc->sc_dmat = obio->obio_dmat;
- sc->sc_flags = DWC_MMC_F_USE_HOLD_REG | DWC_MMC_F_PWREN_CLEAR |
- DWC_MMC_F_FORCE_CLK;
+ sc->sc_flags = DWC_MMC_F_USE_HOLD_REG;
sc->sc_clock_freq = rockchip_mmc0_get_rate();
#if 0
sc->sc_clock_max = 24000;
@@ -82,6 +79,9 @@
aprint_naive("\n");
aprint_normal(": SD/MMC controller\n");
+ if (dwc_mmc_init(sc) != 0)
+ return;
+
sc->sc_ih = intr_establish(obio->obio_intr, IPL_BIO, IST_LEVEL,
dwc_mmc_intr, sc);
if (sc->sc_ih == NULL) {
@@ -89,14 +89,4 @@
obio->obio_intr);
return;
}
-
- config_interrupts(self, rk_dwcmmc_attach_i);
}
-
-static void
-rk_dwcmmc_attach_i(device_t self)
-{
- struct dwc_mmc_softc *sc = device_private(self);
-
- dwc_mmc_init(sc);
-}
Home |
Main Index |
Thread Index |
Old Index