From owner-svn-src-all@freebsd.org Thu Aug 27 16:24:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7C819C411E; Thu, 27 Aug 2015 16:24:31 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8C16E81; Thu, 27 Aug 2015 16:24:31 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7RGOVqL031699; Thu, 27 Aug 2015 16:24:31 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7RGOV3l031698; Thu, 27 Aug 2015 16:24:31 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201508271624.t7RGOV3l031698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 27 Aug 2015 16:24:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287213 - head/sys/dev/mmc/host X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2015 16:24:31 -0000 Author: andrew Date: Thu Aug 27 16:24:30 2015 New Revision: 287213 URL: https://svnweb.freebsd.org/changeset/base/287213 Log: Limit the speed to the bus frequency. Sponsored by: ABT Systems Ltd Modified: head/sys/dev/mmc/host/dwmmc.c Modified: head/sys/dev/mmc/host/dwmmc.c ============================================================================== --- head/sys/dev/mmc/host/dwmmc.c Thu Aug 27 16:18:22 2015 (r287212) +++ head/sys/dev/mmc/host/dwmmc.c Thu Aug 27 16:24:30 2015 (r287213) @@ -651,7 +651,7 @@ dwmmc_attach(device_t dev) WRITE4(sc, SDMMC_CTRL, SDMMC_CTRL_INT_ENABLE); sc->host.f_min = 400000; - sc->host.f_max = 200000000; + sc->host.f_max = min(200000000, sc->bus_hz); sc->host.host_ocr = MMC_OCR_320_330 | MMC_OCR_330_340; sc->host.caps = MMC_CAP_4_BIT_DATA;