All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ley Foon Tan <lftan.linux@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 2/4] arm: socfpga: Convert reset manager from struct to defines
Date: Thu, 7 Nov 2019 16:41:03 +0800	[thread overview]
Message-ID: <CAFiDJ5-eCMrJVMofHyf0WnYM-4qeD4qypmYeynAGVBE6f4b5jg@mail.gmail.com> (raw)
In-Reply-To: <cd0962be-8e65-4e94-ecc0-e3da373fc197@denx.de>

On Thu, Nov 7, 2019 at 4:33 PM Marek Vasut <marex@denx.de> wrote:
>
> On 11/7/19 9:06 AM, Ley Foon Tan wrote:
> > On Thu, Nov 7, 2019 at 10:49 AM Marek Vasut wrote:
> >>
> >> On 11/7/19 3:10 AM, Ley Foon Tan wrote:
> >>> Convert reset manager for Gen5, Arria 10 and Stratix 10 from struct
> >>> to defines.
> >>>
> >>> Change to get reset manager base address from DT node instead of using
> >>> #define.
> >>
> >> It seems the patch also moves spl_early_init() around ?
> > Yes, because spl_early_init() initialize DT stuff, so it needs to be
> > called before we get base address from DT.
>
> That really should be documented in the commit message though.
Okay.
>
> [...]
>
> >>> +void socfpga_get_manager_addr(void)
> >>
> >> You should rename this function, a lot of blocks on the Gen5 are called
> >> <something>-manager .
> > Okay, will change it something like socfpga_get_base_addr().
>
> If it's only used to retrieve the reset manager base, then it should say
> so in the function name.
socfpga_get_manager_addr() function will get base address for clkmgr,
rstmgr and sysmgr, not only reset manger.

>
> >>> +{
> >>> +     socfpga_rstmgr_base = socfpga_get_base_addr("altr,rst-mgr");
> >>> +     if (!socfpga_rstmgr_base)
> >>> +             hang();
> >>> +}
>
> [...]
>
> >>> diff --git a/arch/arm/mach-socfpga/spl_s10.c b/arch/arm/mach-socfpga/spl_s10.c
> >>> index ec65e1ce64..9a97a84e1e 100644
> >>> --- a/arch/arm/mach-socfpga/spl_s10.c
> >>> +++ b/arch/arm/mach-socfpga/spl_s10.c
> >>> @@ -14,6 +14,7 @@
> >>>  #include <asm/arch/clock_manager.h>
> >>>  #include <asm/arch/firewall_s10.h>
> >>>  #include <asm/arch/mailbox_s10.h>
> >>> +#include <asm/arch/misc.h>
> >>>  #include <asm/arch/reset_manager.h>
> >>>  #include <asm/arch/system_manager.h>
> >>>  #include <watchdog.h>
> >>> @@ -120,6 +121,12 @@ void board_init_f(ulong dummy)
> >>>       const struct cm_config *cm_default_cfg = cm_get_default_config();
> >>>       int ret;
> >>>
> >>> +     ret = spl_early_init();
> >>> +     if (ret)
> >>> +             hang();
> >>> +
> >>> +     socfpga_get_manager_addr();
> >>> +
> >>>  #ifdef CONFIG_HW_WATCHDOG
> >>>       /* Ensure watchdog is paused when debugging is happening */
> >>>       writel(SYSMGR_WDDBG_PAUSE_ALL_CPU, &sysmgr_regs->wddbg);
> >>> @@ -145,11 +152,6 @@ void board_init_f(ulong dummy)
> >>>       socfpga_per_reset(SOCFPGA_RESET(UART0), 0);
> >>>       debug_uart_init();
> >>>  #endif
> >>> -     ret = spl_early_init();
> >>> -     if (ret) {
> >>> -             debug("spl_early_init() failed: %d\n", ret);
> >>> -             hang();
> >>> -     }
> >>>
> >>>       preloader_console_init();
> >>>       cm_print_clock_quick_summary();
> >>
> >> Are these three hunks above really supposed to be in this patch ?
> > Yes, as explained earlier,  spl_early_init() need to be called before
> > get base address from DT.
>
> OK, please just add it into the commit message.
Okay.

Thanks.
Regards
Ley Foon

  reply	other threads:[~2019-11-07  8:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07  2:10 [U-Boot] [PATCH v5 0/4] arm: socfpga: Convert drivers from struct to defines Ley Foon Tan
2019-11-07  2:10 ` [U-Boot] [PATCH v5 1/4] arm: dts: socfpga: Add u-boot, dm-pre-reloc for sysmgr and clkmgr nodes Ley Foon Tan
2019-11-07  2:27   ` Marek Vasut
2019-11-07  3:31     ` Ley Foon Tan
2019-11-07  8:10       ` Marek Vasut
2019-11-07  8:36         ` Simon Goldschmidt
2019-11-07  8:39           ` Marek Vasut
2019-11-07  9:14             ` Simon Goldschmidt
2019-11-07  9:22               ` Marek Vasut
2019-11-07  2:10 ` [U-Boot] [PATCH v5 2/4] arm: socfpga: Convert reset manager from struct to defines Ley Foon Tan
2019-11-07  2:41   ` Marek Vasut
2019-11-07  8:06     ` Ley Foon Tan
2019-11-07  8:33       ` Marek Vasut
2019-11-07  8:41         ` Ley Foon Tan [this message]
2019-11-07  8:43           ` Marek Vasut
2019-11-07  8:47             ` Ley Foon Tan
2019-11-07  2:10 ` [U-Boot] [PATCH v5 3/4] arm: socfpga: Convert system " Ley Foon Tan
2019-11-07  2:47   ` Marek Vasut
2019-11-07  8:11     ` Ley Foon Tan
2019-11-07  2:10 ` [U-Boot] [PATCH v5 4/4] arm: socfpga: Convert clock " Ley Foon Tan

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=CAFiDJ5-eCMrJVMofHyf0WnYM-4qeD4qypmYeynAGVBE6f4b5jg@mail.gmail.com \
    --to=lftan.linux@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 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.