diff mbox

[U-Boot] mx6sabresd: Fix the fdt file for the mx6dl version

Message ID 1379469359-19153-1-git-send-email-festevam@gmail.com
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Commit Message

Fabio Estevam Sept. 18, 2013, 1:55 a.m. UTC
From: Fabio Estevam <fabio.estevam@freescale.com>

We need to load 'imx6dl-sabresd.dtb' in the mx6dl version.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 include/configs/mx6sabresd.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Otavio Salvador Sept. 18, 2013, 2:04 a.m. UTC | #1
On Tue, Sep 17, 2013 at 10:55 PM, Fabio Estevam <festevam@gmail.com> wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> We need to load 'imx6dl-sabresd.dtb' in the mx6dl version.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

I fully agree with this.

Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Eric Nelson Sept. 18, 2013, 1:48 p.m. UTC | #2
Hi Fabio,

On 09/17/2013 06:55 PM, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> We need to load 'imx6dl-sabresd.dtb' in the mx6dl version.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>   include/configs/mx6sabresd.h | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h
> index a3dd74a..3229bc7 100644
> --- a/include/configs/mx6sabresd.h
> +++ b/include/configs/mx6sabresd.h
> @@ -16,7 +16,11 @@
>   #define CONFIG_MXC_UART_BASE	UART1_BASE
>   #define CONFIG_CONSOLE_DEV		"ttymxc0"
>   #define CONFIG_MMCROOT			"/dev/mmcblk1p2"
> +#if defined(CONFIG_MX6Q)
>   #define CONFIG_DEFAULT_FDT_FILE	"imx6q-sabresd.dtb"
> +#elif defined(CONFIG_MX6DL)
> +#define CONFIG_DEFAULT_FDT_FILE	"imx6dl-sabresd.dtb"
> +#endif
>   #define PHYS_SDRAM_SIZE		(1u * 1024 * 1024 * 1024)
>
>   #include "mx6sabre_common.h"
>

As you know, we're loading the kernel using a boot script,
with various flavors for differing locations and environments,
so we've found it easier to pass environment variables for
board and CPU type to the boot script.
	https://github.com/boundarydevices/u-boot-imx6/commit/4a4fc304e4fe63cde7b3201f0daab5b1856870e4

This allows the boot script to produce the DTB name as shown
here:
	https://github.com/boundarydevices/u-boot-imx6/blob/staging/board/boundary/nitrogen6x/6x_bootscript.txt#L72

If/when you move to a single binary for DQ/DL, you won't have
a separate choice as shown above.

Let me know your thoughts on this.

We didn't generate a proper patch for lack of time, but I
think that the small addition of code has merit. We also
may want to discuss the specifics in more detail.

Regards,


Eric
Fabio Estevam Sept. 19, 2013, 11:57 a.m. UTC | #3
Hi Eric,

On Wed, Sep 18, 2013 at 10:48 AM, Eric Nelson
<eric.nelson@boundarydevices.com> wrote:

> As you know, we're loading the kernel using a boot script,
> with various flavors for differing locations and environments,
> so we've found it easier to pass environment variables for
> board and CPU type to the boot script.
>
> https://github.com/boundarydevices/u-boot-imx6/commit/4a4fc304e4fe63cde7b3201f0daab5b1856870e4
>
> This allows the boot script to produce the DTB name as shown
> here:
>
> https://github.com/boundarydevices/u-boot-imx6/blob/staging/board/boundary/nitrogen6x/6x_bootscript.txt#L72
>
> If/when you move to a single binary for DQ/DL, you won't have
> a separate choice as shown above.
>
> Let me know your thoughts on this.

Yes, it looks interesting for dealing with the single binary goal we
want to achieve.

> We didn't generate a proper patch for lack of time, but I
> think that the small addition of code has merit. We also
> may want to discuss the specifics in more detail.

When you have a chance please submit a patch.

At least for the upcoming 2013.10, it would be nice to have my
original patch of this thread applied for sabresd though.

Regards,

Fabio Estevam
Eric Nelson Sept. 19, 2013, 2:01 p.m. UTC | #4
Hi Fabio,

