Commit graph

8 commits

Author SHA1 Message Date
Ramiro Oliveira f86a180868 Staging: fsl-mc: Fix unaligned * in block comments
Align the * in some block comments as reported by checkpatch.

Signed-off-by: Ramiro Oliveira <roliveir@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-02 17:29:11 +02:00
Stuart Yoder d4e75132bd staging: fsl-mc: make order of includes consistent
There are 3 kinds of headers included in the bus driver components--
misc linux/include files, public bus driver includes, and includes
private to the bus driver.

Cleanup the order and formatting of includes in the bus driver to be
consistent:
    #include <linux/include/[file].h>
    #include ../include/[file].h  // public bus driver includes (eventually
                                  // destined for: linux/include/fsl)
    [blank line]
    #include "[file].h"           // private bus driver includes

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-01 17:57:26 +02:00
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
Stuart Yoder ac0619981d staging: fsl-mc: update dprc binary interface to v5.1
The meaning of the "status" parameter in dprc_get_irq_status
has changed, and this patch updates the flib and caller
of the API.

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29 18:00:45 -07:00
J. German Rivera ba72f25b25 staging: fsl-mc: Fixed uintX_t CHECK checkpatch warnings
Replaced all uses of uintX_t types to uX types, to be
checkpatch clean.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:24:20 +02:00
J. German Rivera e9bf3f206b staging: fsl-mc: Moved kernel-doc comments to .c files
Moved kernel-doc comments for non-inline functions
from header files to .c files.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:24:20 +02:00
J. German Rivera 1ee695fab3 staging: fsl-mc: up-rev dprc binary interface to v4.0
Add cmd_flags parameter to all dprc APIs to comply
with the dprc 4.0 MC interface. Updated MC version
major number.  Pass irq args in struct instead of
separate args.

dprc 4.0 uses MC-relative offsets to specify object regions,
instead of physical addresses. So, translate_mc_addr() and
struct fsl_mc_addr_translation_range need to be updated
accordingly.

Update commands for 4.0: add new commands 'set/get
obj irq', 'set obj label', 'get obj descriptor'.
Remove 'get portal paddr'.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:23:40 +02:00
J. German Rivera 31c889653c staging: fsl-mc: Added Freescale Management Complex APIs
APIs to access the Management Complex (MC) hardware
module of Freescale LS2 SoCs. This patch includes
APIs to check the MC firmware version and to manipulate
DPRC objects in the MC.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:28:09 -08:00