• Paul Walmsley's avatar
    riscv: separate MMIO functions into their own header file · 0c3ac289
    Paul Walmsley authored
    Separate the low-level MMIO static inline functions and macros, such
    as {read,write}{b,w,l,q}(), into their own header file under
    arch/riscv/include: asm/mmio.h.  This is done to break a header
    dependency chain that arises when both asm/pgtable.h and asm/io.h are
    included by asm/timex.h.  Since the problem is related to the legacy
    I/O port support in asm/io.h, this allows files under arch/riscv that
    encounter those issues to simply include asm/mmio.h instead, and
    bypass the legacy I/O port functions.  Existing users of asm/io.h
    don't need to change anything, since asm/mmio.h is included by
    asm/io.h.
    
    While here, clean up some checkpatch.pl-related issues with the
    original code.
    Signed-off-by: default avatarPaul Walmsley <paul.walmsley@sifive.com>
    0c3ac289
mmio.h 5.62 KB