OpenWrt – Diff between revs 2 and 3
?pathlinks?
Rev 2 | Rev 3 | |||
---|---|---|---|---|
Line 37... | Line 37... | |||
37 | |
37 | |
|
38 | //========================== |
38 | //========================== |
|
39 | extern u32 sdio_pro_enable; |
39 | extern u32 sdio_pro_enable; |
|
40 | /* for a type command, e.g. CMD53, 2 blocks */ |
40 | /* for a type command, e.g. CMD53, 2 blocks */ |
|
41 | struct cmd_profile { |
41 | struct cmd_profile { |
|
42 | u32 max_tc; /* Max tick count */ |
42 | u32 max_tc; /* Max tick count */ |
|
43 | u32 min_tc; |
43 | u32 min_tc; |
|
44 | u32 tot_tc; /* total tick count */ |
44 | u32 tot_tc; /* total tick count */ |
|
45 | u32 tot_bytes; |
45 | u32 tot_bytes; |
|
46 | u32 count; /* the counts of the command */ |
46 | u32 count; /* the counts of the command */ |
|
Line 47... | Line 47... | |||
47 | }; |
47 | }; |
|
48 | |
48 | |
|
49 | /* dump when total_tc and total_bytes */ |
49 | /* dump when total_tc and total_bytes */ |
|
50 | struct sdio_profile { |
50 | struct sdio_profile { |
|
51 | u32 total_tc; /* total tick count of CMD52 and CMD53 */ |
51 | u32 total_tc; /* total tick count of CMD52 and CMD53 */ |
|
52 | u32 total_tx_bytes; /* total bytes of CMD53 Tx */ |
52 | u32 total_tx_bytes; /* total bytes of CMD53 Tx */ |
|
53 | u32 total_rx_bytes; /* total bytes of CMD53 Rx */ |
53 | u32 total_rx_bytes; /* total bytes of CMD53 Rx */ |
|
54 | |
54 | |
|
55 | /*CMD52*/ |
55 | /*CMD52*/ |
|
56 | struct cmd_profile cmd52_tx; |
56 | struct cmd_profile cmd52_tx; |
|
57 | struct cmd_profile cmd52_rx; |
57 | struct cmd_profile cmd52_rx; |
|
58 | |
58 | |
|
59 | /*CMD53 in byte unit */ |
59 | /*CMD53 in byte unit */ |
|
60 | struct cmd_profile cmd53_tx_byte[512]; |
60 | struct cmd_profile cmd53_tx_byte[512]; |
|
61 | struct cmd_profile cmd53_rx_byte[512]; |
61 | struct cmd_profile cmd53_rx_byte[512]; |
|
62 | |
62 | |
|
63 | /*CMD53 in block unit */ |
63 | /*CMD53 in block unit */ |
|
64 | struct cmd_profile cmd53_tx_blk[100]; |
64 | struct cmd_profile cmd53_tx_blk[100]; |
|
Line 65... | Line 65... | |||
65 | struct cmd_profile cmd53_rx_blk[100]; |
65 | struct cmd_profile cmd53_rx_blk[100]; |
|
66 | }; |
66 | }; |
|
67 | |
67 | |
|
68 | //========================== |
68 | //========================== |
|
69 | enum msdc_dbg { |
69 | typedef enum { |
|
70 | SD_TOOL_ZONE = 0, |
70 | SD_TOOL_ZONE = 0, |
|
71 | SD_TOOL_DMA_SIZE = 1, |
71 | SD_TOOL_DMA_SIZE = 1, |
|
72 | SD_TOOL_PM_ENABLE = 2, |
72 | SD_TOOL_PM_ENABLE = 2, |
|
73 | SD_TOOL_SDIO_PROFILE = 3, |
73 | SD_TOOL_SDIO_PROFILE = 3, |
|
74 | }; |
74 | } msdc_dbg; |
|
75 | |
75 | |
|
76 | enum msdc_mode { |
76 | typedef enum { |
|
77 | MODE_PIO = 0, |
77 | MODE_PIO = 0, |
|
- | 78 | MODE_DMA = 1, |
||
- | 79 | MODE_SIZE_DEP = 2, |
||
Line 78... | Line 80... | |||
78 | MODE_DMA = 1, |
80 | } msdc_mode; |
|
79 | MODE_SIZE_DEP = 2, |
81 | extern msdc_mode drv_mode[4]; |
|
80 | }; |
82 | extern u32 dma_size[4]; |
|
81 | |
83 | |
|
Line 100... | Line 102... | |||
100 | #if 0 /* +++ chhung */ |
102 | #if 0 /* +++ chhung */ |
|
101 | #define BUG_ON(x) \ |
103 | #define BUG_ON(x) \ |
|
102 | do { \ |
104 | do { \ |
|
103 | if (x) { \ |
105 | if (x) { \ |
|
104 | printk("[BUG] %s LINE:%d FILE:%s\n", #x, __LINE__, __FILE__); \ |
106 | printk("[BUG] %s LINE:%d FILE:%s\n", #x, __LINE__, __FILE__); \ |
|
105 | while (1) \ |
107 | while(1); \ |
|
106 | ; \ |
- | ||
107 | } \ |
108 | } \ |
|
108 | } while (0) |
109 | }while(0) |
|
109 | #endif /* end of +++ */ |
110 | #endif /* end of +++ */ |
|
Line 110... | Line 111... | |||
110 | |
111 | |
|
111 | #define N_MSG(evt, fmt, args...) |
112 | #define N_MSG(evt, fmt, args...) |
|
112 | /* |
113 | /* |
|
Line 118... | Line 119... | |||
118 | } while(0) |
119 | } while(0) |
|
119 | */ |
120 | */ |
|
Line 120... | Line 121... | |||
120 | |
121 | |
|
121 | #define ERR_MSG(fmt, args...) \ |
122 | #define ERR_MSG(fmt, args...) \ |
|
122 | do { \ |
123 | do { \ |
|
123 | printk(KERN_ERR TAG"%d -> "fmt" <- %s() : L<%d> PID<%s><0x%x>\n", \ |
124 | printk(KERN_ERR TAG"%d -> "fmt" <- %s() : L<%d> PID<%s><0x%x>\n", \ |
|
124 | host->id, ##args, __FUNCTION__, __LINE__, current->comm, current->pid); \ |
125 | host->id, ##args , __FUNCTION__, __LINE__, current->comm, current->pid); \ |
|
Line 125... | Line 126... | |||
125 | } while (0); |
126 | } while(0); |
|
126 | |
127 | |
|
127 | #if 1 |
128 | #if 1 |
|
128 | //defined CONFIG_MTK_MMC_CD_POLL |
129 | //defined CONFIG_MTK_MMC_CD_POLL |
|
129 | #define INIT_MSG(fmt, args...) |
130 | #define INIT_MSG(fmt, args...) |
|
130 | #define IRQ_MSG(fmt, args...) |
131 | #define IRQ_MSG(fmt, args...) |
|
131 | #else |
132 | #else |
|
132 | #define INIT_MSG(fmt, args...) \ |
133 | #define INIT_MSG(fmt, args...) \ |
|
133 | do { \ |
134 | do { \ |
|
134 | printk(KERN_ERR TAG"%d -> "fmt" <- %s() : L<%d> PID<%s><0x%x>\n", \ |
135 | printk(KERN_ERR TAG"%d -> "fmt" <- %s() : L<%d> PID<%s><0x%x>\n", \ |
|
Line 135... | Line 136... | |||
135 | host->id, ##args, __FUNCTION__, __LINE__, current->comm, current->pid); \ |
136 | host->id, ##args , __FUNCTION__, __LINE__, current->comm, current->pid); \ |
|
136 | } while (0); |
137 | } while(0); |
|
137 | |
138 | |
|
138 | /* PID in ISR in not corrent */ |
139 | /* PID in ISR in not corrent */ |
|
139 | #define IRQ_MSG(fmt, args...) \ |
140 | #define IRQ_MSG(fmt, args...) \ |
|
140 | do { \ |
141 | do { \ |
|
141 | printk(KERN_ERR TAG"%d -> "fmt" <- %s() : L<%d>\n", \ |
142 | printk(KERN_ERR TAG"%d -> "fmt" <- %s() : L<%d>\n", \ |
|
Line 142... | Line 143... | |||
142 | host->id, ##args, __FUNCTION__, __LINE__); \ |
143 | host->id, ##args , __FUNCTION__, __LINE__); \ |
|
Line 143... | Line 144... | |||
143 | } while (0); |
144 | } while(0); |
|
144 | #endif |
145 | #endif |
|
145 | |
146 | |
|
146 | void msdc_debug_proc_init(void); |
147 | int msdc_debug_proc_init(void); |
|
147 | |
148 | |
|
148 | #if 0 /* --- chhung */ |
149 | #if 0 /* --- chhung */ |
|
Line 149... | Line 150... | |||
149 | void msdc_init_gpt(void); |
150 | void msdc_init_gpt(void); |