]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mmc: core: Read the SD function extension registers for power management
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 4 May 2021 16:12:20 +0000 (18:12 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 24 May 2021 13:12:29 +0000 (15:12 +0200)
commitcae548d9c8141c38e84a91a4d67ca289a30d7d7e
tree8909edc04fc7342e63fc7a671d2fcec3b2c6cdc8
parent4ab3e75dbd65da117d691d0e12d5f74e061d5270
mmc: core: Read the SD function extension registers for power management

In the SD spec v4.0 the CMD48/49 and CMD58/59 were introduced as optional
commands. In the SD spec v4.1 the SD function extension registers were
introduced, which requires support for CMD48/49/58/59 to be read/written
from/to.

Moreover, a specific function extension register were added to let the card
announce support for optional features in regards to power management. The
features that were added are "Power Off Notification", "Power Down Mode"
and "Power Sustenance".

As a first step to support this, let's read and parse the register for
power management during the SD card initialization and store the
information about the supported features in the struct mmc_card. In this
way, we prepare for subsequent changes to implement the complete support
for the new features.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Acked-by: Avri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20210504161222.101536-10-ulf.hansson@linaro.org
drivers/mmc/core/sd.c
include/linux/mmc/card.h
include/linux/mmc/sd.h