]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Blackfin: bf537-stamp: drop uart/flash post tests
authorMike Frysinger <vapier@gentoo.org>
Tue, 10 May 2011 20:07:36 +0000 (16:07 -0400)
committerMike Frysinger <vapier@gentoo.org>
Thu, 29 Sep 2011 20:38:05 +0000 (16:38 -0400)
The flash code has been generalized for everyone, and the uart stub
is simply useless.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
board/bf537-stamp/post.c

index 5007fcbed7ab11fa8cf59b7effe94ff8a5c23d6b..f35cc8ef5ff65f6de611e4f829dec1f3fd9a9f22 100644 (file)
 #include <asm/blackfin.h>
 #include <asm/gpio.h>
 
-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               *