public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Eric Nelson <eric.nelson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] common/cmd_rsmode.c: add imx reset mode command
Date: Sun, 27 May 2012 10:33:24 -0700	[thread overview]
Message-ID: <4FC26564.3090003@boundarydevices.com> (raw)
In-Reply-To: <1338066111-5835-1-git-send-email-troy.kisky@boundarydevices.com>

Hi Troy,

Nitpicks below.

On 05/26/2012 02:01 PM, Troy Kisky wrote:
> This is useful for forcing the ROM's
> usb downloader to activate upon a watchdog reset.
> Or, you can boot from either SD Card.
>
> Currently, support added for MX53 and MX6Q
> Signed-off-by: Troy Kisky<troy.kisky@boundarydevices.com>
>
> Note: MX53 support untested.
> ---
>   arch/arm/include/asm/arch-mx5/imx-regs.h |   18 +++++
>   arch/arm/include/asm/arch-mx6/imx-regs.h |   21 +++++
>   common/Makefile                          |    1 +
>   common/cmd_rsmode.c                      |  118 ++++++++++++++++++++++++++++++
>   4 files changed, 158 insertions(+), 0 deletions(-)
>   create mode 100644 common/cmd_rsmode.c
>
>
 > <snip>
 >
> diff --git a/common/Makefile b/common/Makefile
> index d9f10f3..8e17cec 100644
> --- a/common/Makefile
> +++ b/common/Makefile
> @@ -139,6 +139,7 @@ COBJS-$(CONFIG_CMD_PORTIO) += cmd_portio.o
>   COBJS-$(CONFIG_CMD_PXE) += cmd_pxe.o
>   COBJS-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o
>   COBJS-$(CONFIG_CMD_REISER) += cmd_reiser.o
> +COBJS-$(CONFIG_CMD_RSMODE) += cmd_rsmode.o
>   COBJS-$(CONFIG_CMD_SATA) += cmd_sata.o
>   COBJS-$(CONFIG_CMD_SF) += cmd_sf.o
>   COBJS-$(CONFIG_CMD_SCSI) += cmd_scsi.o

Since this code is very machine-specific, should this code
go into the board/freescale/common/ or
arch/arm/cpu/armv7/imx-common/ directory?

> diff --git a/common/cmd_rsmode.c b/common/cmd_rsmode.c
> new file mode 100644
>
 > <snip>
 >
> +int do_rsmode(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
> +{
> +	int i;
> +	if (argc<  2) {
> +options:
> +		printf("Options:\n");
> +		for (i = 0; i<  ARRAY_SIZE(modes); i++)
> +			printf("%s\n", modes[i].name);

A leading tab here will make the output easier to parse:

U-Boot> rsmode
Options:
usb
sata

U-Boot> rsmode
Options:
	usb
	sata
	ecspi.0
	...

> +		return 0;
> +	}
> +	for (i = 0; i<  ARRAY_SIZE(modes); i++) {
> +		if (!strcmp(modes[i].name, argv[1]))
> +			break;
> +	}

  parent reply	other threads:[~2012-05-27 17:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-26 21:01 [U-Boot] [PATCH 1/3] common/cmd_rsmode.c: add imx reset mode command Troy Kisky
2012-05-26 21:01 ` [U-Boot] [PATCH 2/3] mx6qsabrelite: select CONFIG_CMD_RSMODE Troy Kisky
2012-05-26 21:01 ` [U-Boot] [PATCH 3/3] mx53evk: " Troy Kisky
2012-05-27  6:04 ` [U-Boot] [PATCH 1/3] common/cmd_rsmode.c: add imx reset mode command Dirk Behme
2012-05-27 17:16   ` Eric Nelson
2012-05-28 17:36     ` Dirk Behme
2012-05-29 14:25       ` Eric Nelson
2012-06-04 19:52         ` Wolfgang Denk
2012-06-04 20:16           ` Eric Nelson
2012-06-21 20:57             ` Wolfgang Denk
2012-06-22 16:04               ` Eric Nelson
2012-07-11  6:32                 ` Dirk Behme
2012-07-11 18:01                   ` Troy Kisky
2012-07-11 18:44                     ` Dirk Behme
2012-05-27 17:33 ` Eric Nelson [this message]
2012-06-04 19:46 ` Wolfgang Denk
2012-06-04 20:43   ` Troy Kisky

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=4FC26564.3090003@boundarydevices.com \
    --to=eric.nelson@boundarydevices.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox