From 794e6dc552e626eb6dd506baf941873414d9ef73 Mon Sep 17 00:00:00 2001 From: Christian Gromm Date: Wed, 8 Nov 2017 15:51:50 +0100 Subject: src: most: update driver package This patch updates the driver package to v1.7.0-stable. It is needed to have the latest features and bug fixes upstream. Change-Id: Ia3797742a94a0b331985b1b8afe23355fca66f69 Signed-off-by: Christian Gromm --- driver/include/mostcore.h | 17 +++++++++++++++-- driver/include/networking.h | 21 --------------------- 2 files changed, 15 insertions(+), 23 deletions(-) delete mode 100644 driver/include/networking.h (limited to 'driver/include') diff --git a/driver/include/mostcore.h b/driver/include/mostcore.h index 5f8339b..dc87121 100644 --- a/driver/include/mostcore.h +++ b/driver/include/mostcore.h @@ -23,8 +23,9 @@ #define __MOST_CORE_H__ #include +#include /* struct kobj_type */ +#include /* struct attribute */ -struct kobject; struct module; /** @@ -141,6 +142,7 @@ struct most_channel_config { u16 extra_len; u16 subbuffer_size; u16 packets_per_xact; + u16 dbr_size; }; /* @@ -233,20 +235,31 @@ struct mbo { * The callback returns a negative value on error, otherwise 0. * @request_netinfo: triggers retrieving of network info from the HDM by * means of "Message exchange over MDP/MEP" + * The call of the function request_netinfo with the parameter on_netinfo as + * NULL prohibits use of the previously obtained function pointer. * @priv Private field used by mostcore to store context information. */ struct most_interface { struct module *mod; + struct device *dev; enum most_interface_type interface; const char *description; int num_channels; struct most_channel_capability *channel_vector; + void *(*dma_alloc)(struct mbo *mbo, u32 size); + void (*dma_free)(struct mbo *mbo, u32 size); int (*configure)(struct most_interface *iface, int channel_idx, struct most_channel_config *channel_config); int (*enqueue)(struct most_interface *iface, int channel_idx, struct mbo *mbo); int (*poison_channel)(struct most_interface *iface, int channel_idx); - void (*request_netinfo)(struct most_interface *iface, int channel_idx); + void (*request_netinfo)(struct most_interface *iface, int channel_idx, + void (*on_netinfo)(struct most_interface *iface, + unsigned char link_stat, + unsigned char *mac_addr)); + struct attribute *attrs[14]; + struct kobj_type ktype; + enum { NONE_ATTRS /* default */, XACT_ATTRS, DBR_ATTRS } extra_attrs; void *priv; }; diff --git a/driver/include/networking.h b/driver/include/networking.h deleted file mode 100644 index 6f346d4..0000000 --- a/driver/include/networking.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Networking AIM - Networking Application Interface Module for MostCore - * - * Copyright (C) 2015, Microchip Technology Germany II GmbH & Co. KG - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This file is licensed under GPLv2. - */ -#ifndef _NETWORKING_H_ -#define _NETWORKING_H_ - -#include "mostcore.h" - -void most_deliver_netinfo(struct most_interface *iface, - unsigned char link_stat, unsigned char *mac_addr); - -#endif -- cgit 1.2.3-korg