Fix otp_write to follow vendor's application note

Previously, otp_write() did not follow the vendor's application note.
Specifically, it did not write every bit four times as required by the
application note. Let's implement the write operation by strictly
following the application note: Write four times, then verify. Repeat
this procedure up to 16 times if necessary.

The old code assumed an AXI clock of 400 MHz. Let's determine the AXI
clock rate at runtime and calculate the values for the counter
registers.

Change-Id: I963b5eb152410954e03d2e8429ac37b2ca64081e
2 files changed