mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 05:04:02 +02:00
clk: clocking-wizard: optimize clock search
When an exact clock match is found, there is no need to continue
searching. This process was optimized for versal as part of
'commit e0a94c6bb5 ("clk: xilinx: Optimize divisor search in
clk_wzrd_get_divisors_ver()")' but that logic wasn't applied to
the non-versal driver.
Apply this fast-exit logic to the non-versal driver.
Reviewed-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
This commit is contained in:
parent
006ba909c2
commit
9329714414
|
|
@ -422,6 +422,9 @@ static int clk_wzrd_get_divisors(struct clk_hw *hw, unsigned long rate,
|
|||
divider->d = d;
|
||||
divider->o = o >> 3;
|
||||
divider->o_frac = (o - (divider->o << 3)) * 125;
|
||||
|
||||
if (!diff)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user