[lkml]   [2004]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Being more anal about iospace accesses..

    On Wed, 15 Sep 2004, Deepak Saxena wrote:
    > Since we are on the subject of io-access, I would like a
    > clarification/opinion on the read*/write* & in*/out* accessors
    > (and now the ioread/write equivalents). Are these functions only meant
    > to be used for PCI memory-mapped devices or _any_ memory mapped devices?

    It really depends on the bus architecture.

    At some point, if the bus is different enough from a "normal" setup, you
    should just use your own accessor functions. Trying to overload
    "readl/writel" is just too painful.

    However, at that point you should also realize that you can't re-use _any_
    of the existing chip drivers, and you'll have to write your own. If the
    bus is exotic enough, that's not a problem, and you'd have to do that
    anyway. But there really aren't all that many "exotic" buses around any

    Quite frankly, of your two suggested interfaces, I would select neither.
    I'd just say that if your bus is special enough, just write your own
    drivers, and use

    cookie = ixp4xx_iomap(dev, xx);
    ixp4xx_iowrite(val, cookie + offset);

    which is perfectly valid. You don't have to make these devices even _look_
    like a PCI device. Why should you?

    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-11-18 23:46    [W:0.025 / U:58.504 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site