lkml.org 
[lkml]   [1999]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: When to use ioremap?
    Date
    From
    >IO-mapping.txt describes reading from I/O space like
    > unsigned value = readl(0xc0000);
    >but it describes writing with ioremap().
    >
    >Why does reading not require ioremap, while writing does?

    0xc0000 is in the ISA memory space. This area is special in that (on PC
    machines at least) you can access it without ioremap, and in fact ioremap will
    just return the original address. It's still good practice to use ioremap for
    this sort of memory though. The example of writing is to a different memory
    area for which ioremap is always needed.

    >And the file seems to imply that read/write[bwl] should be the sole way
    >to address I/O memory.

    That's correct, though you can get away with just dereferencing a pointer
    under some circumstances on some architectures.

    p.



    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:51    [W:2.399 / U:0.432 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site