Re: [PATCH 2/2] dma: add Qualcomm Technologies HIDMA channel driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






On 11/1/2015 3:21 PM, Timur Tabi wrote:
Sinan Kaya wrote:
However, after issuing the command; I still need to wait some amount of
time until hardware acknowledges the commands like reset/enable/disable.
These are relatively faster operations happening in microseconds. That's
why, I have mdelay there.

Can you use readl_poll_timeout()?

Yes, I'm changing them to readl_poll_timeout after looking at the workqueue vs. expected delay requirements. I decided to stick with polled read.

First, I missed the point here that mdelay is discouraged.
https://www.kernel.org/doc/Documentation/timers/timers-howto.txt

According to same document, msleep can sleep up to 20ms which is not what I want.

This code is trying to sleep 10ms maximum and treating longer durations as failures.

readl_poll_timeout calls usleep_range that seems to satisfy what I'm looking for.

--
Sinan Kaya
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux