board: mscc: serval: Fix board detect
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Mon, 15 Apr 2019 09:56:37 +0000 (11:56 +0200)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Fri, 3 May 2019 14:42:23 +0000 (16:42 +0200)
When detecting the board, it was reading a register in the GPIO page of
the phy and based on that value it was making a decision. The bug was that
after the GPIO page for the first phy was set it was not reseted back.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
board/mscc/serval/serval.c

index 24ee5e5..ade041e 100644 (file)
@@ -42,10 +42,10 @@ static void do_board_detect(void)
                        gd->board_type = BOARD_TYPE_PCB106;
                else
                        gd->board_type = BOARD_TYPE_PCB105;
-               mscc_phy_wr(1, 16, 15, 0);
        } else {
                gd->board_type = BOARD_TYPE_PCB105;
        }
+       mscc_phy_wr(1, 16, 31, 0x0);
 }
 
 #if defined(CONFIG_MULTI_DTB_FIT)