All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] imx6: drop duplicated bss memset and board_init_r() call
@ 2017-08-28 18:58 Anatolij Gustschin
  2017-08-28 19:00 ` Łukasz Majewski
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Anatolij Gustschin @ 2017-08-28 18:58 UTC (permalink / raw)
  To: u-boot

bss section is cleared in crt0.S. board_init_r() is also
entered from crt0 code.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Lukasz Majewski <lukma@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
---
 board/bachmann/ot1200/ot1200_spl.c          | 6 ------
 board/compulab/cm_fx6/spl.c                 | 3 ---
 board/engicam/common/spl.c                  | 6 ------
 board/gateworks/gw_ventana/gw_ventana_spl.c | 3 ---
 board/kosagi/novena/novena_spl.c            | 6 ------
 board/liebherr/mccmon6/spl.c                | 6 ------
 board/udoo/udoo_spl.c                       | 6 ------
 board/wandboard/spl.c                       | 6 ------
 8 files changed, 42 deletions(-)

diff --git a/board/bachmann/ot1200/ot1200_spl.c b/board/bachmann/ot1200/ot1200_spl.c
index 9d28da4..f3dff95 100644
--- a/board/bachmann/ot1200/ot1200_spl.c
+++ b/board/bachmann/ot1200/ot1200_spl.c
@@ -151,10 +151,4 @@ void board_init_f(ulong dummy)
 
 	/* configure MMDC for SDRAM width/size and per-model calibration */
 	ot1200_spl_dram_init();
-
-	/* Clear the BSS. */
-	memset(__bss_start, 0, __bss_end - __bss_start);
-
-	/* load/boot image from boot device */
-	board_init_r(NULL, 0);
 }
diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c
index bba977f..56aac60 100644
--- a/board/compulab/cm_fx6/spl.c
+++ b/board/compulab/cm_fx6/spl.c
@@ -336,9 +336,6 @@ void board_init_f(ulong dummy)
 		puts("!!!ERROR!!! DRAM detection failed!!!\n");
 		hang();
 	}
-
-	memset(__bss_start, 0, __bss_end - __bss_start);
-	board_init_r(NULL, 0);
 }
 
 void board_boot_order(u32 *spl_boot_list)
diff --git a/board/engicam/common/spl.c b/board/engicam/common/spl.c
index a8a7cf3..1f2826a 100644
--- a/board/engicam/common/spl.c
+++ b/board/engicam/common/spl.c
@@ -384,10 +384,4 @@ void board_init_f(ulong dummy)
 
 	/* DDR initialization */
 	spl_dram_init();
-
-	/* Clear the BSS. */
-	memset(__bss_start, 0, __bss_end - __bss_start);
-
-	/* load/boot image from boot device */
-	board_init_r(NULL, 0);
 }
diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c
index 9524da7..e107f15 100644
--- a/board/gateworks/gw_ventana/gw_ventana_spl.c
+++ b/board/gateworks/gw_ventana/gw_ventana_spl.c
@@ -637,9 +637,6 @@ void board_init_f(ulong dummy)
 	spl_dram_init(8 << ventana_info.sdram_width,
 		      16 << ventana_info.sdram_size,
 		      board_model);
-
-	/* Clear the BSS. */
-	memset(__bss_start, 0, __bss_end - __bss_start);
 }
 
 void board_boot_order(u32 *spl_boot_list)
diff --git a/board/kosagi/novena/novena_spl.c b/board/kosagi/novena/novena_spl.c
index 3645b75..ffc99b8 100644
--- a/board/kosagi/novena/novena_spl.c
+++ b/board/kosagi/novena/novena_spl.c
@@ -607,10 +607,4 @@ void board_init_f(ulong dummy)
 	udelay(100);
 	mmdc_do_write_level_calibration(&novena_ddr_info);
 	mmdc_do_dqs_calibration(&novena_ddr_info);
-
-	/* Clear the BSS. */
-	memset(__bss_start, 0, __bss_end - __bss_start);
-
-	/* load/boot image from boot device */
-	board_init_r(NULL, 0);
 }
diff --git a/board/liebherr/mccmon6/spl.c b/board/liebherr/mccmon6/spl.c
index 15844ef..56e7d3b 100644
--- a/board/liebherr/mccmon6/spl.c
+++ b/board/liebherr/mccmon6/spl.c
@@ -307,11 +307,5 @@ void board_init_f(ulong dummy)
 
 	/* DDR initialization */
 	spl_dram_init();
-
-	/* Clear the BSS. */
-	memset(__bss_start, 0, __bss_end - __bss_start);
-
-	/* load/boot image from boot device */
-	board_init_r(NULL, 0);
 }
 #endif
diff --git a/board/udoo/udoo_spl.c b/board/udoo/udoo_spl.c
index e83e7c3..34ef413 100644
--- a/board/udoo/udoo_spl.c
+++ b/board/udoo/udoo_spl.c
@@ -263,11 +263,5 @@ void board_init_f(ulong dummy)
 
 	/* DDR initialization */
 	spl_dram_init();
-
-	/* Clear the BSS. */
-	memset(__bss_start, 0, __bss_end - __bss_start);
-
-	/* load/boot image from boot device */
-	board_init_r(NULL, 0);
 }
 #endif
diff --git a/board/wandboard/spl.c b/board/wandboard/spl.c
index 47082a8..c3f5fff 100644
--- a/board/wandboard/spl.c
+++ b/board/wandboard/spl.c
@@ -311,11 +311,5 @@ void board_init_f(ulong dummy)
 
 	/* DDR initialization */
 	spl_dram_init();
-
-	/* Clear the BSS. */
-	memset(__bss_start, 0, __bss_end - __bss_start);
-
-	/* load/boot image from boot device */
-	board_init_r(NULL, 0);
 }
 #endif
-- 
2.7.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] imx6: drop duplicated bss memset and board_init_r() call
  2017-08-28 18:58 [U-Boot] [PATCH] imx6: drop duplicated bss memset and board_init_r() call Anatolij Gustschin
@ 2017-08-28 19:00 ` Łukasz Majewski
  2017-08-29 11:02 ` Christian Gmeiner
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Łukasz Majewski @ 2017-08-28 19:00 UTC (permalink / raw)
  To: u-boot

Hi Anatolij,

> bss section is cleared in crt0.S. board_init_r() is also
> entered from crt0 code.

Reviewed-by: Lukasz Majewski <lukma@denx.de>

>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
> Cc: Nikita Kiryanov <nikita@compulab.co.il>
> Cc: Jagan Teki <jagan@amarulasolutions.com>
> Cc: Tim Harvey <tharvey@gateworks.com>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Lukasz Majewski <lukma@denx.de>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> ---
>  board/bachmann/ot1200/ot1200_spl.c          | 6 ------
>  board/compulab/cm_fx6/spl.c                 | 3 ---
>  board/engicam/common/spl.c                  | 6 ------
>  board/gateworks/gw_ventana/gw_ventana_spl.c | 3 ---
>  board/kosagi/novena/novena_spl.c            | 6 ------
>  board/liebherr/mccmon6/spl.c                | 6 ------
>  board/udoo/udoo_spl.c                       | 6 ------
>  board/wandboard/spl.c                       | 6 ------
>  8 files changed, 42 deletions(-)
>
> diff --git a/board/bachmann/ot1200/ot1200_spl.c b/board/bachmann/ot1200/ot1200_spl.c
> index 9d28da4..f3dff95 100644
> --- a/board/bachmann/ot1200/ot1200_spl.c
> +++ b/board/bachmann/ot1200/ot1200_spl.c
> @@ -151,10 +151,4 @@ void board_init_f(ulong dummy)
>
>  	/* configure MMDC for SDRAM width/size and per-model calibration */
>  	ot1200_spl_dram_init();
> -
> -	/* Clear the BSS. */
> -	memset(__bss_start, 0, __bss_end - __bss_start);
> -
> -	/* load/boot image from boot device */
> -	board_init_r(NULL, 0);
>  }
> diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c
> index bba977f..56aac60 100644
> --- a/board/compulab/cm_fx6/spl.c
> +++ b/board/compulab/cm_fx6/spl.c
> @@ -336,9 +336,6 @@ void board_init_f(ulong dummy)
>  		puts("!!!ERROR!!! DRAM detection failed!!!\n");
>  		hang();
>  	}
> -
> -	memset(__bss_start, 0, __bss_end - __bss_start);
> -	board_init_r(NULL, 0);
>  }
>
>  void board_boot_order(u32 *spl_boot_list)
> diff --git a/board/engicam/common/spl.c b/board/engicam/common/spl.c
> index a8a7cf3..1f2826a 100644
> --- a/board/engicam/common/spl.c
> +++ b/board/engicam/common/spl.c
> @@ -384,10 +384,4 @@ void board_init_f(ulong dummy)
>
>  	/* DDR initialization */
>  	spl_dram_init();
> -
> -	/* Clear the BSS. */
> -	memset(__bss_start, 0, __bss_end - __bss_start);
> -
> -	/* load/boot image from boot device */
> -	board_init_r(NULL, 0);
>  }
> diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c
> index 9524da7..e107f15 100644
> --- a/board/gateworks/gw_ventana/gw_ventana_spl.c
> +++ b/board/gateworks/gw_ventana/gw_ventana_spl.c
> @@ -637,9 +637,6 @@ void board_init_f(ulong dummy)
>  	spl_dram_init(8 << ventana_info.sdram_width,
>  		      16 << ventana_info.sdram_size,
>  		      board_model);
> -
> -	/* Clear the BSS. */
> -	memset(__bss_start, 0, __bss_end - __bss_start);
>  }
>
>  void board_boot_order(u32 *spl_boot_list)
> diff --git a/board/kosagi/novena/novena_spl.c b/board/kosagi/novena/novena_spl.c
> index 3645b75..ffc99b8 100644
> --- a/board/kosagi/novena/novena_spl.c
> +++ b/board/kosagi/novena/novena_spl.c
> @@ -607,10 +607,4 @@ void board_init_f(ulong dummy)
>  	udelay(100);
>  	mmdc_do_write_level_calibration(&novena_ddr_info);
>  	mmdc_do_dqs_calibration(&novena_ddr_info);
> -
> -	/* Clear the BSS. */
> -	memset(__bss_start, 0, __bss_end - __bss_start);
> -
> -	/* load/boot image from boot device */
> -	board_init_r(NULL, 0);
>  }
> diff --git a/board/liebherr/mccmon6/spl.c b/board/liebherr/mccmon6/spl.c
> index 15844ef..56e7d3b 100644
> --- a/board/liebherr/mccmon6/spl.c
> +++ b/board/liebherr/mccmon6/spl.c
> @@ -307,11 +307,5 @@ void board_init_f(ulong dummy)
>
>  	/* DDR initialization */
>  	spl_dram_init();
> -
> -	/* Clear the BSS. */
> -	memset(__bss_start, 0, __bss_end - __bss_start);
> -
> -	/* load/boot image from boot device */
> -	board_init_r(NULL, 0);
>  }
>  #endif
> diff --git a/board/udoo/udoo_spl.c b/board/udoo/udoo_spl.c
> index e83e7c3..34ef413 100644
> --- a/board/udoo/udoo_spl.c
> +++ b/board/udoo/udoo_spl.c
> @@ -263,11 +263,5 @@ void board_init_f(ulong dummy)
>
>  	/* DDR initialization */
>  	spl_dram_init();
> -
> -	/* Clear the BSS. */
> -	memset(__bss_start, 0, __bss_end - __bss_start);
> -
> -	/* load/boot image from boot device */
> -	board_init_r(NULL, 0);
>  }
>  #endif
> diff --git a/board/wandboard/spl.c b/board/wandboard/spl.c
> index 47082a8..c3f5fff 100644
> --- a/board/wandboard/spl.c
> +++ b/board/wandboard/spl.c
> @@ -311,11 +311,5 @@ void board_init_f(ulong dummy)
>
>  	/* DDR initialization */
>  	spl_dram_init();
> -
> -	/* Clear the BSS. */
> -	memset(__bss_start, 0, __bss_end - __bss_start);
> -
> -	/* load/boot image from boot device */
> -	board_init_r(NULL, 0);
>  }
>  #endif
>


-- 
Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] imx6: drop duplicated bss memset and board_init_r() call
  2017-08-28 18:58 [U-Boot] [PATCH] imx6: drop duplicated bss memset and board_init_r() call Anatolij Gustschin
  2017-08-28 19:00 ` Łukasz Majewski
