> -----Original Message-----
> From: Akhil Goyal [mailto:[email protected]]
> Sent: Thursday, August 24, 2017 1:01 AM
> To: [email protected]; De Lara Guarch, Pablo
> <[email protected]>
> Cc: Doherty, Declan <[email protected]>; Mcnamara, John
> <[email protected]>; [email protected]; Akhil Goyal
> <[email protected]>
> Subject: [PATCH 1/4] bus/dpaa: scan for DPAA Crypto devices
>
> Signed-off-by: Shreyansh Jain <[email protected]>
> Signed-off-by: Akhil Goyal <[email protected]>
> ---
> config/defconfig_arm64-dpaa-linuxapp-gcc | 3 ++
> drivers/bus/dpaa/dpaa_bus.c | 51
> ++++++++++++++++++++++++++++++++
> 2 files changed, 54 insertions(+)
>
> diff --git a/config/defconfig_arm64-dpaa-linuxapp-gcc
> b/config/defconfig_arm64-dpaa-linuxapp-gcc
> index c0f5e4a..7c8cf3c 100644
> --- a/config/defconfig_arm64-dpaa-linuxapp-gcc
> +++ b/config/defconfig_arm64-dpaa-linuxapp-gcc
> @@ -62,3 +62,6 @@
> CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS="dpaa"
> # Compile software NXP DPAA PMD
> CONFIG_RTE_LIBRTE_DPAA_PMD=y
> CONFIG_RTE_LIBRTE_DPAA_PMD_DEBUG=n
> +
> +# DPAA CAAM driver instances
> +CONFIG_RTE_LIBRTE_DPAA_MAX_CRYPTODEV=4
> diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
> index 7ae5bfa..18c8d97 100644
> --- a/drivers/bus/dpaa/dpaa_bus.c
> +++ b/drivers/bus/dpaa/dpaa_bus.c
> @@ -93,6 +93,21 @@ dpaa_remove_from_device_list(struct
> rte_dpaa_device *dev)
> TAILQ_INSERT_TAIL(&rte_dpaa_bus.device_list, dev, next); }
>
> +/* Reads the SEC device and ERA from DTS by using the of library
Missing a word between "the" and "of"?
> + * Returns -1 if SEC devices not available, 0 otherwise */ static
> +inline int
> +dpaa_sec_available(void)
> +{
> + const struct device_node *caam_node;
> +
> + for_each_compatible_node(caam_node, NULL, "fsl,sec-v4.0") {
> + return 0;
> + }
> +
> + return -1;
> +}
> +
> static void dpaa_clean_device_list(void);
>
> static int
> @@ -134,6 +149,42 @@ dpaa_create_device_list(void)
>
> rte_dpaa_bus.device_count = i;
>
> + /* Unlike case of ETH, RTE_LIBRTE_DPAA_MAX_CRYPTODEV SEC
> devices are
> + * constantly created only if "sec" property is found in the device
> + * tree. Logically there is no limit (QI interfaces), for number of
> + * device, that can be created.
> + */
I would reword the last sentence, probably removing the commas and changing
"device" for "devices".