diff mbox

[U-Boot,0/10,v3] i.MX6: move duplicated options to mx6_common to standardise mx6 config

Message ID 556462D9.9090607@denx.de
State Not Applicable
Delegated to: Stefano Babic
Headers show

Commit Message

Stefano Babic May 26, 2015, 12:11 p.m. UTC
Hi Peter,

On 22/05/2015 18:30, Peter Robinson wrote:
> There's a lot of common options in the i.MX6 boards that are repeated across a
> lot of the devices. There's a mx6_common.h which is little used but makes sense
> to be the central location for all the options we want across all mx6 boards to
> ensure a consistent set of features. This is a first pass at moving those options
> and unifying the common options to a standard default.
> 
> Changes since v2:
> * Rebase on imx-uboot master
> * Check that CONFIG_MX6 hasn't already been defined
> * Check that CONFIG_SYS_TEXT_BASE/CONFIG_BOOTDELAY haven't already been defined
> * Don't accidentily drop CONFIG_EFI_PARTITION from tbs2910.h
> 
> Changes since v1:
> * Move CONFIG_SYS_NO_FLASH changes from patch 7 to patch 2 and reorder includes
> so we don't need to undef CONFIG_CMD_FLASH / CONFIG_CMD_IMLS
> * Add CONFIG_CMD_GPIO to mx6_common.f (patch 5)
> * Use the default for all CONFIG_SYS_PROMPT_HUSH_PS2 (patch 7)
> * Drop LZO change (patch 8)
> 
> Peter Robinson (10):
>       novena: standardise mx6_common.h include
>       imx6: move all standard includes to mx6_common.h
>       imx6: move generic imx6 options to mx6_common.h
>       imx6: move standard ATAG configs to mx6_common.h
>       imx6: move MXC_GPIO define to mx6_common.h
>       imx6: centralise common boot options in mx6_common.h
>       imx6: move generic miscellaneous and overwrite options
>       imx6: standardise filesystem and boot options
>       imx6: generic MMC config options to mx6_common
>       mx6: standardise CONFIG_CMD_CACHE
> 
> Reviewed-by: Eric Nelson <eric.nelson@boundarydevices.com>
> 

There are still a couple of issues applying the patchset. The solidrun
mx6cuboxi is broken, and building mars and riot boards report warnings
due to duplicated BOOT_DELAY - rather config_distro has no protection if
BOOT_DELAY is already set.

I can fix all these issues with the following changes:



If nobody complains, I can apply your patchset introducing theses fixes.
Or would you send a V3 that fixes them, too ?

Best regards,
Stefano Babic

Comments

Peter Robinson May 26, 2015, 1:23 p.m. UTC | #1
Hi Stefano,

