]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r292180 (partial), r297127 (partial), r311911, r311923, r312939,
authormarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 11 May 2017 21:01:02 +0000 (21:01 +0000)
committermarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 11 May 2017 21:01:02 +0000 (21:01 +0000)
commit4b2f3989c028365201afccd9865fa38fb4dbe971
treeb7fa73d84826e78becd01ea18e768cb6a06d12cf
parentbf166f0b5e0f2e95dfe7a2aa068a52448b72a087
MFC: r292180 (partial), r297127 (partial), r311911, r311923, r312939,
     r313250, r313712, r314811 (partial), r314887 (partial), r315430,
     r317981, r315466

o 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.

o Add ACPI platform support for SDHCI driver.

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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@318198 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
31 files changed:
UPDATING
etc/mtree/BSD.include.dist
include/Makefile
sys/arm/at91/at91_mci.c
sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
sys/arm/freescale/imx/imx_sdhci.c
sys/arm/lpc/lpc_mmc.c
sys/arm/ti/ti_sdhci.c
sys/conf/files
sys/dev/mmc/bridge.h
sys/dev/mmc/mmc.c
sys/dev/mmc/mmc_ioctl.h [new file with mode: 0644]
sys/dev/mmc/mmc_private.h [new file with mode: 0644]
sys/dev/mmc/mmc_subr.c [new file with mode: 0644]
sys/dev/mmc/mmc_subr.h [new file with mode: 0644]
sys/dev/mmc/mmcbr_if.m
sys/dev/mmc/mmcbrvar.h
sys/dev/mmc/mmcreg.h
sys/dev/mmc/mmcsd.c
sys/dev/mmc/mmcvar.h
sys/dev/sdhci/sdhci.c
sys/dev/sdhci/sdhci.h
sys/dev/sdhci/sdhci_acpi.c [new file with mode: 0644]
sys/dev/sdhci/sdhci_fdt.c
sys/dev/sdhci/sdhci_if.m
sys/dev/sdhci/sdhci_pci.c
sys/modules/Makefile
sys/modules/mmc/Makefile
sys/modules/sdhci_acpi/Makefile [new file with mode: 0644]
sys/powerpc/mpc85xx/fsl_sdhc.c
sys/sys/param.h