Igor,
I'm sorry but my tests don't confirm your statement that the EXT_CLK input frequency could be divided by prescaler in GPT_PR for proper measurements. What we see, is that irrelevant to the prescaler, measurements of the high frequencies are not correct . Here is my test, with 39.6MHz supplied to JTAG_MOD, with IPG_CLK=66 MHz:
# Configure JTAG_MOD as GPT2_CLK
U-Boot > mw.l 0x20E0044 1
# Reset GPT2
U-Boot > mw 0x20e8000 0x8000
# Configure and start GPT2: EXT_CLK, WAITEN, ENMOD, EN
U-Boot > mw 0x20e8000 0x000cb
# Set prescaler to (19 + 1)
U-Boot > mw 0x20e8004 0x13
# MEasure the counter
U-Boot > md 0x20e8024 1;sleep 10;md 0x20e8024 1
020e8024: 123b89c3 ..;.
020e8024: 13050c6b k...
U-Boot >
Calculations shows that calculated value doesn't match 39.6MHz:
(gdb) p (0x13050c6b-0x123b89c3)*20/10 $1 = 26412368 (gdb)
If I set JTAG_MOD (GPT2_CLK) to a lower frequency (eg 16 MHz), measurements are correct.
Could you please comment on the above data?