view target-utils/libload/cmd_blankchk.c @ 619:f82551c77e58

libserial-newlnx: ASYNC_LOW_LATENCY patch reverted Reports from Das Signal indicate that loadtools performance on Debian is about the same as on Slackware, and that including or omitting the ASYNC_LOW_LATENCY patch from Serg makes no difference. Because the patch in question does not appear to be necessary, it is being reverted until and unless someone other than Serg reports an actual real-world system on which loadtools operation times are slowed compared to the Mother's Slackware reference and on which Slackware-like performance can be restored by setting the ASYNC_LOW_LATENCY flag.
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 27 Feb 2020 01:09:48 +0000
parents e7502631a0f9
children
line wrap: on
line source

/*
 * Flash blank check command
 */

#include <sys/types.h>
#include "types.h"

void
cmd_blankchk(argbulk)
	char *argbulk;
{
	char *argv[3];
	u_long start, length;
	u_long addr;
	int c;

	if (parse_args(argbulk, 2, 2, argv, 0) < 0)
		return;
	if (parse_hexarg(argv[0], 8, &start) < 0) {
		printf("ERROR: arg1 must be a valid 32-bit hex address\n");
		return;
	}
	if (parse_hexarg(argv[1], 8, &length) < 0) {
	    printf("ERROR: arg2 must be a valid 32-bit hex value (length)\n");
		return;
	}
	for (addr = start; addr < start + length; addr++) {
		c = *(volatile u8 *)addr;
		if (c != 0xFF) {
			printf("Not blank: %02X at %08X\n", c, addr);
			return;
		}
	}
	printf("OK\n");
}