diff options
author | Dirk Eibach <eibach@gdsys.de> | 2011-04-06 13:53:44 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2011-04-21 10:34:19 +0200 |
commit | b9ab8a994d9f83adc8439b758b2a1984def6288c (patch) | |
tree | de685e1bd4f63d58dc606aa7cbfa1e34edf431cd /board | |
parent | 6853cc4b9452f6a03df95cdb5846655a498bd08b (diff) | |
download | u-boot-imx-b9ab8a994d9f83adc8439b758b2a1984def6288c.zip u-boot-imx-b9ab8a994d9f83adc8439b758b2a1984def6288c.tar.gz u-boot-imx-b9ab8a994d9f83adc8439b758b2a1984def6288c.tar.bz2 |
ppc4xx: Improve video board detection
Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board')
-rw-r--r-- | board/gdsys/405ep/dlvision-10g.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/board/gdsys/405ep/dlvision-10g.c b/board/gdsys/405ep/dlvision-10g.c index df7fb14..d7b4fb2 100644 --- a/board/gdsys/405ep/dlvision-10g.c +++ b/board/gdsys/405ep/dlvision-10g.c @@ -31,6 +31,9 @@ #include "../common/osd.h" +#define LATCH2_BASE (CONFIG_SYS_LATCH_BASE + 0x200) +#define LATCH2_MC2_PRESENT_N 0x0080 + enum { UNITTYPE_VIDEO_USER = 0, UNITTYPE_MAIN_USER = 1, @@ -206,8 +209,8 @@ static void print_fpga_info(unsigned dev) */ int checkboard(void) { - unsigned k; char *s = getenv("serial#"); + u16 latch2 = in_le16((void *)LATCH2_BASE); printf("Board: "); @@ -220,20 +223,27 @@ int checkboard(void) puts("\n"); - for (k = 0; k < CONFIG_SYS_FPGA_COUNT; ++k) - print_fpga_info(k); + print_fpga_info(0); + if (!(latch2 & LATCH2_MC2_PRESENT_N)) + print_fpga_info(1); return 0; } int last_stage_init(void) { - unsigned k; + ihs_fpga_t *fpga = (ihs_fpga_t *) CONFIG_SYS_FPGA_BASE(0); + u16 versions = in_le16(&fpga->versions); + u16 latch2 = in_le16((void *)LATCH2_BASE); + + if (((versions >> 4) & 0x000f) != UNITTYPE_MAIN_USER) + return 0; + + if (!get_fpga_state(0)) + osd_probe(0); - for (k = 0; k < CONFIG_SYS_OSD_SCREENS; ++k) - if (!get_fpga_state(k) - || (get_fpga_state(k) == FPGA_STATE_DONE_FAILED)) - osd_probe(k); + if (!(latch2 & LATCH2_MC2_PRESENT_N) && !get_fpga_state(1)) + osd_probe(1); return 0; } |