Commit c901556a authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Greg Kroah-Hartman

staging: wilc1000: give usleep_range a range

usleep_range() is called in non-atomic context so there is little point
in setting min==max as the jitter of hrtimer is determined by interruptions
anyway. usleep_range can only perform the intended coalescence if some
room for placing the hrtimer is provided. Given the range of milliseconds
the delay will be 2+ anyway - so make it 2-2.5 ms which gives hrtimers
space to optimize without negatively impacting performance.
Signed-off-by: default avatarNicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ae26aa84
...@@ -408,7 +408,7 @@ void chip_wakeup(struct wilc *wilc) ...@@ -408,7 +408,7 @@ void chip_wakeup(struct wilc *wilc)
wilc->hif_func->hif_write_reg(wilc, 1, reg & ~BIT(1)); wilc->hif_func->hif_write_reg(wilc, 1, reg & ~BIT(1));
do { do {
usleep_range(2 * 1000, 2 * 1000); usleep_range(2000, 2500);
wilc_get_chipid(wilc, true); wilc_get_chipid(wilc, true);
} while (wilc_get_chipid(wilc, true) == 0); } while (wilc_get_chipid(wilc, true) == 0);
} while (wilc_get_chipid(wilc, true) == 0); } while (wilc_get_chipid(wilc, true) == 0);
...@@ -423,7 +423,7 @@ void chip_wakeup(struct wilc *wilc) ...@@ -423,7 +423,7 @@ void chip_wakeup(struct wilc *wilc)
&clk_status_reg); &clk_status_reg);
while ((clk_status_reg & 0x1) == 0) { while ((clk_status_reg & 0x1) == 0) {
usleep_range(2 * 1000, 2 * 1000); usleep_range(2000, 2500);
wilc->hif_func->hif_read_reg(wilc, 0xf1, wilc->hif_func->hif_read_reg(wilc, 0xf1,
&clk_status_reg); &clk_status_reg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment