public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Dirk Behme <dirk.behme@de.bosch.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] mx6: Fix get_board_rev() for the mx6 solo case
Date: Thu, 28 Mar 2013 08:04:28 +0100	[thread overview]
Message-ID: <5153EB7C.5090905@de.bosch.com> (raw)
In-Reply-To: <1364405816-14085-1-git-send-email-fabio.estevam@freescale.com>

On 27.03.2013 18:36, Fabio Estevam wrote:
> When booting a Freescale kernel 3.0.35 on a Wandboard solo, the get_board_rev()
> returns 0x62xxx, which is not a value understood by the VPU 
> (Video Processing Unit) library in the kernel and causes the video playback to 
> fail.
> 
> The expected values for get_board_rev are:
> 0x63xxx: For mx6quad/dual
> 0x61xxx: For mx6dual-lite/solo
> 
> So adjust get_board_rev() accordingly and make it as weak function, so that we
> do not need to define it in every mx6 board file. 
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Acked-by: Dirk Behme <dirk.behme@de.bosch.com>

Thanks

Dirk

> ---
> Changes since v1:
> - Avoid extra call to get_cpu_rev()
> 
>  arch/arm/cpu/armv7/mx6/soc.c                  |   12 ++++++++++++
>  board/boundary/nitrogen6x/nitrogen6x.c        |    5 -----
>  board/freescale/mx6qsabrelite/mx6qsabrelite.c |    5 -----
>  board/freescale/mx6qsabresd/mx6qsabresd.c     |    5 -----
>  board/wandboard/wandboard.c                   |    5 -----
>  5 files changed, 12 insertions(+), 20 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
> index 193ba12..4f3cd14 100644
> --- a/arch/arm/cpu/armv7/mx6/soc.c
> +++ b/arch/arm/cpu/armv7/mx6/soc.c
> @@ -61,6 +61,18 @@ u32 get_cpu_rev(void)
>  	return (type << 12) | (reg + 0x10);
>  }
>  
> +#ifdef CONFIG_REVISION_TAG
> +u32 __weak get_board_rev(void)
> +{
> +	u32 cpurev = get_cpu_rev();
> +	u32 type = ((cpurev >> 12) & 0xff);
> +	if (type == MXC_CPU_MX6SOLO)
> +		cpurev = (MXC_CPU_MX6DL) << 12 | (cpurev & 0xFFF);
> +
> +	return cpurev;
> +}
> +#endif
> +
>  void init_aips(void)
>  {
>  	struct aipstz_regs *aips1, *aips2;
> diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
> index 229c237..1b1bedf 100644
> --- a/board/boundary/nitrogen6x/nitrogen6x.c
> +++ b/board/boundary/nitrogen6x/nitrogen6x.c
> @@ -328,11 +328,6 @@ int board_mmc_init(bd_t *bis)
>  }
>  #endif
>  
> -u32 get_board_rev(void)
> -{
> -	return 0x63000;
> -}
> -
>  #ifdef CONFIG_MXC_SPI
>  iomux_v3_cfg_t const ecspi1_pads[] = {
>  	/* SS1 */
> diff --git a/board/freescale/mx6qsabrelite/mx6qsabrelite.c b/board/freescale/mx6qsabrelite/mx6qsabrelite.c
> index 5b69a6d..782e5ba 100644
> --- a/board/freescale/mx6qsabrelite/mx6qsabrelite.c
> +++ b/board/freescale/mx6qsabrelite/mx6qsabrelite.c
> @@ -298,11 +298,6 @@ int board_mmc_init(bd_t *bis)
>  }
>  #endif
>  
> -u32 get_board_rev(void)
> -{
> -	return 0x63000 ;
> -}
> -
>  #ifdef CONFIG_MXC_SPI
>  iomux_v3_cfg_t const ecspi1_pads[] = {
>  	/* SS1 */
> diff --git a/board/freescale/mx6qsabresd/mx6qsabresd.c b/board/freescale/mx6qsabresd/mx6qsabresd.c
> index 2b3926a..806769f 100644
> --- a/board/freescale/mx6qsabresd/mx6qsabresd.c
> +++ b/board/freescale/mx6qsabresd/mx6qsabresd.c
> @@ -239,11 +239,6 @@ int board_eth_init(bd_t *bis)
>  	return 0;
>  }
>  
> -u32 get_board_rev(void)
> -{
> -	return 0x63000;
> -}
> -
>  int board_early_init_f(void)
>  {
>  	setup_iomux_uart();
> diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
> index d95189f..1e379fb 100644
> --- a/board/wandboard/wandboard.c
> +++ b/board/wandboard/wandboard.c
> @@ -168,11 +168,6 @@ int board_init(void)
>  	return 0;
>  }
>  
> -u32 get_board_rev(void)
> -{
> -	return get_cpu_rev();
> -}
> -
>  int checkboard(void)
>  {
>  	puts("Board: Wandboard\n");

  parent reply	other threads:[~2013-03-28  7:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-27 17:36 [U-Boot] [PATCH v2] mx6: Fix get_board_rev() for the mx6 solo case Fabio Estevam
2013-03-27 18:56 ` Dirk Behme
2013-03-27 19:36   ` Fabio Estevam
2013-03-27 19:47     ` Dirk Behme
2013-03-27 20:02       ` Eric Nelson
2013-03-28  7:04 ` Dirk Behme [this message]
2013-03-28 13:58 ` Eric Nelson
2013-04-03  9:36 ` 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=5153EB7C.5090905@de.bosch.com \
    --to=dirk.behme@de.bosch.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