Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Dec 2014 02:07:45 +0000
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
Message-ID:  <bug-196081-7@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-196081-7>