--- zzzz-none-000/linux-4.9.279/drivers/mmc/core/bus.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-atom-6591-750/linux-4.9.279/drivers/mmc/core/bus.c 2023-02-08 11:43:42.000000000 +0000 @@ -10,6 +10,10 @@ * * MMC card bus driver model */ +/* + * Includes Intel Corporation's changes/modifications dated: 2011, 2017, 2018. + * Changed/modified portions - Copyright (c) 2011-2018, Intel Corporation. + */ #include #include @@ -132,6 +136,16 @@ struct mmc_host *host = card->host; int ret; + /* + * When typing 'reboot' on Atom shell, Atom is going down (and turn off + * the eMMC) At the end it notify to the PMC on the reboot request, + * then the PMC notify to the ARM, with RSWARN message, + * then the ARM start the reboot process, but every access + * to eMMC is failing. This work around will not turn off the eMMC + * if the capability is set + */ + if (host->caps2 & MMC_CAP2_NO_SHUTDOWN_BUS) + return; if (dev->driver && drv->shutdown) drv->shutdown(card);