public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jason Liu <liu.h.jason@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] mx5: drop boot cause code from board support code
Date: Fri, 22 Apr 2011 16:34:39 +0800	[thread overview]
Message-ID: <BANLkTimFzTA2FSORc5ETRra2XPRWZ8JOeg@mail.gmail.com> (raw)
In-Reply-To: <4DB128FF.6050502@denx.de>

Hi, Stefano,

2011/4/22 Stefano Babic <sbabic@denx.de>:
> On 04/22/2011 07:45 AM, Jason Hui wrote:
>> Hi, Stefano,
>
> Hi Jason,
>
>>>> ?int checkboard(void)
>>>> ?{
>>>> ? ? ? u32 system_rev = get_cpu_rev();
>>>> - ? ? u32 cause;
>>>> - ? ? struct src *src_regs = (struct src *)SRC_BASE_ADDR;
>>>
>>> This seems to me not the best solution. If we have now factored out code
>>> to print the reset cause and the silicon version (inside print_cpuinfo),
>>> why do we need to repeat this code for each board ? Calling get_cpu_rev
>>> seems to me redundant (then each board should only set
>>> CONFIG_DISPLAY_CPUINFO). And then the CPU revision is printed again, and
>>> this is redundant.
>>
>> The purpose for this patch is to remove the boot cause code and and don't change
>> any cpu rev code. The cpu rev part of code is as it is as before.
>
> However, it seems to me a half-way clean up. As we have already
> factorize function for printing the cpu revision and the reset cause, I
> will see in the checkboard only board related information. If there is
> no revision number for board, printing only the board name as you make
> for the LOCO is correct.
>
> Taking as example the efika board (all boards make the same):
>
>>
>>>
>>>>
>>>> ? ? ? puts("Board: Efika MX ");
>>>>
>>>> ? ? ? switch (system_rev & 0xff) {
>
> The only new information is the board name. If I am not wrong,
> system_rev & 0xff contains only the cpu revision, and the switch prints
> out the silicon version. Everything already done in print_cpuinfo as well.
>
>>
>> Ditto, as I only remove the boot cause part of code as the patch tile said.
>
> Yes, but this it is redundant with the print_cpuinfo(). As you plan to
> clean up the code, this part should be cleaned up as well. Or do you
> think there is something not covered by the common code ?
>
>>> I think we need more clean up, removing all part related to CPU revision
>>> and leaving (if any) only the output related to the board revision.
>>
>> If that, I need change the patch tile, and include more clean up in the patch
>> and send again.
>
> Agree.

OK, I will re-send the patch with more clean-up.

Jason

>
> Best regards,
> Stefano Babic
>
> --
> =====================================================================
> DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 ?Email: office at denx.de
> =====================================================================
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>

      reply	other threads:[~2011-04-22  8:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-20 10:47 [U-Boot] [PATCH 1/1] mx5: drop boot cause code from board support code Jason Liu
2011-04-20 10:47 ` [U-Boot] [PATCH V5 1/2] MX5: factor out boot cause funciton to common code Jason Liu
2011-04-21 17:53   ` Stefano Babic
2011-04-20 10:47 ` [U-Boot] [PATCH V5 2/2] MX53: support for freescale MX53LOCO board Jason Liu
2011-04-21 17:43   ` Stefano Babic
2011-04-21 23:24     ` Wolfgang Denk
2011-04-22  4:36     ` Jason Hui
2011-04-22  5:10       ` Jason Hui
2011-04-22  6:57       ` Stefano Babic
2011-04-22  8:33         ` Jason Liu
2011-04-22  9:11           ` Stefano Babic
2011-04-22 12:45           ` Wolfgang Denk
2011-04-22 13:18             ` Jason Liu
2011-04-21 17:18 ` [U-Boot] [PATCH 1/1] mx5: drop boot cause code from board support code Stefano Babic
2011-04-22  5:45   ` Jason Hui
2011-04-22  7:06     ` Stefano Babic
2011-04-22  8:34       ` Jason Liu [this message]

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=BANLkTimFzTA2FSORc5ETRra2XPRWZ8JOeg@mail.gmail.com \
    --to=liu.h.jason@gmail.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