/* Write new etr control register if it differs from the current one. Return 1 if etr_tolec has been updated as well.  */
static void etr_update_eacr(struct etr_eacr eacr)
/* Write new etr control register if it differs from the current one. Return 1 if etr_tolec has been updated as well.  */
static void etr_update_eacr(struct etr_eacr eacr)
{
	int dp_changed;
	if (memcmp(&etr_eacr, &eacr, sizeof(eacr)) == 0)
		return;
	dp_changed = etr_eacr.e0 > eacr.e0 || etr_eacr.e1 > eacr.e1 ||
		(etr_eacr.dp ^ eacr.dp) != 0;
	etr_eacr = eacr;
	etr_setr(&etr_eacr);
	if (dp_changed)
		etr_tolec = get_clock();
}