All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gwendal Grignou <gwendal@chromium.org>
To: ulf.hansson@linaro.org, Alex.Lemberg@sandisk.com,
	avi.shchislowski@sandisk.com, yaniv.agman@sandisk.com,
	holgerschurig@gmail.com, chris@printf.net,
	baolin.wang@linaro.org
Cc: linux-mmc@vger.kernel.org
Subject: [PATCH 4/6] mmc: add FFU support to card/block.c
Date: Wed, 13 Apr 2016 15:33:42 -0700	[thread overview]
Message-ID: <1460586824-40688-5-git-send-email-gwendal@chromium.org> (raw)
In-Reply-To: <1460586824-40688-1-git-send-email-gwendal@chromium.org>

From: Grant Grundler <grundler@google.com>

Add special case in MMC_IOC_CMD to process FFU command from mmc tool.
A FFU command is similar to a multi command, but it also require loading
firmware and maybe reset the device.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
---
 drivers/mmc/card/block.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index c543dd9..dd266c0 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -610,6 +610,11 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev,
 		goto cmd_done;
 	}
 
+	if (idata->ic.opcode == MMC_FFU_INVOKE_OP) {
+		err = mmc_ffu_invoke(card, (struct mmc_ffu_args *)idata->buf);
+		goto cmd_done;
+	}
+
 	mmc_get_card(card);
 
 	ioc_err = __mmc_blk_ioctl_cmd(card, md, idata);
-- 
2.8.0.rc3.226.g39d4020


  parent reply	other threads:[~2016-04-13 22:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-13 22:33 [PATCH 0/6] mmc: Add in-kernel firmware upgrade support Gwendal Grignou
2016-04-13 22:33 ` [PATCH 1/6] mmc: core: in _init, exclude FW revision from CID check Gwendal Grignou
2016-04-13 22:33 ` [PATCH 2/6] mmc: core: resecan [EXT_]CSD at card init Gwendal Grignou
2016-04-13 22:33 ` [PATCH 3/6] FROMLIST: mmc: core: Support FFU for eMMC v5.0 Gwendal Grignou
2016-04-14  8:48   ` Ulf Hansson
2016-04-13 22:33 ` Gwendal Grignou [this message]
2016-04-13 23:10   ` [PATCH 4/6] mmc: add FFU support to card/block.c kbuild test robot
2016-04-13 22:33 ` [PATCH 5/6] mmc: ffu: Hack for Hynix eMMC Gwendal Grignou
2016-04-13 22:33 ` [PATCH 6/6] mmc: ffu: Hack for Samsung part Gwendal Grignou

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=1460586824-40688-5-git-send-email-gwendal@chromium.org \
    --to=gwendal@chromium.org \
    --cc=Alex.Lemberg@sandisk.com \
    --cc=avi.shchislowski@sandisk.com \
    --cc=baolin.wang@linaro.org \
    --cc=chris@printf.net \
    --cc=holgerschurig@gmail.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=yaniv.agman@sandisk.com \
    /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.