|
|
|
Re: [PATCH 1/2] sh_mobile_ceu: add soft reset function | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
Hi Morimoto-san,
On Wed, Aug 5, 2009 at 7:21 PM, Kuninori
Morimoto<morimoto.kuninori@xxxxxxxxxxx> wrote:
> + while (t--) {
> + if (!(ceu_read(pcdev, CAPSR) & (1 << 16)))
> + break;
> + cpu_relax();
> + }
> +
> + t = 10000;
> + while (t--) {
> + if (!(ceu_read(pcdev, CSTSR) & 1))
> + break;
> + cpu_relax();
> + }
> +}
> +
> /*
> * Videobuf operations
> */
> @@ -366,9 +386,7 @@ static int sh_mobile_ceu_add_device(struct soc_camera_device *icd)
>
> clk_enable(pcdev->clk);
>
> - ceu_write(pcdev, CAPSR, 1 << 16); /* reset */
> - while (ceu_read(pcdev, CSTSR) & 1)
> - msleep(1);
So the original code is using msleep(1) for timing, but your new code
does not have any delay in the loops. Please use some delay code in
there so that the polling times out after a known amount of time. In
this version the time depends on cpu speed which is not so good.
Thanks,
/ magnus
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
[Linux Media] [Older V4L] [Linux DVB] [Video Disk Recorder] [Linux Kernel] [Asterisk] [Photo] [DCCP] [Netdev] [Xorg] [Util Linux NG] [Xfree86] [Free Photo Albums] [Fedora Users] [Fedora Women] [ALSA Users] [ALSA Devel] [SSH] [DVB Maintainers] [Linux USB] [Yosemite Information]
![]() |
![]() |