All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ovidiu Panait <ovidiu.panait@windriver.com>
To: u-boot@lists.denx.de
Subject: [PATCH 03/18] common: board_f: Move setup_machine code to setup_bdinfo
Date: Tue, 17 Nov 2020 10:00:44 +0200	[thread overview]
Message-ID: <bf193a96-dc15-be9e-9044-af95cfb41def@windriver.com> (raw)
In-Reply-To: <CAPnjgZ0RHfnj0ugkuio_hPnQEf2YjZCkBiSU0rDSVJmporDs-A@mail.gmail.com>

Hi Simon,

On 14.11.2020 17:17, Simon Glass wrote:
> [Please note this e-mail is from an EXTERNAL e-mail address]
>
> Hi Ovidiu
>
> On Thu, 5 Nov 2020 at 03:10, Ovidiu Panait <ovidiu.panait@windriver.com> wrote:
>> setup_bdinfo is used to populate various bdinfo fields, so move
>> setup_machine code there, as all it does is setting
>> gd->bd->bi_arch_number.
> But you are moving it to reserve_global_data() aren't you? I don't
> like the sound of that.

reserve_global_data() is part of context of the previous diff:

@@ -503,14 +503,6 @@ static int reserve_board(void)
         return 0;
  }

-static int setup_machine(void)
-{
-#ifdef CONFIG_MACH_TYPE
-       gd->bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
-#endif
-       return 0;
-}
-
  static int reserve_global_data(void)
  {
         gd->start_addr_sp = reserve_stack_aligned(sizeof(gd_t));


setup_machine() contents get moved to setup_bdinfo() in the next diff:

@@ -605,6 +597,10 @@ int setup_bdinfo(void)
                 bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE;  /* size  of SRAM */
         }

+#ifdef CONFIG_MACH_TYPE
+       bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
+#endif
+
         return arch_setup_bdinfo();
  }


Ovidiu

>> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
>> ---
>>   common/board_f.c | 13 ++++---------
>>   1 file changed, 4 insertions(+), 9 deletions(-)
>>
>> diff --git a/common/board_f.c b/common/board_f.c
>> index a3c353a4b5..408b95826a 100644
>> --- a/common/board_f.c
>> +++ b/common/board_f.c
>> @@ -503,14 +503,6 @@ static int reserve_board(void)
>>          return 0;
>>   }
>>
>> -static int setup_machine(void)
>> -{
>> -#ifdef CONFIG_MACH_TYPE
>> -       gd->bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
>> -#endif
>> -       return 0;
>> -}
>> -
>>   static int reserve_global_data(void)
>>   {
>>          gd->start_addr_sp = reserve_stack_aligned(sizeof(gd_t));
>> @@ -605,6 +597,10 @@ int setup_bdinfo(void)
>>                  bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE;  /* size  of SRAM */
>>          }
>>
>> +#ifdef CONFIG_MACH_TYPE
>> +       bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
>> +#endif
>> +
>>          return arch_setup_bdinfo();
>>   }
>>
>> @@ -916,7 +912,6 @@ static const init_fnc_t init_sequence_f[] = {
>>          reserve_uboot,
>>          reserve_malloc,
>>          reserve_board,
>> -       setup_machine,
>>          reserve_global_data,
>>          reserve_fdt,
>>          reserve_bootstage,
>> --
>> 2.17.1
>>
> Regards,
> SImon

  reply	other threads:[~2020-11-17  8:00 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05  9:09 [PATCH 00/18] Minor board_f/board_r cleanups Ovidiu Panait
2020-11-05  9:09 ` [PATCH 01/18] common: board_f: Drop initf_console_record wrapper Ovidiu Panait
2020-11-14 15:17   ` Simon Glass
2020-11-05  9:09 ` [PATCH 02/18] common: board_f: Use IS_ENABLED(CONFIG_TIMER_EARLY) in initf_dm Ovidiu Panait
2020-11-14 15:17   ` Simon Glass
2020-11-05  9:09 ` [PATCH 03/18] common: board_f: Move setup_machine code to setup_bdinfo Ovidiu Panait
2020-11-14 15:17   ` Simon Glass
2020-11-17  8:00     ` Ovidiu Panait [this message]
2020-11-18 14:37       ` Simon Glass
2020-11-05  9:09 ` [PATCH 04/18] common: board_f: Use IS_ENABLED(CONFIG_OF_EMBED) in reserve_fdt, reloc_fdt Ovidiu Panait
2020-11-14 15:17   ` Simon Glass
2020-11-05  9:09 ` [PATCH 05/18] common: board_r: Drop initr_console_record wrapper Ovidiu Panait
2020-11-14 15:17   ` Simon Glass
2020-11-05  9:09 ` [PATCH 06/18] common: board_r: Drop initr_secondary_cpu wrapper Ovidiu Panait
2020-11-14 15:17   ` Simon Glass
2020-11-05  9:09 ` [PATCH 07/18] common: board_r: Drop initr_post_backlog wrapper Ovidiu Panait
2020-11-14 15:17   ` Simon Glass
2020-11-05  9:09 ` [PATCH 08/18] common: board_r: Drop initr_pci_ep wrapper Ovidiu Panait
2020-11-14 15:17   ` Simon Glass
2020-11-05  9:09 ` [PATCH 09/18] common: board_r: Drop initr_pci wrapper Ovidiu Panait
2020-11-14 15:17   ` Simon Glass
2020-11-05  9:09 ` [PATCH 10/18] common: board_r: Drop initr_addr_map wrapper Ovidiu Panait
2020-11-14 15:17   ` Simon Glass
2020-11-05  9:09 ` [PATCH 11/18] common: board_r: Drop initr_noncached wrapper Ovidiu Panait
2020-11-14 15:17   ` Simon Glass
2020-11-05  9:09 ` [PATCH 12/18] common: board_r: Drop initr_xen wrapper Ovidiu Panait
2020-11-14 15:17   ` Simon Glass
2020-11-05  9:09 ` [PATCH 13/18] common: board_r: Drop initr_jumptable wrapper Ovidiu Panait
2020-11-14 15:17   ` Simon Glass
2020-11-05  9:09 ` [PATCH 14/18] common: board_r: Drop initr_api wrapper Ovidiu Panait
2020-11-14 15:17   ` Simon Glass
2020-11-05  9:09 ` [PATCH 15/18] common: board_r: Drop initr_bbmii wrapper Ovidiu Panait
2020-11-14 15:17   ` Simon Glass
2020-11-05  9:09 ` [PATCH 16/18] common: board_r: Drop arch-specific ifdefs around initr_trap Ovidiu Panait
2020-11-14 15:17   ` Simon Glass
2020-11-05  9:09 ` [PATCH 17/18] spl: Kconfig: Add SPL dependency to CONFIG_HANDOFF Ovidiu Panait
2020-11-14 15:17   ` Simon Glass
2020-11-05  9:09 ` [PATCH 18/18] global_data: Enable spl_handoff only if CONFIG_HANDOFF is set Ovidiu Panait
2020-11-14 15:17   ` Simon Glass

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=bf193a96-dc15-be9e-9044-af95cfb41def@windriver.com \
    --to=ovidiu.panait@windriver.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 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.