struct dprc_rsp_get_obj_region { /* response word 0 */
__le64 pad0; /* response word 1 */
__le64 base_offset; /* response word 2 */
__le32 size;
u8 type;
u8 pad2[3]; /* response word 3 */
__le32 flags;
__le32 pad3; /* response word 4 */ /* base_addr may be zero if older MC firmware is used */
__le64 base_addr;
};
struct dprc_cmd_set_obj_irq { /* cmd word 0 */
__le32 irq_val;
u8 irq_index;
u8 pad[3]; /* cmd word 1 */
__le64 irq_addr; /* cmd word 2 */
__le32 irq_num;
__le32 obj_id; /* cmd word 3-4 */
u8 obj_type[16];
};
/* * DPRC API for managing and querying DPAA resources
*/ int dprc_open(struct fsl_mc_io *mc_io,
u32 cmd_flags, int container_id,
u16 *token);
int dprc_close(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token);
/* DPRC IRQ events */
/* IRQ event - Indicates that a new object added to the container */ #define DPRC_IRQ_EVENT_OBJ_ADDED 0x00000001 /* IRQ event - Indicates that an object was removed from the container */ #define DPRC_IRQ_EVENT_OBJ_REMOVED 0x00000002 /* * IRQ event - Indicates that one of the descendant containers that opened by * this container is destroyed
*/ #define DPRC_IRQ_EVENT_CONTAINER_DESTROYED 0x00000010
/* * IRQ event - Indicates that on one of the container's opened object is * destroyed
*/ #define DPRC_IRQ_EVENT_OBJ_DESTROYED 0x00000020
/* Irq event - Indicates that object is created at the container */ #define DPRC_IRQ_EVENT_OBJ_CREATED 0x00000040
/** * struct dprc_irq_cfg - IRQ configuration * @paddr: Address that must be written to signal a message-based interrupt * @val: Value to write into irq_addr address * @irq_num: A user defined number associated with this IRQ
*/ struct dprc_irq_cfg {
phys_addr_t paddr;
u32 val; int irq_num;
};
int dprc_get_obj_count(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token, int *obj_count);
int dprc_get_obj(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token, int obj_index, struct fsl_mc_obj_desc *obj_desc);
int dprc_set_obj_irq(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token, char *obj_type, int obj_id,
u8 irq_index, struct dprc_irq_cfg *irq_cfg); /** * enum dprc_region_type - Region type * @DPRC_REGION_TYPE_MC_PORTAL: MC portal region * @DPRC_REGION_TYPE_QBMAN_PORTAL: Qbman portal region
*/ enum dprc_region_type {
DPRC_REGION_TYPE_MC_PORTAL,
DPRC_REGION_TYPE_QBMAN_PORTAL,
DPRC_REGION_TYPE_QBMAN_MEM_BACKED_PORTAL
};
/** * struct dprc_region_desc - Mappable region descriptor * @base_offset: Region offset from region's base address. * For DPMCP and DPRC objects, region base is offset from SoC MC portals * base address; For DPIO, region base is offset from SoC QMan portals * base address * @size: Region size (in bytes) * @flags: Region attributes * @type: Portal region type
*/ struct dprc_region_desc {
u32 base_offset;
u32 size;
u32 flags; enum dprc_region_type type;
u64 base_address;
};
int dprc_get_obj_region(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token, char *obj_type, int obj_id,
u8 region_index, struct dprc_region_desc *region_desc);
int dprc_get_api_version(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 *major_ver,
u16 *minor_ver);
int dprc_get_container_id(struct fsl_mc_io *mc_io,
u32 cmd_flags, int *container_id);
/** * struct dprc_endpoint - Endpoint description for link connect/disconnect * operations * @type: Endpoint object type: NULL terminated string * @id: Endpoint object ID * @if_id: Interface ID; should be set for endpoints with multiple * interfaces ("dpsw", "dpdmux"); for others, always set to 0
*/ struct dprc_endpoint { char type[16]; int id;
u16 if_id;
};
int dprc_get_connection(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token, conststruct dprc_endpoint *endpoint1, struct dprc_endpoint *endpoint2, int *state);
/* * Data Path Buffer Pool (DPBP) API
*/
/* DPBP Version */ #define DPBP_VER_MAJOR 3 #define DPBP_VER_MINOR 2
/** * struct fsl_mc_resource_pool - Pool of MC resources of a given * type * @type: type of resources in the pool * @max_count: maximum number of resources in the pool * @free_count: number of free resources in the pool * @mutex: mutex to serialize access to the pool's free list * @free_list: anchor node of list of free resources in the pool * @mc_bus: pointer to the MC bus that owns this resource pool
*/ struct fsl_mc_resource_pool { enum fsl_mc_pool_type type; int max_count; int free_count; struct mutex mutex; /* serializes access to free_list */ struct list_head free_list; struct fsl_mc_bus *mc_bus;
};
/** * struct fsl_mc_uapi - information associated with a device file * @misc: struct miscdevice linked to the root dprc * @device: newly created device in /dev * @mutex: mutex lock to serialize the open/release operations * @local_instance_in_use: local MC I/O instance in use or not * @static_mc_io: pointer to the static MC I/O object
*/ struct fsl_mc_uapi { struct miscdevice misc; struct device *device; struct mutex mutex; /* serialize open/release operations */
u32 local_instance_in_use; struct fsl_mc_io *static_mc_io;
};
/** * struct fsl_mc_bus - logical bus that corresponds to a physical DPRC * @mc_dev: fsl-mc device for the bus device itself. * @resource_pools: array of resource pools (one pool per resource type) * for this MC bus. These resources represent allocatable entities * from the physical DPRC. * @irq_resources: Pointer to array of IRQ objects for the IRQ pool * @scan_mutex: Serializes bus scanning * @dprc_attr: DPRC attributes * @uapi_misc: struct that abstracts the interaction with userspace
*/ struct fsl_mc_bus { struct fsl_mc_device mc_dev; struct fsl_mc_resource_pool resource_pools[FSL_MC_NUM_POOL_TYPES]; struct fsl_mc_device_irq *irq_resources; struct mutex scan_mutex; /* serializes bus scanning */ struct dprc_attributes dprc_attr; struct fsl_mc_uapi uapi_misc; int irq_enabled;
};
int disable_dprc_irq(struct fsl_mc_device *mc_dev); int enable_dprc_irq(struct fsl_mc_device *mc_dev); int get_dprc_irq_state(struct fsl_mc_device *mc_dev);
#endif/* _FSL_MC_PRIVATE_H_ */
Messung V0.5
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.