MIPS: eBPF: Fix icache flush end address
[linux/fpc-iii.git] / drivers / staging / mt7621-mmc / dbg.h
blob2d447b2d92aeceae49c2311e228a607b02f90c5d
1 /* Copyright Statement:
3 * This software/firmware and related documentation ("MediaTek Software") are
4 * protected under relevant copyright laws. The information contained herein
5 * is confidential and proprietary to MediaTek Inc. and/or its licensors.
6 * Without the prior written permission of MediaTek inc. and/or its licensors,
7 * any reproduction, modification, use or disclosure of MediaTek Software,
8 * and information contained herein, in whole or in part, shall be strictly
9 * prohibited.
11 * MediaTek Inc. (C) 2010. All rights reserved.
13 * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
14 * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
15 * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON
16 * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
17 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
19 * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
20 * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
21 * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
22 * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY
23 * ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY
24 * THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK
25 * SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO
26 * RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN
27 * FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
28 * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED
29 * HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK
30 * SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE
31 * PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
33 * The following software/firmware and/or related documentation
34 * ("MediaTek Software") have been modified by MediaTek Inc. All revisions are
35 * subject to any receiver's applicable license agreements with MediaTek Inc.
37 #ifndef __MT_MSDC_DEUBG__
38 #define __MT_MSDC_DEUBG__
40 //==========================
41 extern u32 sdio_pro_enable;
42 /* for a type command, e.g. CMD53, 2 blocks */
43 struct cmd_profile {
44 u32 max_tc; /* Max tick count */
45 u32 min_tc;
46 u32 tot_tc; /* total tick count */
47 u32 tot_bytes;
48 u32 count; /* the counts of the command */
51 /* dump when total_tc and total_bytes */
52 struct sdio_profile {
53 u32 total_tc; /* total tick count of CMD52 and CMD53 */
54 u32 total_tx_bytes; /* total bytes of CMD53 Tx */
55 u32 total_rx_bytes; /* total bytes of CMD53 Rx */
57 /*CMD52*/
58 struct cmd_profile cmd52_tx;
59 struct cmd_profile cmd52_rx;
61 /*CMD53 in byte unit */
62 struct cmd_profile cmd53_tx_byte[512];
63 struct cmd_profile cmd53_rx_byte[512];
65 /*CMD53 in block unit */
66 struct cmd_profile cmd53_tx_blk[100];
67 struct cmd_profile cmd53_rx_blk[100];
70 //==========================
71 enum msdc_dbg {
72 SD_TOOL_ZONE = 0,
73 SD_TOOL_DMA_SIZE = 1,
74 SD_TOOL_PM_ENABLE = 2,
75 SD_TOOL_SDIO_PROFILE = 3,
78 /* Debug message event */
79 #define DBG_EVT_NONE (0) /* No event */
80 #define DBG_EVT_DMA BIT(0) /* DMA related event */
81 #define DBG_EVT_CMD BIT(1) /* MSDC CMD related event */
82 #define DBG_EVT_RSP BIT(2) /* MSDC CMD RSP related event */
83 #define DBG_EVT_INT BIT(3) /* MSDC INT event */
84 #define DBG_EVT_CFG BIT(4) /* MSDC CFG event */
85 #define DBG_EVT_FUC BIT(5) /* Function event */
86 #define DBG_EVT_OPS BIT(6) /* Read/Write operation event */
87 #define DBG_EVT_FIO BIT(7) /* FIFO operation event */
88 #define DBG_EVT_WRN BIT(8) /* Warning event */
89 #define DBG_EVT_PWR BIT(9) /* Power event */
90 #define DBG_EVT_ALL (0xffffffff)
92 #define DBG_EVT_MASK (DBG_EVT_ALL)
94 extern unsigned int sd_debug_zone[4];
95 #define TAG "msdc"
96 void msdc_debug_proc_init(void);
98 u32 msdc_time_calc(u32 old_L32, u32 old_H32, u32 new_L32, u32 new_H32);
99 void msdc_performance(u32 opcode, u32 sizes, u32 bRx, u32 ticks);
101 #endif