From owner-freebsd-arm@FreeBSD.ORG Thu Apr 16 22:32:06 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A48A3566 for ; Thu, 16 Apr 2015 22:32:06 +0000 (UTC) Received: from mail-wg0-x230.google.com (mail-wg0-x230.google.com [IPv6:2a00:1450:400c:c00::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 37A39A2 for ; Thu, 16 Apr 2015 22:32:06 +0000 (UTC) Received: by wgin8 with SMTP id n8so95765061wgi.0 for ; Thu, 16 Apr 2015 15:32:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=EBg8GCTK/zG03QxGLGUojZFV37eTwBh782pwSmiODHE=; b=nsLUDhDRr2s2YhuSji7FFF1cK9u9EFodEc7/sIPIYjXD32KmvU9H52/mKjwXrA2uSQ T5yVBFqUlViCKpp8MtpZLAs+Vq1FVjfVEEC3mXcKUdUenlh6mx2AaLGDAR5flntUSIuO oPb1bUhAzo03VZCLgSaDCDddKgEnSszD5XZpWHicb2rjIIKzOGZhXLYIPtca8YpOA9bp hJjkiL4LJ78lG7eRvhPMIGaygyg+79fC2q2Ckt0ADNztAUbH2W4xbB99yjB638DwKQPE nVEYYhk645Y/o1uUbkufD3otoef//IbLfVdRzgHMU4POs8Fhscrj4y1YB5tRp3Osd2sg ml+Q== MIME-Version: 1.0 X-Received: by 10.180.82.41 with SMTP id f9mr8866194wiy.48.1429223524813; Thu, 16 Apr 2015 15:32:04 -0700 (PDT) Received: by 10.180.195.106 with HTTP; Thu, 16 Apr 2015 15:32:04 -0700 (PDT) In-Reply-To: References: <6970CFB2-6347-4BAF-BA24-56196C33C3BC@nimrev.com> <37983D60-3AD9-4DEC-A1D8-4E65BABE3066@nimrev.com> Date: Thu, 16 Apr 2015 19:32:04 -0300 Message-ID: Subject: Re: mmc/sd driver testing. From: Luiz Otavio O Souza To: Alexander Fedorov Cc: Bas Vermin , "freebsd-arm@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Apr 2015 22:32:06 -0000 On 16 April 2015 at 18:41, Alexander Fedorov wrote: > Hello! > > If it helps, I've updated my patch to CURRENT r281599. > > These are the changes from the previous version: > - Style fixes, suggested by Ian. > - Speed improovment (reading from 2 MB/s to 5-6 MB/s, writing from 0.8 > to 1.5 MB/s). > - Use bus_space_write_multi_4/bus_space_read_multi_4 for large blocks. > - Multiblock I/O support. I did a few changes to your driver and now I need some help with testing (I have tested only on Cubieboard2 so far). The changes include: - better error handling on mmc_acquire_host(); - Removed the busy loops from interrupt handler; - Use PLL6 as the clock source for MMC/SD (from netbsd); - Simplified interrupt handling - always unmasked and enabled (from netbsd); - Style(9) fixes. Please, try it and report if you find a bug, they are certainly there! Luiz http://loos.com.br/allwinner/a10_mmc.diff http://loos.com.br/allwinner/files.allwinner.diff http://loos.com.br/allwinner/kernel-conf.diff http://loos.com.br/allwinner/sunxi-dts.diff > > Some simple tests: # dd if=/dev/mmcsd0s2 of=/dev/null bs=32k count=4k 4096+0 records in 4096+0 records out 134217728 bytes transferred in 9.150424 secs (14667924 bytes/sec) # dd if=/dev/zero of=test bs=16k count=1k 1024+0 records in 1024+0 records out 16777216 bytes transferred in 3.984687 secs (4210423 bytes/sec) > > ### Read test #### > # dd if=/dev/mmcsd0s2 of=/dev/null bs=4k count=4k > 4096+0 records in > 4096+0 records out > 16777216 bytes transferred in 4.438201 secs (3780184 bytes/sec) > root@:~ # dd if=/dev/mmcsd0s2 of=/dev/null bs=8k count=4k > 4096+0 records in > 4096+0 records out > 33554432 bytes transferred in 5.514032 secs (6085281 bytes/sec) > root@:~ # dd if=/dev/mmcsd0s2 of=/dev/null bs=16k count=4k > 4096+0 records in > 4096+0 records out > 67108864 bytes transferred in 10.341467 secs (6489299 bytes/sec) > root@:~ # dd if=/dev/mmcsd0s2 of=/dev/null bs=32k count=4k > 4096+0 records in > 4096+0 records out > 134217728 bytes transferred in 19.956929 secs (6725370 bytes/sec) > root@:~ # > > ### Write test #### > root@:~ # dd if=/dev/zero of=test bs=8k count=4k > 4096+0 records in > 4096+0 records out > 33554432 bytes transferred in 21.556914 secs (1556551 bytes/sec) > root@:~ # dd if=/dev/zero of=test bs=32k count=1k > 1024+0 records in > 1024+0 records out > 33554432 bytes transferred in 26.035960 secs (1288773 bytes/sec) > root@:~ # dd if=/dev/zero of=test bs=4k count=1k > 1024+0 records in > 1024+0 records out > 4194304 bytes transferred in 4.173082 secs (1005085 bytes/sec) > root@:~ # rm test > root@:~ # dd if=/dev/zero of=test bs=16k count=1k > 1024+0 records in > 1024+0 records out > 16777216 bytes transferred in 8.148621 secs (2058902 bytes/sec) > root@:~ # >