> On 22/05/2015 18:30, Peter Robinson wrote:
>> There's a lot of common options in the i.MX6 boards that are repeated across a
>> lot of the devices. There's a mx6_common.h which is little used but makes sense
>> to be the central location for all the options we want across all mx6 boards to
>> ensure a consistent set of features. This is a first pass at moving those options
>> and unifying the common options to a standard default.
>>
>> Changes since v2:
>> * Rebase on imx-uboot master
>> * Check that CONFIG_MX6 hasn't already been defined
>> * Check that CONFIG_SYS_TEXT_BASE/CONFIG_BOOTDELAY haven't already been defined
>> * Don't accidentily drop CONFIG_EFI_PARTITION from tbs2910.h
>>
>> Changes since v1:
>> * Move CONFIG_SYS_NO_FLASH changes from patch 7 to patch 2 and reorder includes
>> so we don't need to undef CONFIG_CMD_FLASH / CONFIG_CMD_IMLS
>> * Add CONFIG_CMD_GPIO to mx6_common.f (patch 5)
>> * Use the default for all CONFIG_SYS_PROMPT_HUSH_PS2 (patch 7)
>> * Drop LZO change (patch 8)
>>
>> Peter Robinson (10):
>>       novena: standardise mx6_common.h include
>>       imx6: move all standard includes to mx6_common.h
>>       imx6: move generic imx6 options to mx6_common.h
>>       imx6: move standard ATAG configs to mx6_common.h
>>       imx6: move MXC_GPIO define to mx6_common.h
>>       imx6: centralise common boot options in mx6_common.h
>>       imx6: move generic miscellaneous and overwrite options
>>       imx6: standardise filesystem and boot options
>>       imx6: generic MMC config options to mx6_common
>>       mx6: standardise CONFIG_CMD_CACHE
>>
>> Reviewed-by: Eric Nelson <eric.nelson@boundarydevices.com>
>>
>
> There are still a couple of issues applying the patchset. The solidrun
> mx6cuboxi is broken, and building mars and riot boards report warnings
> due to duplicated BOOT_DELAY - rather config_distro has no protection if
> BOOT_DELAY is already set.
>
> I can fix all these issues with the following changes:
>
> diff --git a/include/configs/embestmx6boards.h
> b/include/configs/embestmx6boards.h
> index cb81e63..56950e0 100644
> --- a/include/configs/embestmx6boards.h
> +++ b/include/configs/embestmx6boards.h
> @@ -13,8 +13,6 @@
>  #ifndef __RIOTBOARD_CONFIG_H
>  #define __RIOTBOARD_CONFIG_H
>
> -#include "mx6_common.h"
> -
>  #define CONFIG_MXC_UART_BASE           UART2_BASE
>  #define CONFIG_CONSOLE_DEV             "ttymxc1"
>  #define CONFIG_MMCROOT                 "/dev/mmcblk1p2"
> @@ -149,6 +147,7 @@
>  #define CONFIG_IMX_VIDEO_SKIP
>
>  #include <config_distro_defaults.h>
> +#include "mx6_common.h"
>
>  /* 256M RAM (minimum), 32M uncompressed kernel, 16M compressed kernel,
> 1M fdt,
>   * 1M script, 1M pxe and the ramdisk at the end */
> diff --git a/include/configs/mx6cuboxi.h b/include/configs/mx6cuboxi.h
> index c0f7f8b..3204191 100644
> --- a/include/configs/mx6cuboxi.h
> +++ b/include/configs/mx6cuboxi.h
> @@ -192,12 +192,21 @@
>  #define CONFIG_SYS_LONGHELP
>  #define CONFIG_SYS_HUSH_PARSER
>  #define CONFIG_AUTO_COMPLETE
> -#define CONFIG_SYS_CBSIZE              256
> -#define CONFIG_SYS_MAXARGS             16
>  #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
>
>  #define CONFIG_CMDLINE_EDITING
>
> +/* Physical Memory Map */
> +#define CONFIG_NR_DRAM_BANKS           1
> +#define CONFIG_SYS_SDRAM_BASE          MMDC0_ARB_BASE_ADDR
> +#define CONFIG_SYS_INIT_RAM_ADDR       IRAM_BASE_ADDR
> +#define CONFIG_SYS_INIT_RAM_SIZE       IRAM_SIZE
> +#define CONFIG_SYS_INIT_SP_OFFSET \
> +       (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
> +#define CONFIG_SYS_INIT_SP_ADDR \
> +       (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
> +
> +
>  /* Environment organization */
>  #define CONFIG_ENV_SIZE                        (8 * 1024)
>  #define CONFIG_ENV_IS_IN_MMC
>
>
> If nobody complains, I can apply your patchset introducing theses fixes.

Please do, getting them applied so we can move forward would be great.

Peter

> Or would you send a V3 that fixes them, too ?
>
> 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@denx.de
> =====================================================================
Stefano Babic May 26, 2015, 2:06 p.m. UTC | #2
Hi Peter, Heiko,

On 26/05/2015 15:23, Peter Robinson wrote:
> 
> Please do, getting them applied so we can move forward would be great.
> 

Ok, all boards compile fine now - I have pushed all changes.

Heiko, there are several chqanges for the aristainetos board, because
Peter's patches do not apply due to recent merge of aristainetos2 (and
moving to aristainetos-common.h). I hope I did correctly without missing
anything, but please take a look and check if it is ok for you.

Best regards,
Stefano Babic
Fabio Estevam May 27, 2015, 1:45 a.m. UTC | #3
On Tue, May 26, 2015 at 11:06 AM, Stefano Babic <sbabic@denx.de> wrote:
> Hi Peter, Heiko,
>
> On 26/05/2015 15:23, Peter Robinson wrote:
>>
>> Please do, getting them applied so we can move forward would be great.
>>
>
> Ok, all boards compile fine now - I have pushed all changes.

I noticed that this series broke warp board and the board does not boot anymore.

Reverting this series I am able to boot it again.

Will investigate more tomorrow.

Regards,

Fabio Estevam
Fabio Estevam May 27, 2015, 2:08 a.m. UTC | #4
On Tue, May 26, 2015 at 10:45 PM, Fabio Estevam <festevam@gmail.com> wrote:
> On Tue, May 26, 2015 at 11:06 AM, Stefano Babic <sbabic@denx.de> wrote:
>> Hi Peter, Heiko,
>>
>> On 26/05/2015 15:23, Peter Robinson wrote:
>>>
>>> Please do, getting them applied so we can move forward would be great.
>>>
>>
>> Ok, all boards compile fine now - I have pushed all changes.
>
> I noticed that this series broke warp board and the board does not boot anymore.
>
> Reverting this series I am able to boot it again.

Ok, so the problem is commit 8183058188c ("imx6: centralise common
boot options in mx6_common.h"), as it changes all mx6 SoCs to use
CONFIG_LOADADDR=0x12000000, but this is not correct for mx6sx and
mx6sl that should use 0x82000000 instead.

Regards,

Fabio Estevam
Stefano Babic May 27, 2015, 6:26 a.m. UTC | #5
Hi Fabio,

On 27/05/2015 04:08, Fabio Estevam wrote:
> On Tue, May 26, 2015 at 10:45 PM, Fabio Estevam <festevam@gmail.com> wrote:
>> On Tue, May 26, 2015 at 11:06 AM, Stefano Babic <sbabic@denx.de> wrote:
>>> Hi Peter, Heiko,
>>>
>>> On 26/05/2015 15:23, Peter Robinson wrote:
>>>>
>>>> Please do, getting them applied so we can move forward would be great.
>>>>
>>>
>>> Ok, all boards compile fine now - I have pushed all changes.
>>
>> I noticed that this series broke warp board and the board does not boot anymore.
>>
>> Reverting this series I am able to boot it again.
> 
> Ok, so the problem is commit 8183058188c ("imx6: centralise common
> boot options in mx6_common.h"), as it changes all mx6 SoCs to use
> CONFIG_LOADADDR=0x12000000, but this is not correct for mx6sx and
> mx6sl that should use 0x82000000 instead.
> 

urgh...thanks to have solved this, I will pick up your patches soon.

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/include/configs/embestmx6boards.h
b/include/configs/embestmx6boards.h
index cb81e63..56950e0 100644
--- a/include/configs/embestmx6boards.h
+++ b/include/configs/embestmx6boards.h
@@ -13,8 +13,6 @@ 
 #ifndef __RIOTBOARD_CONFIG_H
 #define __RIOTBOARD_CONFIG_H

-#include "mx6_common.h"
-
 #define CONFIG_MXC_UART_BASE		UART2_BASE
 #define CONFIG_CONSOLE_DEV		"ttymxc1"
 #define CONFIG_MMCROOT			"/dev/mmcblk1p2"
@@ -149,6 +147,7 @@ 
 #define CONFIG_IMX_VIDEO_SKIP

 #include <config_distro_defaults.h>
+#include "mx6_common.h"

 /* 256M RAM (minimum), 32M uncompressed kernel, 16M compressed kernel,
1M fdt,
  * 1M script, 1M pxe and the ramdisk at the end */
diff --git a/include/configs/mx6cuboxi.h b/include/configs/mx6cuboxi.h
index c0f7f8b..3204191 100644
--- a/include/configs/mx6cuboxi.h
+++ b/include/configs/mx6cuboxi.h
@@ -192,12 +192,21 @@ 
 #define CONFIG_SYS_LONGHELP
 #define CONFIG_SYS_HUSH_PARSER
 #define CONFIG_AUTO_COMPLETE
-#define CONFIG_SYS_CBSIZE              256
-#define CONFIG_SYS_MAXARGS             16
 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE

 #define CONFIG_CMDLINE_EDITING

+/* Physical Memory Map */
+#define CONFIG_NR_DRAM_BANKS           1
+#define CONFIG_SYS_SDRAM_BASE          MMDC0_ARB_BASE_ADDR
+#define CONFIG_SYS_INIT_RAM_ADDR       IRAM_BASE_ADDR
+#define CONFIG_SYS_INIT_RAM_SIZE       IRAM_SIZE
+#define CONFIG_SYS_INIT_SP_OFFSET \
+	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR \
+	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
+
+
 /* Environment organization */
 #define CONFIG_ENV_SIZE			(8 * 1024)
 #define CONFIG_ENV_IS_IN_MMC