nvme: Add shutdown function
authorMark Kettenis <kettenis@openbsd.org>
Sat, 22 Jan 2022 19:38:16 +0000 (20:38 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 10 Feb 2022 21:44:23 +0000 (16:44 -0500)
commitca99a17e02ab4f99b1455be349858d5a7aa7553c
treed4e31a46d0642abcf85603c3bd818122181dd4ef
parent19d9dad39c28a6e932ee2ec8361f42211613761d
nvme: Add shutdown function

Add a function to disable the NVMe controller. This will be used
to let the driver for the NVMe storage integrated on Apple SoCs
shutdown the NVMe controller such we can shutdown the NVMe
IOP controller in a clean way afterwards before handing control
to the OS.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested on: Macbook Air M1
Tested-by: Simon Glass <sjg@chromium.org>
drivers/nvme/nvme.c
drivers/nvme/nvme.h