mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: denis.osterland@diehl.com
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH] hab: Print events on info command.
Date: Thu, 4 Oct 2018 14:14:57 -0700	[thread overview]
Message-ID: <CAHQ1cqGSwPu-vdVcRZxDj+D9YiXS3NR+079ka9v5wO9sgMa+_Q@mail.gmail.com> (raw)
In-Reply-To: <20181004070400.12338-1-Denis.Osterland@diehl.com>

On Thu, Oct 4, 2018 at 12:05 AM Denis OSTERLAND
<denis.osterland@diehl.com> wrote:
>
> From: Denis Osterland <Denis.Osterland@diehl.com>
>
> This patch calls *_hab_get_status function as part of hab info command.
> This function works only if MMU is disabled.
>
> Signed-off-by: Denis Osterland <Denis.Osterland@diehl.com>
> ---
>  commands/hab.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/commands/hab.c b/commands/hab.c
> index 0d7ee8e76..9027b7cb5 100644
> --- a/commands/hab.c
> +++ b/commands/hab.c
> @@ -72,6 +72,18 @@ static int do_hab(int argc, char *argv[])
>                 else
>                         printf("devel mode\n");
>
> +#ifdef CONFIG_MMU
> +               printf("Disable MMU to access HAB API!\n");
> +#else

Minor suggestion: using IS_ENABLED() might be better since it'll make
the code visible to the compiler regardless of CONFIG_MMU, which might
help better to prevent accidental bitrot (not very likely in this
particular instance, but still).

> +# if defined(CONFIG_ARCH_IMX6)
> +               imx6_hab_get_status();
> +# elif defined(CONFIG_ARCH_IMX28)
> +               imx28_hab_get_status();
> +# elif defined(CONFIG_ARCH_IMX25)
> +               imx25_hab_get_status();
> +# endif

Should this check be done at runtime with cpu_is_*()? I'd imagine that
it would be possible to create a multi-board image that supports both
i.MX25 and and i.MX6.

Thanks,
Andrey Smirnov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2018-10-04 21:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04  7:05 Denis OSTERLAND
2018-10-04 21:14 ` Andrey Smirnov [this message]
2018-10-05  6:58 ` [PATCH v2] " Denis OSTERLAND
2018-10-10  7:51   ` Sascha Hauer
2018-10-10  9:29     ` Denis OSTERLAND
2018-10-12  6:23     ` Marc Kleine-Budde
2018-10-15  8:41       ` Denis OSTERLAND
2018-10-15  8:46         ` Marc Kleine-Budde

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=CAHQ1cqGSwPu-vdVcRZxDj+D9YiXS3NR+079ka9v5wO9sgMa+_Q@mail.gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=denis.osterland@diehl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox