From: Peng Fan <b51431@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 7/8] imx: mx6qpsabreauto: Add MX6QP SABREAUTO CPU3 board support
Date: Mon, 29 Jun 2015 16:06:44 +0800 [thread overview]
Message-ID: <20150629080643.GB17763@shlinux2> (raw)
In-Reply-To: <5590F312.4070205@denx.de>
Hi Stefano,
On Mon, Jun 29, 2015 at 09:26:10AM +0200, Stefano Babic wrote:
>Hi Peng,
>
>On 29/06/2015 04:05, Peng Fan wrote:
>
>>> To be sure I have not misunderstood the other patches: this is ok and
>>> this is what I am expecting. Code checks the SOC and provides a
>>> different action for QP or Quad or..
>>>
>>> But if some parts are defined at compile time, the check is losing its
>>> original meaning and the behavior is already defined at build time.
>>
>> is_mx6dqp is runtime checking, it's behavior is not defined at build time.
>> There are some places which has the macro, #ifdef CONFIG_MX6QP, but all in
>> header files, not in xx.c files.
>
>Exactly, this is what I mean - here there is a runtime check, but this
>can be vanified by some #ifdef in header.
>
>>> The same here
>>
>> Since this is board header files, different SOCs needs different dtbs.
>> The behavior is defined at build time.
>
>You're wrong. We accepted some code to detect at runtime which is the
>correct DTB to be selected. In fact, one goal is to have a single kernel
>as image, using the correct DTB to select the hardware.
>
>This work if we have the same U-Boot is running on different SOC
>variants. If U-Boot is hardcoded, why do we need to detect the right DTB
>? It could be also hard-coded.
>
>> I think it is not good to add
>> such piece of code in board file:
>> int board_late_init()
>> {
>> if (is_mx6dqp())
>> setenv(fdt_file, "imx6qp-sabreauto.dtb") /* Just an example */
>
>It must be checked if fdt_file is already set, because the customer can
>decide to use its own, but well, yes, this is done by other boards -
>check in code.
>
>> }
>> So I prefer to use "#if defined CONFIG_MX6QP" in board header file.
>
>There is an important goal: having a single U-Boot image running on
>boards that can have different (pin compatible) SOCs. We get this
>managing the different layout of the IOMUXC, that was maybe the most
>difficult part - why do we go back when we can't ?
Get you.
I saw the code in gw_ventana.c to detect the DTB at runtime.
To imx6q/qp/dl sabreauto board, there is no place to store info such as
ventana_board_info. But this is a good point that gw_ventana use the way
to do runtime check, which can make one image goal for pin compatible SOCs.
To the i.mx6qp board patch, I can use this way to remove the
DTB related #ifdefs, use the way that gw_ventana uses. Will split the current
patch into two, one to refacotr the current code to use runtime DTB detect,
the second one is to add i.mx6qp support.
>
>Best regards,
>Stefano Babic
>
>--
>=====================================================================
>DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
>HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
>=====================================================================
Regards,
Peng.
--
next prev parent reply other threads:[~2015-06-29 8:06 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-11 10:30 [U-Boot] [PATCH v2 1/8] imx: mx6 correct is_soc_rev usage Peng Fan
2015-06-11 10:30 ` [U-Boot] [PATCH v2 2/8] imx: mx6 correct get_cpu_rev Peng Fan
2015-06-27 16:22 ` Stefano Babic
2015-06-11 10:30 ` [U-Boot] [PATCH v2 3/8] imx: mx6 introuduce macro is_mx6dqp Peng Fan
2015-06-27 16:22 ` Stefano Babic
2015-06-11 10:30 ` [U-Boot] [PATCH v2 4/8] imx: mx6: ccm: Change the clock settings for i.MX6QP Peng Fan
2015-06-27 16:44 ` Stefano Babic
2015-06-29 1:50 ` Peng Fan
2015-06-11 10:30 ` [U-Boot] [PATCH v2 5/8] imx: mx6: hab : Remove the cache issue workaroud in hab " Peng Fan
2015-06-11 10:30 ` [U-Boot] [PATCH v2 6/8] imx: mx6qp Enable PRG clock and AQoS setting for IPU Peng Fan
2015-06-27 17:04 ` Stefano Babic
2015-06-27 21:10 ` Fabio Estevam
2015-06-11 10:30 ` [U-Boot] [PATCH v2 7/8] imx: mx6qpsabreauto: Add MX6QP SABREAUTO CPU3 board support Peng Fan
2015-06-27 17:08 ` Stefano Babic
2015-06-29 2:05 ` Peng Fan
2015-06-29 7:26 ` Stefano Babic
2015-06-29 8:06 ` Peng Fan [this message]
2015-06-29 8:19 ` Stefano Babic
2015-06-29 12:02 ` Fabio Estevam
2015-06-29 12:26 ` Peng Fan
2015-06-27 17:11 ` Fabio Estevam
2015-06-11 10:30 ` [U-Boot] [PATCH v2 8/8] imx: mx6qp: Adjust AQos settings for peripherals Peng Fan
2015-06-27 17:09 ` Stefano Babic
2015-06-27 16:17 ` [U-Boot] [PATCH v2 1/8] imx: mx6 correct is_soc_rev usage Stefano Babic
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=20150629080643.GB17763@shlinux2 \
--to=b51431@freescale.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