On Mon, 24 Oct 2016 17:29:25 +0530
Shreyansh Jain <shreyansh.jain at nxp.com> wrote:

> From: Jan Viktorin <viktorin at rehivetech.com>
> 
> Define initial structures and functions for the SoC infrastructure.
> This patch supports only a very minimal functions for now.
> More features will be added in the following commits.
> 
> Includes rte_device/rte_driver inheritance of
> rte_soc_device/rte_soc_driver.
> 
> Signed-off-by: Jan Viktorin <viktorin at rehivetech.com>
> Signed-off-by: Shreyansh Jain <shreyansh.jain at nxp.com>
> Signed-off-by: Hemant Agrawal <hemant.agrawal at nxp.com>
> ---
>  app/test/Makefile                       |   1 +
>  app/test/test_soc.c                     |  90 +++++++++++++++++++++
>  lib/librte_eal/common/Makefile          |   2 +-
>  lib/librte_eal/common/eal_private.h     |   4 +
>  lib/librte_eal/common/include/rte_soc.h | 138 
> ++++++++++++++++++++++++++++++++
>  5 files changed, 234 insertions(+), 1 deletion(-)
>  create mode 100644 app/test/test_soc.c
>  create mode 100644 lib/librte_eal/common/include/rte_soc.h
> 
> diff --git a/app/test/Makefile b/app/test/Makefile

[...]

> +++ b/lib/librte_eal/common/include/rte_soc.h
> @@ -0,0 +1,138 @@

[...]

> +
> +#include <stdio.h>
> +#include <stdlib.h>
> +#include <stdint.h>
> +#include <inttypes.h>
> +#include <string.h>
> +
> +#include <rte_dev.h>
> +#include <rte_debug.h>
> +
> +struct rte_soc_id {
> +     const char *compatible; /**< OF compatible specification */
> +     uint64_t priv_data;     /**< SoC Driver specific data */

Do you expect this to be a pointer?

> +};
> +

[...]

> +
> +/**
> + * Initialization function for the driver called during SoC probing.
> + */
> +typedef int (soc_devinit_t)(struct rte_soc_driver *, struct rte_soc_device 
> *);
> +
> +/**
> + * Uninitialization function for the driver called during hotplugging.
> + */
> +typedef int (soc_devuninit_t)(struct rte_soc_device *);
> +
> +/**
> + * A structure describing a SoC driver.
> + */
> +struct rte_soc_driver {
> +     TAILQ_ENTRY(rte_soc_driver) next;  /**< Next in list */
> +     struct rte_driver driver;          /**< Inherit core driver. */
> +     soc_devinit_t *devinit;            /**< Device initialization */
> +     soc_devuninit_t *devuninit;        /**< Device uninitialization */

Shouldn't those functions be named probe/remove?

> +     const struct rte_soc_id *id_table; /**< ID table, NULL terminated */
> +};
> +

[...]

> +#endif



-- 
   Jan Viktorin                  E-mail: Viktorin at RehiveTech.com
   System Architect              Web:    www.RehiveTech.com
   RehiveTech
   Brno, Czech Republic

Reply via email to