From: Vasili Galka Date: Mon, 16 Jun 2014 14:40:59 +0000 (+0300) Subject: Fix bug in io64 target (introduced by commit aba27ac) X-Git-Tag: v2014.07-rc4~65 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2e436467828969b6c9569c21bbe400b2b5b7a27c;p=u-boot Fix bug in io64 target (introduced by commit aba27ac) From comparison of current logic and the logic that was prior to commit aba27ac, we see that first parameter of FPGA_GET_REG() shall be the FPGA index and not channel number. The re-factoring in commit aba27ac accidentally changed that. Cc: Stefan Roese Acked-by: Dirk Eibach Signed-off-by: Vasili Galka --- diff --git a/board/gdsys/405ex/io64.c b/board/gdsys/405ex/io64.c index 2f8e306261..3a075c471f 100644 --- a/board/gdsys/405ex/io64.c +++ b/board/gdsys/405ex/io64.c @@ -287,7 +287,7 @@ int last_stage_init(void) for (fpga = 0; fpga < 2; ++fpga) { for (k = 0; k < 32; ++k) { u16 status; - FPGA_GET_REG(k, ch[k].status_int, &status); + FPGA_GET_REG(fpga, ch[k].status_int, &status); if (!(status & (1 << 4))) { failed = 1; printf("fpga %d channel %d: no serdes lock\n", @@ -304,7 +304,7 @@ int last_stage_init(void) for (fpga = 0; fpga < 2; ++fpga) { for (k = 0; k < 32; ++k) { u16 status; - FPGA_GET_REG(k, hicb_ch[k].status_int, &status); + FPGA_GET_REG(fpga, hicb_ch[k].status_int, &status); if (status) printf("fpga %d hicb %d: hicb status %04x\n", fpga, k, status);