From owner-freebsd-arm@FreeBSD.ORG Thu Dec 18 02:07:46 2014 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 F24E0509 for ; Thu, 18 Dec 2014 02:07:45 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 D5531395 for ; Thu, 18 Dec 2014 02:07:45 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sBI27jsL083861 for ; Thu, 18 Dec 2014 02:07:45 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 196081] New: [PATCH] ARM: sunxi: Add driver for the MMC/SD host found in the Allwinner A10 SoC Date: Thu, 18 Dec 2014 02:07:45 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: omgalvan.86@gmail.com X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc flagtypes.name attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2014 02:07:46 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196081 Bug ID: 196081 Summary: [PATCH] ARM: sunxi: Add driver for the MMC/SD host found in the Allwinner A10 SoC Product: Base System Version: 11.0-CURRENT Hardware: arm OS: Any Status: New Severity: Affects Many People Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: omgalvan.86@gmail.com CC: ganbold@freebsd.org, gonzo@FreeBSD.org, ian@FreeBSD.org, imp@FreeBSD.org Attachment #150704 maintainer-approval?(imp@FreeBSD.org), Flags: maintainer-approval?(ian@FreeBSD.org) Created attachment 150704 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=150704&action=edit sunxi MMC/SD device driver This is the device driver for the SD/MMC host controller found in Allwinner A10 SoCs. The original driver was written by Alexander Fedorov back in October 2013; however that version was lacking some features and had a couple of bugs that caused the kernel to panic when trying to boot. This version aims to correct those mistakes, as well as serving as a sort of documentation on this particular host, since the Allwinner datasheet is only available in Chinese language and one has to sign an NDA in order to get it. Most of the work consisted in reverse-engineering the Linux and U-Boot drivers. Some of the registers and the DMA scheme used by this host are similar to the ones on the Synopsys Designware SD Host Controller and the Altera Arria V family of SoCs; as such we based some of our work on the datasheets for those hosts. Right now the driver supports multiblock programmed I/O only. While that gives us a fairly decent performance, ideally we should add support for DMA. We already have a version which can perform DMA transfers, however we noticed the transferred data always ends up being corrupted. I'll be sending the DMA version after this one is reviewed an commited. We left Alexander's name in the driver's copyright header as it's fair since he wrote the first version. We also made some changes to other files besides a10_mmc.c and a10_mmcreg.h; as those changes were relatively minor we didn't think it was necessary for us to include our names in the header. As this is our first contribution to the project, any feedback is more than welcome. So far we've tested it with a few different microSD cards; it would be great if anyone could try using an actual MMC card. -- You are receiving this mail because: You are the assignee for the bug.