[U-Boot] [PATCH] generic_board: Call "checkboard" even though the root node has a "model" property

In case of enable CONFIG_OF_CONTROL and has a "model" property in the root node, the board special "checkboard" will not be called. Usually we show some useful version information in the function. This patch enable call "checkboard" in any case. It is not conflicting with showing "model" at the same time.
For example on LS2085AQDS: Showing "model" only: Model: Freescale Layerscape 2085a QDS Board
Showing "checkboard" only: Board: LS2085E-QDS, Board Arch: V1, Board version: B, boot from vBank: 4
Showing both: Model: Freescale Layerscape 2085a QDS Board Board: LS2085E-QDS, Board Arch: V1, Board version: B, boot from vBank: 4
Signed-off-by: Haikun Wang haikun.wang@freescale.com --- common/board_info.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/common/board_info.c b/common/board_info.c index 42d0641..4e5a1f7 100644 --- a/common/board_info.c +++ b/common/board_info.c @@ -14,8 +14,7 @@ int __weak checkboard(void)
/* * If the root node of the DTB has a "model" property, show it. - * If CONFIG_OF_CONTROL is disabled or the "model" property is missing, - * fall back to checkboard(). + * Then call checkboard(). */ int show_board_info(void) { @@ -25,10 +24,8 @@ int show_board_info(void)
model = fdt_getprop(gd->fdt_blob, 0, "model", NULL);
- if (model) { + if (model) printf("Model: %s\n", model); - return 0; - } #endif
return checkboard();

Hi,
On 9 July 2015 at 05:58, Haikun Wang haikun.wang@freescale.com wrote:
Showing both: Model: Freescale Layerscape 2085a QDS Board Board: LS2085E-QDS, Board Arch: V1, Board version: B, boot from vBank: 4
This looks like duplication (at least the first part).
Anyway I don't see any problem with this change.
Reviewed-by: Simon Glass sjg@chromium.org
Regards, Simon

On 7/10/2015 6:06 AM, Simon Glass wrote:
Hi,
On 9 July 2015 at 05:58, Haikun Wang haikun.wang@freescale.com wrote:
Showing both: Model: Freescale Layerscape 2085a QDS Board Board: LS2085E-QDS, Board Arch: V1, Board version: B, boot from vBank: 4
This looks like duplication (at least the first part).
Anyway I don't see any problem with this change.
Hi Simon,
The "model" information is hard-coded. Sometimes we need print run-time information of the board.
We just want to print the version information and they are stored in the on-board FPGA registers on LS2085AQDS.
Best regards, Wang Haikun
Reviewed-by: Simon Glass sjg@chromium.org
Regards, Simon

Hi Haikun, Simon,
On Fri, Jul 10, 2015 at 11:50 AM, Wang Haikun Haikun.Wang@freescale.com wrote:
On 7/10/2015 6:06 AM, Simon Glass wrote:
Hi,
On 9 July 2015 at 05:58, Haikun Wang haikun.wang@freescale.com wrote:
Showing both: Model: Freescale Layerscape 2085a QDS Board Board: LS2085E-QDS, Board Arch: V1, Board version: B, boot from vBank: 4
This looks like duplication (at least the first part).
Anyway I don't see any problem with this change.
Hi Simon,
The "model" information is hard-coded. Sometimes we need print run-time information of the board.
We just want to print the version information and they are stored in the on-board FPGA registers on LS2085AQDS.
Best regards, Wang Haikun
Reviewed-by: Simon Glass sjg@chromium.org
With rebase on u-boot/master, I now see board booting like this:
Model: Intel Bayley Bay Board: Unknown
This looks a little bit odd (an unkown board?) to me. Does this mean we need implement our own checkboard() for every board we support?
Regards, Bin

2015-07-30 19:42 GMT+09:00 Bin Meng bmeng.cn@gmail.com:
Hi Haikun, Simon,
On Fri, Jul 10, 2015 at 11:50 AM, Wang Haikun Haikun.Wang@freescale.com wrote:
On 7/10/2015 6:06 AM, Simon Glass wrote:
Hi,
On 9 July 2015 at 05:58, Haikun Wang haikun.wang@freescale.com wrote:
Showing both: Model: Freescale Layerscape 2085a QDS Board Board: LS2085E-QDS, Board Arch: V1, Board version: B, boot from vBank: 4
This looks like duplication (at least the first part).
Anyway I don't see any problem with this change.
Hi Simon,
The "model" information is hard-coded. Sometimes we need print run-time information of the board.
We just want to print the version information and they are stored in the on-board FPGA registers on LS2085AQDS.
Best regards, Wang Haikun
Reviewed-by: Simon Glass sjg@chromium.org
With rebase on u-boot/master, I now see board booting like this:
Model: Intel Bayley Bay Board: Unknown
This looks a little bit odd (an unkown board?) to me. Does this mean we need implement our own checkboard() for every board we support?
Absolutely, no.
I do not want to implement checkboard() for my boards that have model names in DTS.

On Thu, Jul 30, 2015 at 6:47 PM, Masahiro Yamada yamada.masahiro@socionext.com wrote:
2015-07-30 19:42 GMT+09:00 Bin Meng bmeng.cn@gmail.com:
Hi Haikun, Simon,
On Fri, Jul 10, 2015 at 11:50 AM, Wang Haikun Haikun.Wang@freescale.com wrote:
On 7/10/2015 6:06 AM, Simon Glass wrote:
Hi,
On 9 July 2015 at 05:58, Haikun Wang haikun.wang@freescale.com wrote:
Showing both: Model: Freescale Layerscape 2085a QDS Board Board: LS2085E-QDS, Board Arch: V1, Board version: B, boot from vBank: 4
This looks like duplication (at least the first part).
Anyway I don't see any problem with this change.
Hi Simon,
The "model" information is hard-coded. Sometimes we need print run-time information of the board.
We just want to print the version information and they are stored in the on-board FPGA registers on LS2085AQDS.
Best regards, Wang Haikun
Reviewed-by: Simon Glass sjg@chromium.org
With rebase on u-boot/master, I now see board booting like this:
Model: Intel Bayley Bay Board: Unknown
This looks a little bit odd (an unkown board?) to me. Does this mean we need implement our own checkboard() for every board we support?
Absolutely, no.
I do not want to implement checkboard() for my boards that have model names in DTS.
Then can we make this __weak checkboard() print nothing instead? Showing "Board: Unknown" makes me think something went wrong at first glance.
Regards, Bin

2015-07-30 19:51 GMT+09:00 Bin Meng bmeng.cn@gmail.com:
On Thu, Jul 30, 2015 at 6:47 PM, Masahiro Yamada yamada.masahiro@socionext.com wrote:
2015-07-30 19:42 GMT+09:00 Bin Meng bmeng.cn@gmail.com:
Hi Haikun, Simon,
On Fri, Jul 10, 2015 at 11:50 AM, Wang Haikun Haikun.Wang@freescale.com wrote:
On 7/10/2015 6:06 AM, Simon Glass wrote:
Hi,
On 9 July 2015 at 05:58, Haikun Wang haikun.wang@freescale.com wrote:
Showing both: Model: Freescale Layerscape 2085a QDS Board Board: LS2085E-QDS, Board Arch: V1, Board version: B, boot from vBank: 4
This looks like duplication (at least the first part).
Anyway I don't see any problem with this change.
Hi Simon,
The "model" information is hard-coded. Sometimes we need print run-time information of the board.
We just want to print the version information and they are stored in the on-board FPGA registers on LS2085AQDS.
Best regards, Wang Haikun
Reviewed-by: Simon Glass sjg@chromium.org
With rebase on u-boot/master, I now see board booting like this:
Model: Intel Bayley Bay Board: Unknown
This looks a little bit odd (an unkown board?) to me. Does this mean we need implement our own checkboard() for every board we support?
Absolutely, no.
I do not want to implement checkboard() for my boards that have model names in DTS.
Then can we make this __weak checkboard() print nothing instead?
Sounds good to me.
Showing "Board: Unknown" makes me think something went wrong at first glance.

Hi,
On 30 July 2015 at 04:55, Masahiro Yamada yamada.masahiro@socionext.com wrote:
2015-07-30 19:51 GMT+09:00 Bin Meng bmeng.cn@gmail.com:
On Thu, Jul 30, 2015 at 6:47 PM, Masahiro Yamada yamada.masahiro@socionext.com wrote:
2015-07-30 19:42 GMT+09:00 Bin Meng bmeng.cn@gmail.com:
Hi Haikun, Simon,
On Fri, Jul 10, 2015 at 11:50 AM, Wang Haikun Haikun.Wang@freescale.com wrote:
On 7/10/2015 6:06 AM, Simon Glass wrote:
Hi,
On 9 July 2015 at 05:58, Haikun Wang haikun.wang@freescale.com wrote: > Showing both: > Model: Freescale Layerscape 2085a QDS Board > Board: LS2085E-QDS, Board Arch: V1, Board version: B, boot from vBank: 4
This looks like duplication (at least the first part).
Anyway I don't see any problem with this change.
Hi Simon,
The "model" information is hard-coded. Sometimes we need print run-time information of the board.
We just want to print the version information and they are stored in the on-board FPGA registers on LS2085AQDS.
Best regards, Wang Haikun
Reviewed-by: Simon Glass sjg@chromium.org
With rebase on u-boot/master, I now see board booting like this:
Model: Intel Bayley Bay Board: Unknown
This looks a little bit odd (an unkown board?) to me. Does this mean we need implement our own checkboard() for every board we support?
Absolutely, no.
I do not want to implement checkboard() for my boards that have model names in DTS.
Then can we make this __weak checkboard() print nothing instead?
Sounds good to me.
Showing "Board: Unknown" makes me think something went wrong at first glance.
I missed this impact of the patch. Yes that sounds good - Bin are you going to do a new patch?
Regards, Simon

Hi Simon,
On Thu, Jul 30, 2015 at 10:53 PM, Simon Glass sjg@chromium.org wrote:
Hi,
On 30 July 2015 at 04:55, Masahiro Yamada yamada.masahiro@socionext.com wrote:
2015-07-30 19:51 GMT+09:00 Bin Meng bmeng.cn@gmail.com:
On Thu, Jul 30, 2015 at 6:47 PM, Masahiro Yamada yamada.masahiro@socionext.com wrote:
2015-07-30 19:42 GMT+09:00 Bin Meng bmeng.cn@gmail.com:
Hi Haikun, Simon,
On Fri, Jul 10, 2015 at 11:50 AM, Wang Haikun Haikun.Wang@freescale.com wrote:
On 7/10/2015 6:06 AM, Simon Glass wrote: > Hi, > > On 9 July 2015 at 05:58, Haikun Wang haikun.wang@freescale.com wrote: >> Showing both: >> Model: Freescale Layerscape 2085a QDS Board >> Board: LS2085E-QDS, Board Arch: V1, Board version: B, boot from vBank: 4 > > This looks like duplication (at least the first part). > > Anyway I don't see any problem with this change. Hi Simon,
The "model" information is hard-coded. Sometimes we need print run-time information of the board.
We just want to print the version information and they are stored in the on-board FPGA registers on LS2085AQDS.
Best regards, Wang Haikun > > Reviewed-by: Simon Glass sjg@chromium.org
With rebase on u-boot/master, I now see board booting like this:
Model: Intel Bayley Bay Board: Unknown
This looks a little bit odd (an unkown board?) to me. Does this mean we need implement our own checkboard() for every board we support?
Absolutely, no.
I do not want to implement checkboard() for my boards that have model names in DTS.
Then can we make this __weak checkboard() print nothing instead?
Sounds good to me.
Showing "Board: Unknown" makes me think something went wrong at first glance.
I missed this impact of the patch. Yes that sounds good - Bin are you going to do a new patch?
Yes, I will send a new patch for this.
Regards, Bin

On Thu, Jul 09, 2015 at 07:58:03PM +0800, Haikun.Wang@freescale.com wrote:
In case of enable CONFIG_OF_CONTROL and has a "model" property in the root node, the board special "checkboard" will not be called. Usually we show some useful version information in the function. This patch enable call "checkboard" in any case. It is not conflicting with showing "model" at the same time.
For example on LS2085AQDS: Showing "model" only: Model: Freescale Layerscape 2085a QDS Board
Showing "checkboard" only: Board: LS2085E-QDS, Board Arch: V1, Board version: B, boot from vBank: 4
Showing both: Model: Freescale Layerscape 2085a QDS Board Board: LS2085E-QDS, Board Arch: V1, Board version: B, boot from vBank: 4
Signed-off-by: Haikun Wang haikun.wang@freescale.com Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!
participants (6)
-
Bin Meng
-
Haikun Wang
-
Masahiro Yamada
-
Simon Glass
-
Tom Rini
-
Wang Haikun