318197 |
11-May-2017 |
marius |
MFC: r312939, r313250, r314811 (partial), r314887 (partial), r315760, r315845, 315430, r317981, r315466
o Fix some overly long lines, whitespace and other bugs according to style(9) as well as spelling etc. in mmc(4), mmcsd(4) and sdhci(4).
o In the mmc(4) bridges and sdhci(4) (bus) front-ends: - Remove redundant assignments of the default bus_generic_print_child device method, - use DEVMETHOD_END, - use NULL instead of 0 for pointers.
o Trim/adjust includes.
o Add and use a MMC_DECLARE_BRIDGE macro for declaring mmc(4) bridges as kernel drivers and their dependency onto mmc(4).
o Add support for eMMC "partitions". Besides the user data area, i. e. the default partition, eMMC v4.41 and later devices can additionally provide up to: 1 enhanced user data area partition 2 boot partitions 1 RPMB (Replay Protected Memory Block) partition 4 general purpose partitions (optionally with a enhanced or extended attribute)
Besides simply subdividing eMMC devices, some Intel NUCs having UEFI code in the boot partitions etc., another use case for the partition support is the activation of pseudo-SLC mode, which manufacturers of eMMC chips typically associate with the enhanced user data area and/ or the enhanced attribute of general purpose partitions.
CAVEAT EMPTOR: Partitioning eMMC devices is a one-time operation.
o Now that properly issuing CMD6 is crucial (so data isn't written to the wrong partition for example), make a step into the direction of correctly handling the timeout for these commands in the MMC layer. Also, do a SEND_STATUS when CMD6 is invoked with an R1B response as recommended by relevant specifications.
o Add an IOCTL interface to mmcsd(4); this is sufficiently compatible with Linux so that the GNU mmc-utils can be ported to and used with FreeBSD (note that due to the remaining deficiencies outlined above SANITIZE operations issued by/with `mmc` currently most likely will fail). These latter have been added to ports as sysutils/mmc-utils. Among others, the `mmc` tool of mmc-utils allows for partitioning eMMC devices (tested working).
o For devices following the eMMC specification v4.41 or later, year 0 is 2013 rather than 1997; so correct this for assembling the device ID string properly.
o Let mmcsd.ko depend on mmc.ko. Additionally, bump MMC_VERSION as at least for some of the above a matching pair is required.
o In the ACPI front-end of sdhci(4) describe the Intel eMMC and SDXC controllers as such in order to match the PCI one. Additionally, in the entry for the 80860F14 SDXC controller remove the eMMC-only SDHCI_QUIRK_INTEL_POWER_UP_RESET. |
302408 |
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
299679 |
13-May-2016 |
andrew |
Add DMA sync operations around accessing the dwmmc descriptor ring. Even with it maps as cache-coherent we still need to call bus_dmamap_sync.
Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation
|
298646 |
26-Apr-2016 |
pfg |
sys/dev: extend use of the howmany() macro when available.
We have a howmany() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read.
|
297793 |
10-Apr-2016 |
pfg |
Cleanup unnecessary semicolons from the kernel.
Found with devel/coccinelle.
|
297127 |
21-Mar-2016 |
ian |
Fix fallout from r292180 (Dec 2015)... ensure that every driver which has a DRIVER_MODULE() referencing mmc_driver has a MODULE_DEPEND() on mmc. This is because the kernel linker only searches for symbols in dependent modules, so loading sdhci_pci (and other bus-flavors of sdhci) would fail when mmc was not compiled into the kernel (even if you hand-loaded mmc first).
(Thanks to jilles@ for providing the vital clue about the kernel linker.)
|
292180 |
14-Dec-2015 |
ian |
Move the DRIVER_MODULE() statements that declare mmc(4) to be a child of the various bridge drivers out of dev/mmc.c and into the bridge drivers.
Requested by: jhb (almost two years ago; better late than never)
|
287371 |
01-Sep-2015 |
andrew |
Add support for the DesignWare MMC hardware in the HiSilicon hi6220. This SoC is used in the HiKey board from 96boards.
Currently on the SD card is working on the HiKey, as such devices 0 and 2 will need to be disabled, for example by adding the following to loader.conf:
hint.hisi_dwmmc.0.disabled=1 hint.hisi_dwmmc.2.disabled=1
Relnotes: yes (Hikey board booting) Sponsored by: ABT Systems Ltd
|
287367 |
01-Sep-2015 |
andrew |
Finish allowing the dwmmc driver to be subclassed, move the softc to a new header, along with the hwtype enum, device attach prototype, and driver_t.
Sponsored by: ABT Systems Ltd
|
287356 |
01-Sep-2015 |
andrew |
Remove an variable we only ever write to, and stop assigning 0 to values in the softc as it's the default value. The latter helps with subclassing this driver.
Sponsored by: ABT Systems Ltd
|
287258 |
28-Aug-2015 |
andrew |
Move dwmmc.h to dwmmc_reg.h. This is in preperation for adding support to subclass the dwmmc driver to allow SoC specific attachments.
Sponsored by: ABT Systems Ltd
|
287250 |
28-Aug-2015 |
andrew |
Only check for the bus frequency if it has not already been set, for example through a driver running as a subclass of this.
Sponsored by: ABT Systems Ltd
|
287214 |
27-Aug-2015 |
andrew |
There is no need to get the bus tag or handle.
Sponsored by: ABT Systems Ltd
|
287213 |
27-Aug-2015 |
andrew |
Limit the speed to the bus frequency.
Sponsored by: ABT Systems Ltd
|
287212 |
27-Aug-2015 |
andrew |
Allow the fifo-depth and num-slots to be missing. For the former we read the value from the hardware, for the latter assume a single slot.
Sponsored by: ABT Systems Ltd
|
287202 |
27-Aug-2015 |
andrew |
Allow us to select the transfer count. This allows us to work with hardware that seems to only work with a single block at a time.
Sponsored by: ABT Systems Ltd
|
287161 |
26-Aug-2015 |
andrew |
Only access the Samsung registers when targeting Samsung hardware.
Sponsored by: ABT Systems Ltd
|
286408 |
07-Aug-2015 |
andrew |
Attach dwmmc to the ofwbus, som devicetrees place it here.
Sponsored by: ABT Systems Ltd
|
286407 |
07-Aug-2015 |
andrew |
Stop including machine/fdt.h, it's unneeded, and purposefully unimplemented on arm64.
Sponsored by: ABT Systems Ltd
|
277413 |
20-Jan-2015 |
ganbold |
Enable Synopsys DesignWare Mobile Storage Host Controller driver on Rockchip boards. It currently supports PIO mode and dma mode needs external dma controller to be used.
Submitted by: jmcneill Approved by: stas (mentor)
|
272736 |
08-Oct-2014 |
br |
Always wait 'command done' interrupt status bit before proceeding next command.
Sponsored by: DARPA, AFRL
|
272712 |
07-Oct-2014 |
br |
Add driver for Synopsys DesignWare Mobile Storage Host Controller.
Sponsored by: DARPA, AFRL
|