linux-stable/drivers/staging/fsl-mc/bus
Ioana Radulescu 9989b59961 staging: fsl-mc: convert mc command build/parse to use C structs
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: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-26 17:14:03 -07:00
..
dpbp.c staging: fsl-mc: convert mc command build/parse to use C structs 2016-06-26 17:14:03 -07:00
dpmcp-cmd.h staging: fsl-mc: convert mc command build/parse to use C structs 2016-06-26 17:14:03 -07:00
dpmcp.c staging: fsl-mc: convert mc command build/parse to use C structs 2016-06-26 17:14:03 -07:00
dpmcp.h staging: fsl-mc: update dpmcp binary interface to v3.0 2016-04-29 18:00:45 -07:00
dpmng-cmd.h staging: fsl-mc: convert mc command build/parse to use C structs 2016-06-26 17:14:03 -07:00
dpmng.c staging: fsl-mc: convert mc command build/parse to use C structs 2016-06-26 17:14:03 -07:00
dprc-cmd.h staging: fsl-mc: convert mc command build/parse to use C structs 2016-06-26 17:14:03 -07:00
dprc-driver.c staging: fsl-mc: dprc: fix ordering problem freeing resources in remove of dprc 2016-06-26 17:14:03 -07:00
dprc.c staging: fsl-mc: convert mc command build/parse to use C structs 2016-06-26 17:14:03 -07:00
irq-gic-v3-its-fsl-mc-msi.c staging: fsl-mc: bus: Eliminate double function call 2016-03-11 22:09:09 -08:00
Kconfig staging: fsl-mc: Do not allow building as a module 2016-02-18 20:28:20 -08:00
Makefile staging: fsl-mc: Added GICv3-ITS support for FSL-MC MSIs 2016-02-07 19:10:12 -08:00
mc-allocator.c staging: fsl-mc: clean up the device id struct 2016-06-26 17:14:03 -07:00
mc-bus.c staging: fsl-mc: fix asymmetry in destroy of mc_io 2016-06-26 17:14:03 -07:00
mc-msi.c staging: fsl-mc: properly set hwirq in msi set_desc 2016-06-26 17:14:03 -07:00
mc-sys.c staging: fsl-mc: convert mc command build/parse to use C structs 2016-06-26 17:14:03 -07:00