From: Mike Frysinger Date: Tue, 10 May 2011 20:07:36 +0000 (-0400) Subject: Blackfin: bf537-stamp: drop uart/flash post tests X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=20698b350614d4575afd20bfba1396873bea87a4;p=u-boot.git Blackfin: bf537-stamp: drop uart/flash post tests The flash code has been generalized for everyone, and the uart stub is simply useless. Signed-off-by: Mike Frysinger --- diff --git a/board/bf537-stamp/post.c b/board/bf537-stamp/post.c index 5007fcbed7..f35cc8ef5f 100644 --- a/board/bf537-stamp/post.c +++ b/board/bf537-stamp/post.c @@ -14,60 +14,6 @@ #include #include -int uart_post_test(int flags) -{ - return 0; -} - -#define BLOCK_SIZE 0x10000 -#define VERIFY_ADDR 0x2000000 -extern int erase_block_flash(int); -extern int write_data(long lStart, long lCount, uchar * pnData); -int flash_post_test(int flags) -{ - unsigned short *pbuf, *temp; - int offset, n, i; - int value = 0; - int result = 0; - printf("\n"); - pbuf = (unsigned short *)VERIFY_ADDR; - temp = pbuf; - for (n = FLASH_START_POST_BLOCK; n < FLASH_END_POST_BLOCK; n++) { - offset = (n - 7) * BLOCK_SIZE; - printf("--------Erase block:%2d..", n); - erase_block_flash(n); - printf("OK\r"); - printf("--------Program block:%2d...", n); - write_data(CONFIG_SYS_FLASH_BASE + offset, BLOCK_SIZE, pbuf); - printf("OK\r"); - printf("--------Verify block:%2d...", n); - for (i = 0; i < BLOCK_SIZE; i += 2) { - if (*(unsigned short *)(CONFIG_SYS_FLASH_BASE + offset + i) != - *temp++) { - value = 1; - result = 1; - } - } - if (value) - printf("failed\n"); - else - printf("OK %3d%%\r", - (int)( - (n + 1 - - FLASH_START_POST_BLOCK) * - 100 / (FLASH_END_POST_BLOCK - - FLASH_START_POST_BLOCK))); - - temp = pbuf; - value = 0; - } - printf("\n"); - if (result) - return -1; - else - return 0; -} - /**************************************************** * LED1 ---- PF6 LED2 ---- PF7 * * LED3 ---- PF8 LED4 ---- PF9 *