On 09/19/2013 04:57 AM, Fabio Estevam wrote:
> Hi Eric,
>
> On Wed, Sep 18, 2013 at 10:48 AM, Eric Nelson
> <eric.nelson@boundarydevices.com> wrote:
>
>> As you know, we're loading the kernel using a boot script,
>> with various flavors for differing locations and environments,
>> so we've found it easier to pass environment variables for
>> board and CPU type to the boot script.
>>
>> https://github.com/boundarydevices/u-boot-imx6/commit/4a4fc304e4fe63cde7b3201f0daab5b1856870e4
>>
>> This allows the boot script to produce the DTB name as shown
>> here:
>>
>> https://github.com/boundarydevices/u-boot-imx6/blob/staging/board/boundary/nitrogen6x/6x_bootscript.txt#L72
>>
>> If/when you move to a single binary for DQ/DL, you won't have
>> a separate choice as shown above.
>>
>> Let me know your thoughts on this.
>
> Yes, it looks interesting for dealing with the single binary goal we
> want to achieve.
>
>> We didn't generate a proper patch for lack of time, but I
>> think that the small addition of code has merit. We also
>> may want to discuss the specifics in more detail.
>
> When you have a chance please submit a patch.
>
Will do.

> At least for the upcoming 2013.10, it would be nice to have my
> original patch of this thread applied for sabresd though.
>
Works for me.

My response wasn't a comment on this patch. You just prompted
me to start a different discussion.

Regards,


Eric
Stefano Babic Sept. 20, 2013, 1:43 p.m. UTC | #5
Hi Eric,

On 18/09/2013 15:48, Eric Nelson wrote:
> 
> This allows the boot script to produce the DTB name as shown
> here:
>     https://github.com/boundarydevices/u-boot-imx6/blob/staging/board/boundary/nitrogen6x/6x_bootscript.txt#L72
> 
> 
> If/when you move to a single binary for DQ/DL, you won't have
> a separate choice as shown above.
> 
> Let me know your thoughts on this.

It would be helpful if we agree on a set of common variables (across
architectures) to be automatically set by u-boot at the startup.

The proposed mechanism is already used in u-boot: see the "dieid#"
variable for TI's OMAP.

Regards,
Stefano
Stefano Babic Sept. 20, 2013, 1:44 p.m. UTC | #6
> 
> At least for the upcoming 2013.10, it would be nice to have my
> original patch of this thread applied for sabresd though.

Agree. I will merge it, and we can then discuss for improvements.

Regards,
Stefano
Eric Nelson Sept. 20, 2013, 2:20 p.m. UTC | #7
Thanks, Stefano,

On 09/20/2013 06:43 AM, Stefano Babic wrote:
> Hi Eric,
>
> On 18/09/2013 15:48, Eric Nelson wrote:
>>
>> This allows the boot script to produce the DTB name as shown
>> here:
>>      https://github.com/boundarydevices/u-boot-imx6/blob/staging/board/boundary/nitrogen6x/6x_bootscript.txt#L72
>>
>>
>> If/when you move to a single binary for DQ/DL, you won't have
>> a separate choice as shown above.
>>
>> Let me know your thoughts on this.
>
> It would be helpful if we agree on a set of common variables (across
> architectures) to be automatically set by u-boot at the startup.
>
> The proposed mechanism is already used in u-boot: see the "dieid#"
> variable for TI's OMAP.
>

This maps to the get_imx_type() routine pretty nicely, though
the hash in the environment variable seems weird.

We'll want a board identifier as well, and see other boards
using CONFIG_SYS_BOARD, which seems very reasonable, but the
Nitrogen6x/SABRE Lite will need some additional logic.
Stefano Babic Sept. 20, 2013, 4:11 p.m. UTC | #8
On 18/09/2013 03:55, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> We need to load 'imx6dl-sabresd.dtb' in the mx6dl version.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Applied to u-boot-imx, thanks!

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h
index a3dd74a..3229bc7 100644
--- a/include/configs/mx6sabresd.h
+++ b/include/configs/mx6sabresd.h
@@ -16,7 +16,11 @@ 
 #define CONFIG_MXC_UART_BASE	UART1_BASE
 #define CONFIG_CONSOLE_DEV		"ttymxc0"
 #define CONFIG_MMCROOT			"/dev/mmcblk1p2"
+#if defined(CONFIG_MX6Q)
 #define CONFIG_DEFAULT_FDT_FILE	"imx6q-sabresd.dtb"
+#elif defined(CONFIG_MX6DL)
+#define CONFIG_DEFAULT_FDT_FILE	"imx6dl-sabresd.dtb"
+#endif
 #define PHYS_SDRAM_SIZE		(1u * 1024 * 1024 * 1024)
 
 #include "mx6sabre_common.h"