mx6: Fix get_board_rev() for the mx6 solo case
PATCH 1/1 mx6: Fix get_board_rev() for the mx6 solo case
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.
--- 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(-)
arch/arm/cpu/armv7/mx6/soc.c +12 -0
@@ -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 | (get_cpu_rev () &0xFFF ); + +return cpurev; +} +#endif +void init_aips (void ) {struct aipstz_regs *aips1, *aips2;
board/boundary/nitrogen6x/nitrogen6x.c +0 -5
@@ -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 */
board/freescale/mx6qsabrelite/mx6qsabrelite.c +0 -5
@@ -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 */
board/freescale/mx6qsabresd/mx6qsabresd.c +0 -5
@@ -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 ();
board/wandboard/wandboard.c +0 -5
@@ -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" );
Signature · 1 line
1.7.9.5
PATCH 1/1 mx6: Fix get_board_rev() for the mx6 solo case
Quoted 26 lines · Fabio Estevam
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_revare:
0x63xxx: For mx6quad/dual
0x61xxx: For mx6dual-lite/soloSo 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 <[email protected]>--- 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(-)arch/arm/cpu/armv7/mx6/soc.c +0
-0
arch/arm/cpu/armv7/mx6/soc.c u32 get_cpu_rev(void) · line 70
Quoted 10 lines
arch/arm/cpu/armv7/mx6/soc.c +7
-0@@ -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 | (get_cpu_rev () &0xFFF );
Why call get_cpu_rev again?