diff mbox

[U-Boot,2/3] i.MX6: mx6qsabrelite: add MACH_TYPE_MX6Q_SABRELITE

Message ID 1330728909-12203-3-git-send-email-eric.nelson@boundarydevices.com
State Rejected
Headers show

Commit Message

Eric Nelson March 2, 2012, 10:55 p.m. UTC
Allow non-dt kernels to boot

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
---
 board/freescale/mx6qsabrelite/mx6qsabrelite.c |    6 ++++--
 include/configs/mx6qsabrelite.h               |    1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

Comments

Marek Vasut March 2, 2012, 11 p.m. UTC | #1
> Allow non-dt kernels to boot
> 
> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
> ---
>  board/freescale/mx6qsabrelite/mx6qsabrelite.c |    6 ++++--
>  include/configs/mx6qsabrelite.h               |    1 +
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/board/freescale/mx6qsabrelite/mx6qsabrelite.c
> b/board/freescale/mx6qsabrelite/mx6qsabrelite.c index 590030b..2786482
> 100644
> --- a/board/freescale/mx6qsabrelite/mx6qsabrelite.c
> +++ b/board/freescale/mx6qsabrelite/mx6qsabrelite.c
> @@ -282,8 +282,10 @@ int board_early_init_f(void)
> 
>  int board_init(void)
>  {
> -       /* address of boot parameters */
> -       gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
> +	/* board id for linux */
> +	gd->bd->bi_arch_number = MACH_TYPE_MX6Q_SABRELITE;
> +	/* address of boot parameters */
> +	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
> 
>         return 0;
>  }
> diff --git a/include/configs/mx6qsabrelite.h
> b/include/configs/mx6qsabrelite.h index 85f6f7a..53869a9 100644
> --- a/include/configs/mx6qsabrelite.h
> +++ b/include/configs/mx6qsabrelite.h
> @@ -27,6 +27,7 @@
>  #define CONFIG_SYS_MX6_CLK32           32768
>  #define CONFIG_DISPLAY_CPUINFO
>  #define CONFIG_DISPLAY_BOARDINFO
> +#define MACH_TYPE_MX6Q_SABRELITE       3769

Just use #define CONFIG_MACH_TYPE 3769

M
Stefano Babic March 3, 2012, 10:28 a.m. UTC | #2
On 02/03/2012 23:55, Eric Nelson wrote:
> Allow non-dt kernels to boot
> 
> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
> ---
>  board/freescale/mx6qsabrelite/mx6qsabrelite.c |    6 ++++--
>  include/configs/mx6qsabrelite.h               |    1 +
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/board/freescale/mx6qsabrelite/mx6qsabrelite.c b/board/freescale/mx6qsabrelite/mx6qsabrelite.c
> index 590030b..2786482 100644
> --- a/board/freescale/mx6qsabrelite/mx6qsabrelite.c
> +++ b/board/freescale/mx6qsabrelite/mx6qsabrelite.c
> @@ -282,8 +282,10 @@ int board_early_init_f(void)
>  
>  int board_init(void)
>  {
> -       /* address of boot parameters */
> -       gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
> +	/* board id for linux */
> +	gd->bd->bi_arch_number = MACH_TYPE_MX6Q_SABRELITE;

You do not needed. This is done in common code. Add only
CONFIG_MACH_TYPE in mx6qsabrelite.h

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/board/freescale/mx6qsabrelite/mx6qsabrelite.c b/board/freescale/mx6qsabrelite/mx6qsabrelite.c
index 590030b..2786482 100644
--- a/board/freescale/mx6qsabrelite/mx6qsabrelite.c
+++ b/board/freescale/mx6qsabrelite/mx6qsabrelite.c
@@ -282,8 +282,10 @@  int board_early_init_f(void)
 
 int board_init(void)
 {
-       /* address of boot parameters */
-       gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
+	/* board id for linux */
+	gd->bd->bi_arch_number = MACH_TYPE_MX6Q_SABRELITE;
+	/* address of boot parameters */
+	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
        return 0;
 }
diff --git a/include/configs/mx6qsabrelite.h b/include/configs/mx6qsabrelite.h
index 85f6f7a..53869a9 100644
--- a/include/configs/mx6qsabrelite.h
+++ b/include/configs/mx6qsabrelite.h
@@ -27,6 +27,7 @@ 
 #define CONFIG_SYS_MX6_CLK32           32768
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
+#define MACH_TYPE_MX6Q_SABRELITE       3769
 
 #include <asm/arch/imx-regs.h>