iio: adc: xilinx: limit pcap clock frequency value
authorManish Narani <manish.narani@xilinx.com>
Mon, 23 Jul 2018 15:02:01 +0000 (20:32 +0530)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 29 Jul 2018 11:49:48 +0000 (12:49 +0100)
commit81f5471838c279c97f0b46f18e766c2ac0de8806
tree5982fe6b985ffa762e49f9a9a4efb9d2c9e82983
parent0a8460966fc28c3c25160c34da055e9a8a0c90a1
iio: adc: xilinx: limit pcap clock frequency value

This patch limits the xadc pcap clock frequency value to be less than
200MHz. This fixes the issue when zynq is booted at higher frequency
values, pcap crosses the maximum limit of 200MHz(Fmax) as it is derived
from IOPLL.
If this limit is crossed it is required to alter the WEDGE and REDGE
bits of XADC_CFG register to make timings better in the interface. So to
avoid alteration of these bits every time, the pcap value should not
cross the Fmax limit.

Signed-off-by: Manish Narani <manish.narani@xilinx.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/xilinx-xadc-core.c