* [[PATCH] colibri_imx6: add board_fit_config_name_match to support FIT in SPL
@ 2021-05-30 10:45 liu.ming50
0 siblings, 0 replies; 7+ messages in thread
From: liu.ming50 @ 2021-05-30 10:45 UTC (permalink / raw)
To: u-boot; +Cc: sergio.prado, max.krummenacher, marcel.ziswiler, Ming Liu
From: Ming Liu <liu.ming50@gmail.com>
Only one dtb is currently supported, so match with imx6-colibri.
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
---
board/toradex/colibri_imx6/colibri_imx6.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
index c0e7754469..587d92a8e9 100644
--- a/board/toradex/colibri_imx6/colibri_imx6.c
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
@@ -1081,6 +1081,16 @@ void board_init_f(ulong dummy)
board_init_r(NULL, 0);
}
+#ifdef CONFIG_SPL_LOAD_FIT
+int board_fit_config_name_match(const char *name)
+{
+ if (!strcmp(name, "imx6-colibri"))
+ return 0;
+
+ return -1;
+}
+#endif
+
void reset_cpu(void)
{
}
--
2.29.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [[PATCH] colibri_imx6: add board_fit_config_name_match to support FIT in SPL
@ 2021-05-31 7:06 liu.ming50
2021-05-31 14:09 ` Marcel Ziswiler
2021-05-31 14:36 ` Sean Anderson
0 siblings, 2 replies; 7+ messages in thread
From: liu.ming50 @ 2021-05-31 7:06 UTC (permalink / raw)
To: u-boot; +Cc: sergio.prado, max.krummenacher, marcel.ziswiler, Ming Liu
From: Ming Liu <liu.ming50@gmail.com>
Only one dtb is currently supported, so match with imx6-colibri.
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
---
board/toradex/colibri_imx6/colibri_imx6.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
index c0e7754469..587d92a8e9 100644
--- a/board/toradex/colibri_imx6/colibri_imx6.c
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
@@ -1081,6 +1081,16 @@ void board_init_f(ulong dummy)
board_init_r(NULL, 0);
}
+#ifdef CONFIG_SPL_LOAD_FIT
+int board_fit_config_name_match(const char *name)
+{
+ if (!strcmp(name, "imx6-colibri"))
+ return 0;
+
+ return -1;
+}
+#endif
+
void reset_cpu(void)
{
}
--
2.29.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [[PATCH] colibri_imx6: add board_fit_config_name_match to support FIT in SPL
2021-05-31 7:06 liu.ming50
@ 2021-05-31 14:09 ` Marcel Ziswiler
2021-05-31 14:36 ` Sean Anderson
1 sibling, 0 replies; 7+ messages in thread
From: Marcel Ziswiler @ 2021-05-31 14:09 UTC (permalink / raw)
To: u-boot@lists.denx.de, liu.ming50@gmail.com; +Cc: Sergio Prado, Max Krummenacher
Hi Ming
On Mon, 2021-05-31 at 09:06 +0200, liu.ming50@gmail.com wrote:
> From: Ming Liu <liu.ming50@gmail.com>
>
> Only one dtb is currently supported, so match with imx6-colibri.
Looks similar to commit 6f8ef051c5dd ("apalis_imx6: add board_fit_config_name_match to support FIT in SPL") to
me.
I guess as we are currently not using that CONFIG_SPL_LOAD_FIT in our default configuration(s) at all it won't
actually do anything. However, usually, it may be smarter to do so together with also enabling it in the
default configuration as otherwise it will neither be compiled in nor really tested at all. And could therefore
just as well not be done in the first place. But of course, then it would also definitely be a "real" change
that bears risks...
Anyway, might be interesting to learn the real reason for doing it and if that is deemed real useful to also
enable it by default. Thanks!
BTW: Do you always send your patches twice? I don't think that is required.
Cheers
Marcel
> Signed-off-by: Ming Liu <liu.ming50@gmail.com>
> ---
> board/toradex/colibri_imx6/colibri_imx6.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
> index c0e7754469..587d92a8e9 100644
> --- a/board/toradex/colibri_imx6/colibri_imx6.c
> +++ b/board/toradex/colibri_imx6/colibri_imx6.c
> @@ -1081,6 +1081,16 @@ void board_init_f(ulong dummy)
> board_init_r(NULL, 0);
> }
>
> +#ifdef CONFIG_SPL_LOAD_FIT
> +int board_fit_config_name_match(const char *name)
> +{
> + if (!strcmp(name, "imx6-colibri"))
> + return 0;
> +
> + return -1;
> +}
> +#endif
> +
> void reset_cpu(void)
> {
> }
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [[PATCH] colibri_imx6: add board_fit_config_name_match to support FIT in SPL
2021-05-31 7:06 liu.ming50
2021-05-31 14:09 ` Marcel Ziswiler
@ 2021-05-31 14:36 ` Sean Anderson
2021-06-01 15:58 ` Ming Liu
2021-06-01 16:00 ` Ming Liu
1 sibling, 2 replies; 7+ messages in thread
From: Sean Anderson @ 2021-05-31 14:36 UTC (permalink / raw)
To: liu.ming50, u-boot; +Cc: sergio.prado, max.krummenacher, marcel.ziswiler
On 5/31/21 3:06 AM, liu.ming50@gmail.com wrote:
> From: Ming Liu <liu.ming50@gmail.com>
>
> Only one dtb is currently supported, so match with imx6-colibri.
>
> Signed-off-by: Ming Liu <liu.ming50@gmail.com>
> ---
> board/toradex/colibri_imx6/colibri_imx6.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
> index c0e7754469..587d92a8e9 100644
> --- a/board/toradex/colibri_imx6/colibri_imx6.c
> +++ b/board/toradex/colibri_imx6/colibri_imx6.c
> @@ -1081,6 +1081,16 @@ void board_init_f(ulong dummy)
> board_init_r(NULL, 0);
> }
>
> +#ifdef CONFIG_SPL_LOAD_FIT
> +int board_fit_config_name_match(const char *name)
> +{
> + if (!strcmp(name, "imx6-colibri"))
> + return 0;
> +
> + return -1;
Please use an errno.
> +}
> +#endif
> +
> void reset_cpu(void)
> {
> }
>
Do you need to match "imx6-colibri", or could you use the default config?
--Sean
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [[PATCH] colibri_imx6: add board_fit_config_name_match to support FIT in SPL
2021-05-31 14:36 ` Sean Anderson
@ 2021-06-01 15:58 ` Ming Liu
2021-06-02 3:03 ` Sean Anderson
2021-06-01 16:00 ` Ming Liu
1 sibling, 1 reply; 7+ messages in thread
From: Ming Liu @ 2021-06-01 15:58 UTC (permalink / raw)
To: Sean Anderson; +Cc: u-boot, Sergio Prado, Max Krummenacher, Marcel Ziswiler
Hi, Sean:
Thanks for the comments, please see my answers as follows:
> Please use an errno.
Seems all other board are using '0' and '-1' as return value of
board_fit_config_name_match, shouldn't we keep consistent with them?
> Do you need to match "imx6-colibri", or could you use the default config?
I think so since imx6-colibri.its is the only present DTS file for this
board.
//Ming Liu
Sean Anderson <seanga2@gmail.com> 於 2021年5月31日 週一 下午4:36寫道:
> On 5/31/21 3:06 AM, liu.ming50@gmail.com wrote:
> > From: Ming Liu <liu.ming50@gmail.com>
> >
> > Only one dtb is currently supported, so match with imx6-colibri.
> >
> > Signed-off-by: Ming Liu <liu.ming50@gmail.com>
> > ---
> > board/toradex/colibri_imx6/colibri_imx6.c | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/board/toradex/colibri_imx6/colibri_imx6.c
> b/board/toradex/colibri_imx6/colibri_imx6.c
> > index c0e7754469..587d92a8e9 100644
> > --- a/board/toradex/colibri_imx6/colibri_imx6.c
> > +++ b/board/toradex/colibri_imx6/colibri_imx6.c
> > @@ -1081,6 +1081,16 @@ void board_init_f(ulong dummy)
> > board_init_r(NULL, 0);
> > }
> >
> > +#ifdef CONFIG_SPL_LOAD_FIT
> > +int board_fit_config_name_match(const char *name)
> > +{
> > + if (!strcmp(name, "imx6-colibri"))
> > + return 0;
> > +
> > + return -1;
>
> Please use an errno.
>
> > +}
> > +#endif
> > +
> > void reset_cpu(void)
> > {
> > }
> >
>
> Do you need to match "imx6-colibri", or could you use the default config?
>
> --Sean
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [[PATCH] colibri_imx6: add board_fit_config_name_match to support FIT in SPL
2021-06-01 15:58 ` Ming Liu
@ 2021-06-02 3:03 ` Sean Anderson
0 siblings, 0 replies; 7+ messages in thread
From: Sean Anderson @ 2021-06-02 3:03 UTC (permalink / raw)
To: Ming Liu; +Cc: u-boot, Sergio Prado, Max Krummenacher, Marcel Ziswiler
On 6/1/21 11:58 AM, Ming Liu wrote:
> Hi, Sean:
>
> Thanks for the comments, please see my answers as follows:
>
> > Please use an errno.
>
> Seems all other board are using '0' and '-1' as return value of board_fit_config_name_match, shouldn't we keep consistent with them?
*shrug*
We return an int, so why not use an error code? Otherwise, we might as
well return bool.
>
> > Do you need to match "imx6-colibri", or could you use the default config?
>
> I think so since imx6-colibri.its is the only present DTS file for this board.
>
> //Ming Liu
>
So does this FIT only contain one config? I ask because if you just
need the default config you can use the weak definition in
common/common_fit.c.
--Sean
>
>
> Sean Anderson <seanga2@gmail.com <mailto:seanga2@gmail.com>> 於 2021年5月31日 週一 下午4:36寫道:
>
> On 5/31/21 3:06 AM, liu.ming50@gmail.com <mailto:liu.ming50@gmail.com> wrote:
> > From: Ming Liu <liu.ming50@gmail.com <mailto:liu.ming50@gmail.com>>
> >
> > Only one dtb is currently supported, so match with imx6-colibri.
> >
> > Signed-off-by: Ming Liu <liu.ming50@gmail.com <mailto:liu.ming50@gmail.com>>
> > ---
> > board/toradex/colibri_imx6/colibri_imx6.c | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
> > index c0e7754469..587d92a8e9 100644
> > --- a/board/toradex/colibri_imx6/colibri_imx6.c
> > +++ b/board/toradex/colibri_imx6/colibri_imx6.c
> > @@ -1081,6 +1081,16 @@ void board_init_f(ulong dummy)
> > board_init_r(NULL, 0);
> > }
> >
> > +#ifdef CONFIG_SPL_LOAD_FIT
> > +int board_fit_config_name_match(const char *name)
> > +{
> > + if (!strcmp(name, "imx6-colibri"))
> > + return 0;
> > +
> > + return -1;
>
> Please use an errno.
>
> > +}
> > +#endif
> > +
> > void reset_cpu(void)
> > {
> > }
> >
>
> Do you need to match "imx6-colibri", or could you use the default config?
>
> --Sean
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [[PATCH] colibri_imx6: add board_fit_config_name_match to support FIT in SPL
2021-05-31 14:36 ` Sean Anderson
2021-06-01 15:58 ` Ming Liu
@ 2021-06-01 16:00 ` Ming Liu
1 sibling, 0 replies; 7+ messages in thread
From: Ming Liu @ 2021-06-01 16:00 UTC (permalink / raw)
To: Sean Anderson; +Cc: u-boot, Sergio Prado, Max Krummenacher, Marcel Ziswiler
Hi, Marcel:
Thanks for the comment, I usually dont send twice for a same PR, but I was
not a member when I sent the first one so I was afraid it's not on the mail
list.
//Ming Liu
Sean Anderson <seanga2@gmail.com> 於 2021年5月31日 週一 下午4:36寫道:
> On 5/31/21 3:06 AM, liu.ming50@gmail.com wrote:
> > From: Ming Liu <liu.ming50@gmail.com>
> >
> > Only one dtb is currently supported, so match with imx6-colibri.
> >
> > Signed-off-by: Ming Liu <liu.ming50@gmail.com>
> > ---
> > board/toradex/colibri_imx6/colibri_imx6.c | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/board/toradex/colibri_imx6/colibri_imx6.c
> b/board/toradex/colibri_imx6/colibri_imx6.c
> > index c0e7754469..587d92a8e9 100644
> > --- a/board/toradex/colibri_imx6/colibri_imx6.c
> > +++ b/board/toradex/colibri_imx6/colibri_imx6.c
> > @@ -1081,6 +1081,16 @@ void board_init_f(ulong dummy)
> > board_init_r(NULL, 0);
> > }
> >
> > +#ifdef CONFIG_SPL_LOAD_FIT
> > +int board_fit_config_name_match(const char *name)
> > +{
> > + if (!strcmp(name, "imx6-colibri"))
> > + return 0;
> > +
> > + return -1;
>
> Please use an errno.
>
> > +}
> > +#endif
> > +
> > void reset_cpu(void)
> > {
> > }
> >
>
> Do you need to match "imx6-colibri", or could you use the default config?
>
> --Sean
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-06-02 3:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-30 10:45 [[PATCH] colibri_imx6: add board_fit_config_name_match to support FIT in SPL liu.ming50
-- strict thread matches above, loose matches on Subject: below --
2021-05-31 7:06 liu.ming50
2021-05-31 14:09 ` Marcel Ziswiler
2021-05-31 14:36 ` Sean Anderson
2021-06-01 15:58 ` Ming Liu
2021-06-02 3:03 ` Sean Anderson
2021-06-01 16:00 ` Ming Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox