diff options
author | 2016-06-22 16:40:52 -0500 | |
---|---|---|
committer | 2016-06-26 17:14:03 -0700 | |
commit | 9989b59961a8ad55d92df4588b556f0c6c838ec7 (patch) | |
tree | a12fadd0caa275487bd87fcde3b8786fc01c3f48 /block/blk-lib.c | |
parent | staging: fsl-mc: properly set hwirq in msi set_desc (diff) | |
download | linux-9989b59961a8ad55d92df4588b556f0c6c838ec7.tar.gz linux-9989b59961a8ad55d92df4588b556f0c6c838ec7.tar.bz2 linux-9989b59961a8ad55d92df4588b556f0c6c838ec7.zip |
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>
Diffstat (limited to 'block/blk-lib.c')
0 files changed, 0 insertions, 0 deletions