• Stephan Gerhold's avatar
    arm64: dts: qcom: msm8916: Reserve firmware memory dynamically · 0ed3d828
    Stephan Gerhold authored
    Most of the reserved firmware memory on MSM8916 can be relocated when
    respecting the required alignment. To avoid having to precompute the
    reserved memory regions in every board DT, describe the actual
    requirements (size, alignment, alloc-ranges) using the dynamic reserved
    memory allocation.
    
    This approach has several advantages:
    
     1. We can define "templates" for the reserved memory regions in
        msm8916.dtsi and keep only device-specific details in the board DT.
        This is useful for the "mpss" region size for example, which varies
        from device to device. It is no longer necessary to redefine all
        firmware regions to shift their addresses.
    
     2. When some of the functionality (e.g. WCNSS, Modem, Venus) is not
        enabled or needed for a device, the reserved memory can stay
        disabled, freeing up the unused reservation for Linux.
    
     3. Devices with special requirements for one of the firmware regions
        are handled automatically. For example, msm8916-longcheer-l8150
        has non-relocatable "wcnss" firmware that must be loaded exactly
        at address 0x8b600000. When this is defined as a static region,
        the other dynamic allocations automatically adjust to a different
        place with suitable alignment.
    
    All in all this approach significantly reduces the boilerplate necessary
    to define the different firmware regions, and makes it easier to enable
    functionality on the different devices.
    Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
    Link: https://lore.kernel.org/r/20230911-msm8916-rmem-v1-4-b7089ec3e3a1@gerhold.netSigned-off-by: default avatarBjorn Andersson <andersson@kernel.org>
    0ed3d828
msm8916-ufi.dtsi 2.02 KB