Path: blob/main/sys/contrib/ncsw/Peripherals/FM/Pcd/fm_plcr.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_plcr.h3536@Description FM Policer private header37*//***************************************************************************/38#ifndef __FM_PLCR_H39#define __FM_PLCR_H4041#include "std_ext.h"424344/***********************************************************************/45/* Policer defines */46/***********************************************************************/4748#define FM_PCD_PLCR_PAR_GO 0x8000000049#define FM_PCD_PLCR_PAR_PWSEL_MASK 0x0000FFFF50#define FM_PCD_PLCR_PAR_R 0x400000005152/* shifts */53#define FM_PCD_PLCR_PAR_PNUM_SHIFT 165455/* masks */56#define FM_PCD_PLCR_PEMODE_PI 0x8000000057#define FM_PCD_PLCR_PEMODE_CBLND 0x4000000058#define FM_PCD_PLCR_PEMODE_ALG_MASK 0x3000000059#define FM_PCD_PLCR_PEMODE_ALG_RFC2698 0x1000000060#define FM_PCD_PLCR_PEMODE_ALG_RFC4115 0x2000000061#define FM_PCD_PLCR_PEMODE_DEFC_MASK 0x0C00000062#define FM_PCD_PLCR_PEMODE_DEFC_Y 0x0400000063#define FM_PCD_PLCR_PEMODE_DEFC_R 0x0800000064#define FM_PCD_PLCR_PEMODE_DEFC_OVERRIDE 0x0C00000065#define FM_PCD_PLCR_PEMODE_OVCLR_MASK 0x0300000066#define FM_PCD_PLCR_PEMODE_OVCLR_Y 0x0100000067#define FM_PCD_PLCR_PEMODE_OVCLR_R 0x0200000068#define FM_PCD_PLCR_PEMODE_OVCLR_G_NC 0x0300000069#define FM_PCD_PLCR_PEMODE_PKT 0x0080000070#define FM_PCD_PLCR_PEMODE_FPP_MASK 0x001F000071#define FM_PCD_PLCR_PEMODE_FPP_SHIFT 1672#define FM_PCD_PLCR_PEMODE_FLS_MASK 0x0000F00073#define FM_PCD_PLCR_PEMODE_FLS_L2 0x0000300074#define FM_PCD_PLCR_PEMODE_FLS_L3 0x0000B00075#define FM_PCD_PLCR_PEMODE_FLS_L4 0x0000E00076#define FM_PCD_PLCR_PEMODE_FLS_FULL 0x0000F00077#define FM_PCD_PLCR_PEMODE_RBFLS 0x0000080078#define FM_PCD_PLCR_PEMODE_TRA 0x0000000479#define FM_PCD_PLCR_PEMODE_TRB 0x0000000280#define FM_PCD_PLCR_PEMODE_TRC 0x0000000181#define FM_PCD_PLCR_DOUBLE_ECC 0x8000000082#define FM_PCD_PLCR_INIT_ENTRY_ERROR 0x4000000083#define FM_PCD_PLCR_PRAM_SELF_INIT_COMPLETE 0x8000000084#define FM_PCD_PLCR_ATOMIC_ACTION_COMPLETE 0x400000008586#define FM_PCD_PLCR_NIA_VALID 0x800000008788#define FM_PCD_PLCR_GCR_EN 0x8000000089#define FM_PCD_PLCR_GCR_STEN 0x4000000090#define FM_PCD_PLCR_GCR_DAR 0x2000000091#define FM_PCD_PLCR_GCR_DEFNIA 0x00FFFFFF92#define FM_PCD_PLCR_NIA_ABS 0x000001009394#define FM_PCD_PLCR_GSR_BSY 0x8000000095#define FM_PCD_PLCR_GSR_DQS 0x6000000096#define FM_PCD_PLCR_GSR_RPB 0x2000000097#define FM_PCD_PLCR_GSR_FQS 0x0C00000098#define FM_PCD_PLCR_GSR_LPALG 0x0000C00099#define FM_PCD_PLCR_GSR_LPCA 0x00003000100#define FM_PCD_PLCR_GSR_LPNUM 0x000000FF101102#define FM_PCD_PLCR_EVR_PSIC 0x80000000103#define FM_PCD_PLCR_EVR_AAC 0x40000000104105#define FM_PCD_PLCR_PAR_PSI 0x20000000106#define FM_PCD_PLCR_PAR_PNUM 0x00FF0000107/* PWSEL Selctive select options */108#define FM_PCD_PLCR_PAR_PWSEL_PEMODE 0x00008000 /* 0 */109#define FM_PCD_PLCR_PAR_PWSEL_PEGNIA 0x00004000 /* 1 */110#define FM_PCD_PLCR_PAR_PWSEL_PEYNIA 0x00002000 /* 2 */111#define FM_PCD_PLCR_PAR_PWSEL_PERNIA 0x00001000 /* 3 */112#define FM_PCD_PLCR_PAR_PWSEL_PECIR 0x00000800 /* 4 */113#define FM_PCD_PLCR_PAR_PWSEL_PECBS 0x00000400 /* 5 */114#define FM_PCD_PLCR_PAR_PWSEL_PEPIR_EIR 0x00000200 /* 6 */115#define FM_PCD_PLCR_PAR_PWSEL_PEPBS_EBS 0x00000100 /* 7 */116#define FM_PCD_PLCR_PAR_PWSEL_PELTS 0x00000080 /* 8 */117#define FM_PCD_PLCR_PAR_PWSEL_PECTS 0x00000040 /* 9 */118#define FM_PCD_PLCR_PAR_PWSEL_PEPTS_ETS 0x00000020 /* 10 */119#define FM_PCD_PLCR_PAR_PWSEL_PEGPC 0x00000010 /* 11 */120#define FM_PCD_PLCR_PAR_PWSEL_PEYPC 0x00000008 /* 12 */121#define FM_PCD_PLCR_PAR_PWSEL_PERPC 0x00000004 /* 13 */122#define FM_PCD_PLCR_PAR_PWSEL_PERYPC 0x00000002 /* 14 */123#define FM_PCD_PLCR_PAR_PWSEL_PERRPC 0x00000001 /* 15 */124125#define FM_PCD_PLCR_PAR_PMR_BRN_1TO1 0x0000 /* - Full bit replacement. {PBNUM[0:N-1]1261-> 2^N specific locations. */127#define FM_PCD_PLCR_PAR_PMR_BRN_2TO2 0x1 /* - {PBNUM[0:N-2],PNUM[N-1]}.1282-> 2^(N-1) base locations. */129#define FM_PCD_PLCR_PAR_PMR_BRN_4TO4 0x2 /* - {PBNUM[0:N-3],PNUM[N-2:N-1]}.1304-> 2^(N-2) base locations. */131#define FM_PCD_PLCR_PAR_PMR_BRN_8TO8 0x3 /* - {PBNUM[0:N-4],PNUM[N-3:N-1]}.1328->2^(N-3) base locations. */133#define FM_PCD_PLCR_PAR_PMR_BRN_16TO16 0x4 /* - {PBNUM[0:N-5],PNUM[N-4:N-1]}.13416-> 2^(N-4) base locations. */135#define FM_PCD_PLCR_PAR_PMR_BRN_32TO32 0x5 /* {PBNUM[0:N-6],PNUM[N-5:N-1]}.13632-> 2^(N-5) base locations. */137#define FM_PCD_PLCR_PAR_PMR_BRN_64TO64 0x6 /* {PBNUM[0:N-7],PNUM[N-6:N-1]}.13864-> 2^(N-6) base locations. */139#define FM_PCD_PLCR_PAR_PMR_BRN_128TO128 0x7 /* {PBNUM[0:N-8],PNUM[N-7:N-1]}.140128-> 2^(N-7) base locations. */141#define FM_PCD_PLCR_PAR_PMR_BRN_256TO256 0x8 /* - No bit replacement for N=8. {PNUM[N-8:N-1]}.142When N=8 this option maps all 256 profiles by the DISPATCH bus into one group. */143144#define FM_PCD_PLCR_PMR_V 0x80000000145#define PLCR_ERR_ECC_CAP 0x80000000146#define PLCR_ERR_ECC_TYPE_DOUBLE 0x40000000147#define PLCR_ERR_ECC_PNUM_MASK 0x00000FF0148#define PLCR_ERR_ECC_OFFSET_MASK 0x0000000F149150#define PLCR_ERR_UNINIT_CAP 0x80000000151#define PLCR_ERR_UNINIT_NUM_MASK 0x000000FF152#define PLCR_ERR_UNINIT_PID_MASK 0x003f0000153#define PLCR_ERR_UNINIT_ABSOLUTE_MASK 0x00008000154155/* shifts */156#define PLCR_ERR_ECC_PNUM_SHIFT 4157#define PLCR_ERR_UNINIT_PID_SHIFT 16158159#define FM_PCD_PLCR_PMR_BRN_SHIFT 16160161#define PLCR_PORT_WINDOW_SIZE(hardwarePortId)162163164#endif /* __FM_PLCR_H */165166167