From a83db5274c711fa8b4b5aec8bc287c641d53cb41 Mon Sep 17 00:00:00 2001 From: bouyer Date: Sat, 14 Nov 2015 10:32:40 +0000 Subject: [PATCH] Wait 20ms for the PLL to stabilize after enabling it. Fixes occasional bogus size report for my SD card. --- sys/arch/arm/allwinner/awin_mmc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/arch/arm/allwinner/awin_mmc.c b/sys/arch/arm/allwinner/awin_mmc.c index 9c2bfecf9632..efa8fb4fdd4a 100644 --- a/sys/arch/arm/allwinner/awin_mmc.c +++ b/sys/arch/arm/allwinner/awin_mmc.c @@ -1,4 +1,4 @@ -/* $NetBSD: awin_mmc.c,v 1.22 2015/10/16 14:22:25 bouyer Exp $ */ +/* $NetBSD: awin_mmc.c,v 1.23 2015/11/14 10:32:40 bouyer Exp $ */ /*- * Copyright (c) 2014 Jared D. McNeill @@ -29,7 +29,7 @@ #include "locators.h" #include -__KERNEL_RCSID(0, "$NetBSD: awin_mmc.c,v 1.22 2015/10/16 14:22:25 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: awin_mmc.c,v 1.23 2015/11/14 10:32:40 bouyer Exp $"); #include #include @@ -380,6 +380,7 @@ awin_mmc_set_clock(struct awin_mmc_softc *sc, u_int freq) clk |= __SHIFTIN(sdly, AWIN_SD_CLK_PHASE_CTR); clk |= AWIN_PLL_CFG_ENABLE; bus_space_write_4(sc->sc_bst, sc->sc_clk_bsh, 0, clk); + delay(20000); return 0; }