@ 2017-08-29 11:02 ` Christian Gmeiner
  2017-08-29 13:30 ` Fabio Estevam
  2017-09-20 13:38 ` Stefano Babic
  3 siblings, 0 replies; 5+ messages in thread
From: Christian Gmeiner @ 2017-08-29 11:02 UTC (permalink / raw)
  To: u-boot

2017-08-28 20:58 GMT+02:00 Anatolij Gustschin <agust@denx.de>:
> bss section is cleared in crt0.S. board_init_r() is also
> entered from crt0 code.
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>

> Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
> Cc: Nikita Kiryanov <nikita@compulab.co.il>
> Cc: Jagan Teki <jagan@amarulasolutions.com>
> Cc: Tim Harvey <tharvey@gateworks.com>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Lukasz Majewski <lukma@denx.de>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> ---
>  board/bachmann/ot1200/ot1200_spl.c          | 6 ------
>  board/compulab/cm_fx6/spl.c                 | 3 ---
>  board/engicam/common/spl.c                  | 6 ------
>  board/gateworks/gw_ventana/gw_ventana_spl.c | 3 ---
>  board/kosagi/novena/novena_spl.c            | 6 ------
>  board/liebherr/mccmon6/spl.c                | 6 ------
>  board/udoo/udoo_spl.c                       | 6 ------
>  board/wandboard/spl.c                       | 6 ------
>  8 files changed, 42 deletions(-)
>
> diff --git a/board/bachmann/ot1200/ot1200_spl.c b/board/bachmann/ot1200/ot1200_spl.c
> index 9d28da4..f3dff95 100644
> --- a/board/bachmann/ot1200/ot1200_spl.c
> +++ b/board/bachmann/ot1200/ot1200_spl.c
> @@ -151,10 +151,4 @@ void board_init_f(ulong dummy)
>
>         /* configure MMDC for SDRAM width/size and per-model calibration */
>         ot1200_spl_dram_init();
> -
> -       /* Clear the BSS. */
> -       memset(__bss_start, 0, __bss_end - __bss_start);
> -
> -       /* load/boot image from boot device */
> -       board_init_r(NULL, 0);
>  }
> diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c
> index bba977f..56aac60 100644
> --- a/board/compulab/cm_fx6/spl.c
> +++ b/board/compulab/cm_fx6/spl.c
> @@ -336,9 +336,6 @@ void board_init_f(ulong dummy)
>                 puts("!!!ERROR!!! DRAM detection failed!!!\n");
>                 hang();
>         }
> -
> -       memset(__bss_start, 0, __bss_end - __bss_start);
> -       board_init_r(NULL, 0);
>  }
>
>  void board_boot_order(u32 *spl_boot_list)
> diff --git a/board/engicam/common/spl.c b/board/engicam/common/spl.c
> index a8a7cf3..1f2826a 100644
> --- a/board/engicam/common/spl.c
> +++ b/board/engicam/common/spl.c
> @@ -384,10 +384,4 @@ void board_init_f(ulong dummy)
>
>         /* DDR initialization */
>         spl_dram_init();
> -
> -       /* Clear the BSS. */
> -       memset(__bss_start, 0, __bss_end - __bss_start);
> -
> -       /* load/boot image from boot device */
> -       board_init_r(NULL, 0);
>  }
> diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c
> index 9524da7..e107f15 100644
> --- a/board/gateworks/gw_ventana/gw_ventana_spl.c
> +++ b/board/gateworks/gw_ventana/gw_ventana_spl.c
> @@ -637,9 +637,6 @@ void board_init_f(ulong dummy)
>         spl_dram_init(8 << ventana_info.sdram_width,
>                       16 << ventana_info.sdram_size,
>                       board_model);
> -
> -       /* Clear the BSS. */
> -       memset(__bss_start, 0, __bss_end - __bss_start);
>  }
>
>  void board_boot_order(u32 *spl_boot_list)
> diff --git a/board/kosagi/novena/novena_spl.c b/board/kosagi/novena/novena_spl.c
> index 3645b75..ffc99b8 100644
> --- a/board/kosagi/novena/novena_spl.c
> +++ b/board/kosagi/novena/novena_spl.c
> @@ -607,10 +607,4 @@ void board_init_f(ulong dummy)
>         udelay(100);
>         mmdc_do_write_level_calibration(&novena_ddr_info);
>         mmdc_do_dqs_calibration(&novena_ddr_info);
> -
> -       /* Clear the BSS. */
> -       memset(__bss_start, 0, __bss_end - __bss_start);
> -
> -       /* load/boot image from boot device */
> -       board_init_r(NULL, 0);
>  }
> diff --git a/board/liebherr/mccmon6/spl.c b/board/liebherr/mccmon6/spl.c
> index 15844ef..56e7d3b 100644
> --- a/board/liebherr/mccmon6/spl.c
> +++ b/board/liebherr/mccmon6/spl.c
> @@ -307,11 +307,5 @@ void board_init_f(ulong dummy)
>
>         /* DDR initialization */
>         spl_dram_init();
> -
> -       /* Clear the BSS. */
> -       memset(__bss_start, 0, __bss_end - __bss_start);
> -
> -       /* load/boot image from boot device */
> -       board_init_r(NULL, 0);
>  }
>  #endif
> diff --git a/board/udoo/udoo_spl.c b/board/udoo/udoo_spl.c
> index e83e7c3..34ef413 100644
> --- a/board/udoo/udoo_spl.c
> +++ b/board/udoo/udoo_spl.c
> @@ -263,11 +263,5 @@ void board_init_f(ulong dummy)
>
>         /* DDR initialization */
>         spl_dram_init();
> -
> -       /* Clear the BSS. */
> -       memset(__bss_start, 0, __bss_end - __bss_start);
> -
> -       /* load/boot image from boot device */
> -       board_init_r(NULL, 0);
>  }
>  #endif
> diff --git a/board/wandboard/spl.c b/board/wandboard/spl.c
> index 47082a8..c3f5fff 100644
> --- a/board/wandboard/spl.c
> +++ b/board/wandboard/spl.c
> @@ -311,11 +311,5 @@ void board_init_f(ulong dummy)
>
>         /* DDR initialization */
>         spl_dram_init();
> -
> -       /* Clear the BSS. */
> -       memset(__bss_start, 0, __bss_end - __bss_start);
> -
> -       /* load/boot image from boot device */
> -       board_init_r(NULL, 0);
>  }
>  #endif
> --
> 2.7.4
>

greets
--
Christian Gmeiner, MSc

https://christian-gmeiner.info

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] imx6: drop duplicated bss memset and board_init_r() call
  2017-08-28 18:58 [U-Boot] [PATCH] imx6: drop duplicated bss memset and board_init_r() call Anatolij Gustschin
  2017-08-28 19:00 ` Łukasz Majewski
  2017-08-29 11:02 ` Christian Gmeiner
@ 2017-08-29 13:30 ` Fabio Estevam
  2017-09-20 13:38 ` Stefano Babic
  3 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2017-08-29 13:30 UTC (permalink / raw)
  To: u-boot

On Mon, Aug 28, 2017 at 3:58 PM, Anatolij Gustschin <agust@denx.de> wrote:
> bss section is cleared in crt0.S. board_init_r() is also
> entered from crt0 code.
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] imx6: drop duplicated bss memset and board_init_r() call
  2017-08-28 18:58 [U-Boot] [PATCH] imx6: drop duplicated bss memset and board_init_r() call Anatolij Gustschin
                   ` (2 preceding siblings ...)
  2017-08-29 13:30 ` Fabio Estevam
@ 2017-09-20 13:38 ` Stefano Babic
  3 siblings, 0 replies; 5+ messages in thread
From: Stefano Babic @ 2017-09-20 13:38 UTC (permalink / raw)
  To: u-boot

On 28/08/2017 20:58, Anatolij Gustschin wrote:
> bss section is cleared in crt0.S. board_init_r() is also
> entered from crt0 code.
> 
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
> Cc: Nikita Kiryanov <nikita@compulab.co.il>
> Cc: Jagan Teki <jagan@amarulasolutions.com>
> Cc: Tim Harvey <tharvey@gateworks.com>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Lukasz Majewski <lukma@denx.de>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> ---


Applied to u-boot-imx, thanks !

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
=====================================================================

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-09-20 13:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-28 18:58 [U-Boot] [PATCH] imx6: drop duplicated bss memset and board_init_r() call Anatolij Gustschin
2017-08-28 19:00 ` Łukasz Majewski
2017-08-29 11:02 ` Christian Gmeiner
2017-08-29 13:30 ` Fabio Estevam
2017-09-20 13:38 ` Stefano Babic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.