• Arnd Bergmann's avatar
    mailbox, remoteproc: omap2+: fix compile testing · 54595f28
    Arnd Bergmann authored
    Selecting CONFIG_OMAP2PLUS_MBOX while compile testing
    causes a build failure:
    
    WARNING: unmet direct dependencies detected for OMAP2PLUS_MBOX
      Depends on [n]: MAILBOX [=y] && (ARCH_OMAP2PLUS || ARCH_K3)
      Selected by [m]:
      - TI_K3_M4_REMOTEPROC [=m] && REMOTEPROC [=y] && (ARCH_K3 || COMPILE_TEST [=y])
    
    Using 'select' to force-enable another subsystem is generally
    a mistake and causes problems such as this one, so change the
    three drivers that link against this driver to use 'depends on'
    instead, and ensure the driver itself can be compile tested
    regardless of the platform.
    
    When compile-testing without CONFIG_TI_SCI_PROTOCOL=m, there
    is a chance for a link failure, so add a careful dependency
    on that.
    
    arm-linux-gnueabi-ld: drivers/remoteproc/ti_k3_m4_remoteproc.o: in function `k3_m4_rproc_probe':
    ti_k3_m4_remoteproc.c:(.text.k3_m4_rproc_probe+0x76): undefined reference to `devm_ti_sci_get_by_phandle'
    
    Fixes: ebcf9008 ("remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Reviewed-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
    Reviewed-by: default avatarAndrew Davis <afd@ti.com>
    Reviewed-by: default avatarMartyn Welch <martyn.welch@collabora.com>
    Signed-off-by: default avatarJassi Brar <jassisinghbrar@gmail.com>
    54595f28
omap-mailbox.c 14.7 KB