All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Six <mario.six@gdsys.cc>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 03/10] board_f: Add reset status printing
Date: Fri, 4 May 2018 10:10:03 +0200	[thread overview]
Message-ID: <CAN1kZopd-mgGiqqdz4Z3YoS+j4eC_fBhMUOS+u7sQkga=CDH6g@mail.gmail.com> (raw)
In-Reply-To: <CAPnjgZ0M5V7UtqiYNwKHw-u=aX5q65vkqzpFEWLuay7ejzCCsQ@mail.gmail.com>

Hi Simon,

On Thu, May 3, 2018 at 9:01 PM, Simon Glass <sjg@chromium.org> wrote:
> Hi Mario,
>
> On 27 April 2018 at 06:52, Mario Six <mario.six@gdsys.cc> wrote:
>> To print the reset status during boot, add a method print_resetinfo to
>> board_f, which is called in init_sequence_f[], that gets the reset
>> information from the sysreset driver (assuming there is only one seems
>> reasonable), and prints it.
>>
>> Signed-off-by: Mario Six <mario.six@gdsys.cc>
>>
>> ---
>>
>> v1 -> v2:
>> New in v2
>>
>> ---
>>  common/board_f.c | 19 +++++++++++++++++++
>>  1 file changed, 19 insertions(+)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
>
> nit below
>
>>
>> diff --git a/common/board_f.c b/common/board_f.c
>> index ae8bdb7c5c..2df30cd250 100644
>> --- a/common/board_f.c
>> +++ b/common/board_f.c
>> @@ -25,6 +25,7 @@
>>  #include <relocate.h>
>>  #include <spi.h>
>>  #include <status_led.h>
>> +#include <sysreset.h>
>>  #include <timer.h>
>>  #include <trace.h>
>>  #include <video.h>
>> @@ -141,6 +142,21 @@ static int display_text_info(void)
>>         return 0;
>>  }
>>
>> +#ifdef CONFIG_SYSRESET
>> +static int print_resetinfo(void)
>> +{
>> +       struct udevice *dev;
>> +       char status[256];
>> +
>> +       uclass_first_device_err(UCLASS_SYSRESET, &dev);
>
> Should check the result and only call the function below if it is 0.
>

Yes, I found that one myself when I tried to run the sandbox tests again.

Will be fixed in v3.

>> +
>> +       if (!sysreset_get_status(dev, status, sizeof(status)))
>> +               printf("%s", status);
>> +
>> +       return 0;
>> +}
>> +#endif
>> +
>
> Regards,
> Simon

Best regards,
Mario

  reply	other threads:[~2018-05-04  8:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-27 12:52 [U-Boot] [PATCH v2 01/10] ram: Add driver for MPC83xx Mario Six
2018-04-27 12:52 ` [U-Boot] [PATCH v2 02/10] sysreset: Add get_status method Mario Six
2018-05-03 19:01   ` Simon Glass
2018-05-04  8:06     ` Mario Six
2018-04-27 12:52 ` [U-Boot] [PATCH v2 03/10] board_f: Add reset status printing Mario Six
2018-05-03 19:01   ` Simon Glass
2018-05-04  8:10     ` Mario Six [this message]
2018-04-27 12:52 ` [U-Boot] [PATCH v2 04/10] mpc83xx: Add sysreset driver Mario Six
2018-05-03 19:01   ` Simon Glass
2018-04-27 12:52 ` [U-Boot] [PATCH v2 05/10] clk: Add MPC83xx clock driver Mario Six
2018-04-27 12:52 ` [U-Boot] [PATCH v2 06/10] timer: Add MPC83xx timer driver Mario Six
2018-04-30 23:13   ` Simon Glass
2018-05-04  6:19     ` Mario Six
2018-04-27 12:52 ` [U-Boot] [PATCH v2 07/10] common: board_f: Sort includes Mario Six
2018-05-03 19:01   ` Simon Glass
2018-05-03 19:01 ` [U-Boot] [PATCH v2 01/10] ram: Add driver for MPC83xx Simon Glass
2018-05-04  8:04   ` Mario Six
2018-05-04 21:37     ` Simon Glass
2018-05-04 21:57       ` Tom Rini

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='CAN1kZopd-mgGiqqdz4Z3YoS+j4eC_fBhMUOS+u7sQkga=CDH6g@mail.gmail.com' \
    --to=mario.six@gdsys.cc \
    --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.