]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mx6: Fix get_board_rev() for the mx6 solo case
authorFabio Estevam <fabio.estevam@freescale.com>
Wed, 27 Mar 2013 07:36:55 +0000 (07:36 +0000)
committerStefano Babic <sbabic@denx.de>
Wed, 3 Apr 2013 09:36:34 +0000 (11:36 +0200)
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>
Acked-by: Eric Nelson <eric.nelson@boundarydevices.com>
arch/arm/cpu/armv7/mx6/soc.c
board/boundary/nitrogen6x/nitrogen6x.c
board/freescale/mx6qsabrelite/mx6qsabrelite.c
board/freescale/mx6qsabresd/mx6qsabresd.c
board/wandboard/wandboard.c

index 193ba1240fb3e04b37e21aacf927c7ffd1900fad..2ea8ca3bd354c8a4ca25dc2345eadd15376f7cb5 100644 (file)
@@ -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;
index e5b7795c5b1025d62edb23ca4c9ba1bf31f1bfbe..cc071d6d38c3ea9b9656fd800307b886f8404b6c 100644 (file)
@@ -331,11 +331,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 */
index 0e25613f19f27b168bd4264c0d1342ce590a3eb3..9f9cac82c423295c6c1baf3610106fb3f7e52b77 100644 (file)
@@ -301,11 +301,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 */
index 73ab4485ec809ecbb26719882d633baee100cf63..0d7cb9efd0233b6236be623a2486389597c44af0 100644 (file)
@@ -254,11 +254,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();
index 8d071e1fe12152ce0e708ab9d3fa0433b3be1867..ac7b89aaec101052d4f494242911741082bbd339 100644 (file)
@@ -170,11 +170,6 @@ int board_init(void)
        return 0;
 }
 
-u32 get_board_rev(void)
-{
-       return get_cpu_rev();
-}
-
 int checkboard(void)
 {
        puts("Board: Wandboard\n");