• Hector Martin's avatar
    of/address: Add infrastructure to declare MMIO as non-posted · 89897f73
    Hector Martin authored
    This implements the 'nonposted-mmio' boolean property. Placing this
    property in a bus marks all direct child devices as requiring
    non-posted MMIO mappings. If no such property is found, the default
    is posted MMIO.
    
    of_mmio_is_nonposted() performs this check to determine if a given
    device has requested non-posted MMIO.
    
    of_address_to_resource() uses this to set the IORESOURCE_MEM_NONPOSTED
    flag on resources that require non-posted MMIO.
    
    of_iomap() and of_io_request_and_map() then use this flag to pick the
    correct ioremap() variant.
    
    This mechanism is currently restricted to builds that support Apple ARM
    platforms, as an optimization.
    Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Reviewed-by: default avatarRob Herring <robh@kernel.org>
    Signed-off-by: default avatarHector Martin <marcan@marcan.st>
    89897f73
address.c 28 KB