mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 11:33:28 +02:00
dsa: lan9303: write reg only if necessary
As the regmap_write() is over a slow bus that will sleep, we can speed up the boot-up time a bit by not bothering to clear a bit that is already clear. Signed-off-by: Jerry Ray <jerry.ray@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
601f574a1b
commit
de375aa860
|
|
@ -915,8 +915,11 @@ static int lan9303_setup(struct dsa_switch *ds)
|
||||||
if (ret)
|
if (ret)
|
||||||
return (ret);
|
return (ret);
|
||||||
|
|
||||||
reg &= ~LAN9303_VIRT_SPECIAL_TURBO;
|
/* Clear the TURBO Mode bit if it was set. */
|
||||||
regmap_write(chip->regmap, LAN9303_VIRT_SPECIAL_CTRL, reg);
|
if (reg & LAN9303_VIRT_SPECIAL_TURBO) {
|
||||||
|
reg &= ~LAN9303_VIRT_SPECIAL_TURBO;
|
||||||
|
regmap_write(chip->regmap, LAN9303_VIRT_SPECIAL_CTRL, reg);
|
||||||
|
}
|
||||||
|
|
||||||
ret = lan9303_setup_tagging(chip);
|
ret = lan9303_setup_tagging(chip);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user