All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: Mark Kettenis <kettenis@openbsd.org>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	 Tom Rini <trini@konsulko.com>,
	sven@svenpeter.dev, marcan@marcan.st,
	 Bin Meng <bmeng.cn@gmail.com>
Subject: Re: [PATCH 5/8] nvme: Add shutdown function
Date: Fri, 21 Jan 2022 18:40:21 -0700	[thread overview]
Message-ID: <CAPnjgZ0btdcHj6sdqSymHcCyAEOZ_N5=8-Pof5jDFPurvuuftA@mail.gmail.com> (raw)
In-Reply-To: <20220114110438.58452-6-kettenis@openbsd.org>

Hi Mark,

On Fri, 14 Jan 2022 at 04:05, Mark Kettenis <kettenis@openbsd.org> wrote:
>
> 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>
> ---
>  drivers/nvme/nvme.c | 7 +++++++
>  drivers/nvme/nvme.h | 1 +
>  2 files changed, 8 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested on: Macbook Air M1
Tested-by: Simon Glass <sjg@chromium.org>

with change below

>
> diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
> index e2d0f9c668..3b1a5c718f 100644
> --- a/drivers/nvme/nvme.c
> +++ b/drivers/nvme/nvme.c
> @@ -896,3 +896,10 @@ free_queue:
>  free_nvme:
>         return ret;
>  }
> +
> +int nvme_shutdown(struct udevice *udev)
> +{
> +       struct nvme_dev *ndev = dev_get_priv(udev);
> +
> +       return nvme_disable_ctrl(ndev);
> +}
> diff --git a/drivers/nvme/nvme.h b/drivers/nvme/nvme.h
> index 57803b43fd..6e39af8831 100644
> --- a/drivers/nvme/nvme.h
> +++ b/drivers/nvme/nvme.h
> @@ -670,5 +670,6 @@ struct nvme_ops {
>  };
>
>  int nvme_init(struct udevice *udev);
> +int nvme_shutdown(struct udevice *udev);

Please add a comment


>
>  #endif /* __DRIVER_NVME_H__ */
> --
> 2.34.1
>

  reply	other threads:[~2022-01-22  1:40 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-14 11:04 [PATCH 0/8] Apple M1 NVMe storage support Mark Kettenis
2022-01-14 11:04 ` [PATCH 1/8] nvme: Split out PCI support Mark Kettenis
2022-01-22  1:40   ` Simon Glass
2022-01-22 12:47     ` Mark Kettenis
2022-01-22 13:18       ` Simon Glass
2022-01-22 14:57         ` Mark Kettenis
2022-01-14 11:04 ` [PATCH 2/8] mailbox: apple: Add driver for Apple IOP mailbox Mark Kettenis
2022-01-22  1:40   ` Simon Glass
2022-01-22 13:54     ` Mark Kettenis
2022-01-22 17:17       ` Simon Glass
2022-01-14 11:04 ` [PATCH 3/8] arm: apple: Add RTKit support Mark Kettenis
2022-01-22  1:40   ` Simon Glass
2022-01-22 13:59     ` Mark Kettenis
2022-01-22 17:17       ` Simon Glass
2022-01-22 19:31         ` Mark Kettenis
2022-01-14 11:04 ` [PATCH 4/8] nvme: Introduce driver ops Mark Kettenis
2022-01-22  1:40   ` Simon Glass
2022-01-22 13:33     ` Mark Kettenis
2022-01-22 17:17       ` Simon Glass
2022-01-14 11:04 ` [PATCH 5/8] nvme: Add shutdown function Mark Kettenis
2022-01-22  1:40   ` Simon Glass [this message]
2022-01-14 11:04 ` [PATCH 6/8] power: domain: apple: Add reset support Mark Kettenis
2022-01-22  1:40   ` Simon Glass
2022-01-22 14:11     ` Mark Kettenis
2022-01-22 17:17       ` Simon Glass
2022-01-22 19:35         ` Mark Kettenis
2022-01-14 11:04 ` [PATCH 7/8] nvme: apple: Add driver for Apple NVMe storage controller Mark Kettenis
2022-01-22  1:40   ` Simon Glass
2022-01-22 14:45     ` Mark Kettenis
2022-01-22 17:17       ` Simon Glass
2022-01-22 17:41         ` Mark Kettenis
2022-01-22 18:28           ` Simon Glass
2022-01-14 11:04 ` [PATCH 8/8] configs: apple: Add NVMe boot target Mark Kettenis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPnjgZ0btdcHj6sdqSymHcCyAEOZ_N5=8-Pof5jDFPurvuuftA@mail.gmail.com' \
    --to=sjg@chromium.org \
    --cc=bmeng.cn@gmail.com \
    --cc=jh80.chung@samsung.com \
    --cc=kettenis@openbsd.org \
    --cc=marcan@marcan.st \
    --cc=sven@svenpeter.dev \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.