5 diag_func_t
*diag_sequence
[] =
7 mem_data_bus_test
, /* DRAM Data bus test */
8 mem_address_bus_test
, /* DRAM Address bus test */
9 mem_device_test
, /* DRAM device test */
13 //gbe_mac_loopback_test,
14 //gbe_external_loopback_test,
16 rtc_test
, /* RTC test */
20 unsigned int *mem_test_start_offset
;
21 unsigned int *mem_test_end_offset
;
26 diag_func_t
**diag_func_ptr
;
28 printf("\n\nRunning diagnostics ...\n");
30 /* Get the start and the end memory address offset for memory test */
31 diag_get_mem_detail(&mem_test_start_offset
, &mem_test_end_offset
);
33 for (diag_func_ptr
= diag_sequence
; *diag_func_ptr
; ++diag_func_ptr
)
36 if((*diag_func_ptr
)())
40 if(*diag_func_ptr
== NULL
)
41 printf("\nDiag completed\n");
43 printf("\nDiag FAILED\n");
46 void diag_init(char *board_name
)
48 /* Init interrupts - we would need this as we use timer interrupt in udelay */
51 /* Initialize board so that all the GPIO are set & we are good to init serial */
52 diag_board_init(board_name
);
54 /* Get the start and the end memory address offset for memory test */
55 diag_get_mem_detail(&mem_test_start_offset
, &mem_test_end_offset
);
58 diag_serial_init(DIAG_SERIAL_CONSOLE_PORT
, DIAG_BAUD_RATE
);