All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 3/5] spl: dfu: adding dfu support functions for SPL-DFU
Date: Mon, 30 May 2016 07:27:07 +0200	[thread overview]
Message-ID: <574BCF2B.605@denx.de> (raw)
In-Reply-To: <1464356373-8375-4-git-send-email-ravibabu@ti.com>

Hello Ravi,

Am 27.05.2016 um 15:39 schrieb Ravi Babu:
> Adding support functions to run dfu commands
> with support for eMMC/MMC/SD memory device.
>
> Signed-off-by: Ravi Babu <ravibabu@ti.com>
> ---
>   drivers/dfu/dfu.c     |   28 ++++++++++++++++++++++++++++
>   drivers/dfu/dfu_mmc.c |   28 ++++++++++++++++++++++++++++
>   include/dfu.h         |    8 ++++++++
>   3 files changed, 64 insertions(+)
>
> diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
> index 20dfcbb..1d4690b 100644
> --- a/drivers/dfu/dfu.c
> +++ b/drivers/dfu/dfu.c
> @@ -16,6 +16,7 @@
>   #include <hash.h>
>   #include <linux/list.h>
>   #include <linux/compiler.h>
> +#include <environment.h>
>
>   static LIST_HEAD(dfu_list);
>   static int dfu_alt_num;
> @@ -596,3 +597,30 @@ int dfu_write_from_mem_addr(struct dfu_entity *dfu, void *buf, int size)
>
>   	return ret;
>   }
> +
> +int dfu_run_cmd(char *dfu_alt_info, char *dfu_cmd_str)
> +{
> +	char *str_env;
> +	int ret;
> +
> +	/* set default environment */
> +	set_default_env(0);
> +	str_env = getenv(dfu_alt_info);
> +	if (!str_env) {
> +		error("\"dfu_alt_info\" env variable not defined!\n");
> +		return -EINVAL;
> +	}
> +
> +	ret = setenv("dfu_alt_info", str_env);
> +	if (ret) {
> +		error("unable to set env variable \"dfu_alt_info\"!\n");
> +		return -EINVAL;
> +	}

Why you read the Envvariable and store it again?

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

  reply	other threads:[~2016-05-30  5:27 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-27 13:39 [U-Boot] [RFC PATCH 0/5] SPL: DFU Support in SPL Ravi Babu
2016-05-27 13:39 ` [U-Boot] [RFC PATCH 1/5] spl: dfu: add dfu support " Ravi Babu
2016-05-30 11:54   ` Lukasz Majewski
2016-05-30 13:43     ` B, Ravi
2016-05-30 14:59       ` Lukasz Majewski
2016-05-31  6:39         ` B, Ravi
2016-05-31  8:39           ` Lukasz Majewski
2016-05-31  9:04             ` B, Ravi
2016-05-31  9:55               ` Lukasz Majewski
2016-05-31 10:34                 ` B, Ravi
2016-05-31 12:47                   ` Lukasz Majewski
2016-05-31 13:31                     ` B, Ravi
2016-05-31 15:13                       ` Lukasz Majewski
2016-06-02 12:39                         ` B, Ravi
2016-06-02 14:14                           ` Lukasz Majewski
2016-06-02 14:22                             ` B, Ravi
2016-06-03  9:27                               ` Lukasz Majewski
2016-06-03 11:35                                 ` B, Ravi
2016-06-03 11:45                                   ` Lukasz Majewski
2016-05-27 13:39 ` [U-Boot] [RFC PATCH 2/5] spl: dfu: fs: adding ext4/fat filesystem support for SPL-DFU Ravi Babu
2016-05-30 11:59   ` Lukasz Majewski
2016-05-30 12:52     ` B, Ravi
2016-05-30 13:20       ` Lukasz Majewski
2016-05-30 13:52         ` B, Ravi
2016-05-27 13:39 ` [U-Boot] [RFC PATCH 3/5] spl: dfu: adding dfu support functions " Ravi Babu
2016-05-30  5:27   ` Heiko Schocher [this message]
2016-05-30 12:04   ` Lukasz Majewski
2016-05-30 12:49     ` B, Ravi
2016-05-27 13:39 ` [U-Boot] [RFC PATCH 4/5] dfu: spl: add generic spl-dfu function in common-spl Ravi Babu
2016-05-30 12:07   ` Lukasz Majewski
2016-05-27 13:39 ` [U-Boot] [RFC PATCH 5/5] dra7x: spl: dfu: adding SPL-DFU support for dra7x platform Ravi Babu
2016-05-30 12:19   ` Lukasz Majewski
2016-05-27 13:42 ` [U-Boot] [RFC PATCH 0/5] SPL: DFU Support in SPL Marek Vasut

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=574BCF2B.605@denx.de \
    --to=hs@denx.de \
    --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.