Module Name:    src
Committed By:   jmcneill
Date:           Mon Jul  2 23:52:54 UTC 2018

Modified Files:
        src/sys/arch/arm/samsung: exynos_dwcmmc.c

Log Message:
No need to use hold reg when updating clocks, and auto-discover some values.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/samsung/exynos_dwcmmc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/samsung/exynos_dwcmmc.c
diff -u src/sys/arch/arm/samsung/exynos_dwcmmc.c:1.6 src/sys/arch/arm/samsung/exynos_dwcmmc.c:1.7
--- src/sys/arch/arm/samsung/exynos_dwcmmc.c:1.6	Mon Jul  2 20:28:24 2018
+++ src/sys/arch/arm/samsung/exynos_dwcmmc.c	Mon Jul  2 23:52:53 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: exynos_dwcmmc.c,v 1.6 2018/07/02 20:28:24 jmcneill Exp $ */
+/* $NetBSD: exynos_dwcmmc.c,v 1.7 2018/07/02 23:52:53 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <[email protected]>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: exynos_dwcmmc.c,v 1.6 2018/07/02 20:28:24 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos_dwcmmc.c,v 1.7 2018/07/02 23:52:53 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -43,7 +43,6 @@ __KERNEL_RCSID(0, "$NetBSD: exynos_dwcmm
 #include <dev/ic/dwc_mmc_var.h>
 #include <dev/fdt/fdtvar.h>
 
-#define	FIFO_REG	0x200
 #define	MPS_BEGIN	0x200
 #define	MPS_END		0x204
 #define	MPS_CTRL	0x20c
@@ -94,7 +93,6 @@ exynos_dwcmmc_attach(device_t parent, de
 	char intrstr[128];
 	bus_addr_t addr;
 	bus_size_t size;
-	u_int fifo_depth;
 	int error;
 
 	if (fdtbus_get_reg(phandle, 0, &addr, &size) != 0) {
@@ -102,9 +100,6 @@ exynos_dwcmmc_attach(device_t parent, de
 		return;
 	}
 
-	if (of_getprop_uint32(phandle, "fifo-depth", &fifo_depth)) {
-		fifo_depth = 64;
-	}
 	if (of_getprop_uint32(phandle, "samsung,dw-mshc-ciu-div", &esc->sc_ciu_div)) {
 		aprint_error(": missing samsung,dw-mshc-ciu-div property\n");
 		return;
@@ -143,9 +138,8 @@ exynos_dwcmmc_attach(device_t parent, de
 	}
 
 	sc->sc_clock_freq = clk_get_rate(esc->sc_clk_ciu) / (esc->sc_ciu_div + 1);
-	sc->sc_fifo_depth = fifo_depth;
-	sc->sc_fifo_reg = FIFO_REG;
-	sc->sc_flags = DWC_MMC_F_USE_HOLD_REG | DWC_MMC_F_DMA;
+	of_getprop_uint32(phandle, "fifo-depth", &sc->sc_fifo_depth);
+	sc->sc_flags = DWC_MMC_F_DMA;
 	sc->sc_bus_clock = exynos_dwcmmc_bus_clock;
 
 	esc->sc_pin_cd = fdtbus_gpio_acquire(phandle, "cd-gpios",

Reply via email to