• Ioana Radulescu's avatar
    staging: fsl-mc: convert mc command build/parse to use C structs · 9989b599
    Ioana Radulescu authored
    The layer abstracting the building of commands and extracting
    responses is currently based on macros that shift and mask the command
    fields and requires exposing offset/size values as macro parameters
    and makes the code harder to read.
    For clarity and maintainability, instead use an implementation based on
    mapping the MC command definitions to C structures. These structures
    contain the hardware command fields (which are naturally-aligned)
    and individual fields are little-endian ordering (the byte ordering
    of the hardware).
    As such, there is no need to perform the conversion between core and
    hardware (LE) endianness in mc_send_command(), but instead each
    individual field in a command will be converted separately if needed
    by the function building the command or extracting the response.
    This patch does not introduce functional changes, both the hardware
    ABIs and the APIs exposed for the DPAA2 objects remain the same.
    Signed-off-by: default avatarIoana Radulescu <ruxandra.radulescu@nxp.com>
    Signed-off-by: default avatarStuart Yoder <stuart.yoder@nxp.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Last commit
Last update
dpbp-cmd.h Loading commit data...
dpbp.h Loading commit data...
dpcon-cmd.h Loading commit data...
dpmng.h Loading commit data...
dprc.h Loading commit data...
mc-cmd.h Loading commit data...
mc-private.h Loading commit data...
mc-sys.h Loading commit data...
mc.h Loading commit data...