[lkml]   [2009]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 06/27] score: create head files delay.h device.h div64.h dma-mapping.h dma.h
    On Saturday 13 June 2009, wrote:
    > Arnd Bergmann <> 写于 2009-06-10 01:18:20:
    > > On Tuesday 09 June 2009, wrote:
    > >
    > > Having a working udelay() function is required for many
    > > drivers that are sensitive to timing, you should probably
    > > implement that at some point in the future.
    > Add udelay() implement in code.

    so you use

    static inline void __delay(unsigned long loops)
    __asm__ __volatile__ (
    : "=r" (loops)
    : "0" (loops));

    static inline void __udelay(unsigned long usecs)

    This is much better than before, but is far from exact in the __udelay()
    case. Please take a look at init/calibrate.c and how other architectures
    use loops_per_jiffy if you don't have an exact time source you can use.

    If you have a time source with microsecond resolution or better, just loop
    until the amount of microseconds has expired.

    Arnd <><
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2009-06-14 00:35    [W:0.047 / U:2.512 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site