Path: blob/main/sys/contrib/ncsw/Peripherals/FM/Pcd/fm_replic.h
48524 views
/*1* Copyright 2008-2012 Freescale Semiconductor Inc.2*3* Redistribution and use in source and binary forms, with or without4* modification, are permitted provided that the following conditions are met:5* * Redistributions of source code must retain the above copyright6* notice, this list of conditions and the following disclaimer.7* * Redistributions in binary form must reproduce the above copyright8* notice, this list of conditions and the following disclaimer in the9* documentation and/or other materials provided with the distribution.10* * Neither the name of Freescale Semiconductor nor the11* names of its contributors may be used to endorse or promote products12* derived from this software without specific prior written permission.13*14*15* ALTERNATIVELY, this software may be distributed under the terms of the16* GNU General Public License ("GPL") as published by the Free Software17* Foundation, either version 2 of that License or (at your option) any18* later version.19*20* THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY21* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED22* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE23* DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY24* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES25* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;26* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND27* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT28* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS29* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.30*/313233/******************************************************************************34@File fm_replic.h3536@Description FM frame replicator37*//***************************************************************************/38#ifndef __FM_REPLIC_H39#define __FM_REPLIC_H4041#include "std_ext.h"42#include "error_ext.h"434445#define FRM_REPLIC_SOURCE_TD_OPCODE 0x7546#define NEXT_FRM_REPLIC_ADDR_SHIFT 447#define NEXT_FRM_REPLIC_MEMBER_INDEX_SHIFT 1648#define FRM_REPLIC_FR_BIT 0x0800000049#define FRM_REPLIC_NL_BIT 0x1000000050#define FRM_REPLIC_INVALID_MEMBER_INDEX 0xffff51#define FRM_REPLIC_FIRST_MEMBER_INDEX 05253#define FRM_REPLIC_MIDDLE_MEMBER_INDEX 154#define FRM_REPLIC_LAST_MEMBER_INDEX 25556#define SOURCE_TD_ITSELF_OPTION 0x0157#define SOURCE_TD_COPY_OPTION 0x0258#define SOURCE_TD_ITSELF_AND_COPY_OPTION SOURCE_TD_ITSELF_OPTION | SOURCE_TD_COPY_OPTION59#define SOURCE_TD_NONE 0x046061/*typedef enum e_SourceTdOption62{63e_SOURCE_TD_NONE = 0,64e_SOURCE_TD_ITSELF_OPTION = 1,65e_SOURCE_TD_COPY_OPTION = 2,66e_SOURCE_TD_ITSELF_AND_COPY_OPTION = e_SOURCE_TD_ITSELF_OPTION | e_SOURCE_TD_COPY_OPTION67} e_SourceTdOption;68*/6970typedef struct71{72volatile uint32_t type;73volatile uint32_t frGroupPointer;74volatile uint32_t operationCode;75volatile uint32_t reserved;76} t_FrmReplicGroupSourceAd;7778typedef struct t_FmPcdFrmReplicMember79{80void *p_MemberAd; /**< pointer to the member AD */81void *p_StatisticsAd;/**< pointer to the statistics AD of the member */82t_Handle h_Manip; /**< manip handle - need for free routines */83t_List node;84} t_FmPcdFrmReplicMember;8586typedef struct t_FmPcdFrmReplicGroup87{88t_Handle h_FmPcd;8990uint8_t maxNumOfEntries;/**< maximal number of members in the group */91uint8_t numOfEntries; /**< actual number of members in the group */92uint16_t owners; /**< how many keys share this frame replicator group */93void *p_SourceTd; /**< pointer to the frame replicator source table descriptor */94t_List membersList; /**< the members list - should reflect the order of the members as in the hw linked list*/95t_List availableMembersList;/**< list of all the available members in the group */96t_FmPcdLock *p_Lock;97} t_FmPcdFrmReplicGroup;9899100#endif /* __FM_REPLIC_H */101102103