ata: pata_hpt37x: move claculating PCI clock from hpt37x_clock_slot()
authorSergey Shtylyov <s.shtylyov@omp.ru>
Sun, 15 May 2022 20:41:23 +0000 (23:41 +0300)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Mon, 13 Jun 2022 02:42:58 +0000 (11:42 +0900)
commit305f8db79d76ac3e047fe5004d2175b5835bb7fc
tree75b1a54cb5a5347d6efb97a8e35056f651a165ec
parent34a4d048d3cf11546864bc09ddab6c2e7b0f7e65
ata: pata_hpt37x: move claculating PCI clock from hpt37x_clock_slot()

hpt37x_init_one() incorrectly calls an averaged f_CNT register value 'freq'
and hpt37x_clock_slot() takes that value as the 'freq' parameter -- rename
the former variable to 'fcnt' and move the actual code calculating the PCI
clock from hpt37x_clock_slot() to hpt37x_init_one(), along with adding the
frequency clamping code, in preparation for the factoring out the PCI clock
detection, so that this driver would become more like the 'pata_hpt3x2n'
driver...

Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
drivers/ata/pata_hpt37x.c