[flashrom] [patch] atavia

Tadas Slotkus devtadas at gmail.com
Wed Jul 27 01:03:10 CEST 2011


> Okay, so it still doesn't work.  The 6421 is being clever, and coping
> with that is really something I don't care to do, at least right now.
> 
> 	Jonathan Kollasch

Hi, thanks for the patch. Could you tell us more about the problems you
encountered? I may have some time after summer to play with that
programmer, so some info would be appreciated :)

> +static bool atavia_ready(void)
> +{
> +	int try;
> +	uint8_t access;
> +	bool status;
> +
> +	for (status = false, try = 0; try < 300; try++) {
> +		access = pci_read_byte(pcidev_dev, BROM_ACCESS);
> +		if ((access & BROM_TRIGGER) == 0) {
> +			status = true;
> +			break;
> +		} else {
> +			programmer_delay(1);
> +			continue;
> +		}
> +	}
> +
> +	msg_pdbg("%s() %s after %d tries\n", __FUNCTION__,
> +		 status ? "suceeded" : "failed", try);
> +
> +	return status;
> +}
Is 'continue' required? msg_pdbg should be printed only if failed or
should be spew? (generates 3*Chip_size_in_bytes number of lines in
writing at least)

What about bool type usage in this project? We are using integers
here :)

Thanks,
Tadas





More information about the flashrom mailing list