• Rasmus Villemoes's avatar
    serial: ucc_uart: factor out soft_uart initialization · 96b6b6aa
    Rasmus Villemoes authored
    The "soft uart" mechanism is a workaround for a silicon bug which (as
    far as I know) only affects some PPC-based SOCs.
    
    The code that determines which microcode blob to request relies on
    some powerpc-specific bits (e.g. the mfspr(SPRN_SVR) and hence also
    the asm/reg.h header). This makes it a little awkward to allow this
    driver to be built for non-PPC based SOCs with a QE, even if they are
    not affected by that silicon bug and thus don't need any of the Soft
    UART logic.
    
    There's no way around guarding those bits with some ifdeffery, so to
    keep that isolated, factor out the
    do-we-need-soft-uart-and-if-so-handle-the-firmware to a separate
    function, which we can then easily stub out for non-PPC.
    Reviewed-by: default avatarTimur Tabi <timur@kernel.org>
    Acked-by: default avatarTimur Tabi <timur@kernel.org>
    Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
    Signed-off-by: default avatarLi Yang <leoyang.li@nxp.com>
    96b6b6aa
ucc_uart.c 41.3 KB