21 #include <linux/module.h>
22 #include <linux/kernel.h>
23 #include <linux/netdevice.h>
34 printk(
"** EMAC %s TX BDs **\n"
35 " tx_cnt = %d tx_slot = %d ack_slot = %d\n",
36 p->
ofdev->dev.of_node->full_name,
40 (
"bd[%2d] 0x%08x %c 0x%04x %4u - bd[%2d] 0x%08x %c 0x%04x %4u\n",
49 printk(
"** EMAC %s RX BDs **\n"
50 " rx_slot = %d flags = 0x%lx rx_skb_size = %d rx_sync_size = %d\n"
51 " rx_sg_skb = 0x%p\n",
52 p->
ofdev->dev.of_node->full_name,
57 (
"bd[%2d] 0x%08x %c 0x%04x %4u - bd[%2d] 0x%08x %c 0x%04x %4u\n",
71 u32 *gaht_base = emac_gaht_base(dev);
72 u32 *iaht_base = emac_iaht_base(dev);
76 printk(
"** EMAC %s registers **\n"
77 "MR0 = 0x%08x MR1 = 0x%08x TMR0 = 0x%08x TMR1 = 0x%08x\n"
78 "RMR = 0x%08x ISR = 0x%08x ISER = 0x%08x\n"
79 "IAR = %04x%08x VTPID = 0x%04x VTCI = 0x%04x\n",
80 dev->
ofdev->dev.of_node->full_name,
89 printk(
"MAR = %04x%08x MMAR = %04x%08x\n",
96 for (n = 0; n < xaht_regs; n++)
99 for (n = 0; n < xaht_regs; n++)
100 printk(
"GAHT%02d = 0x%08x\n", n + 1,
in_be32(gaht_base + n));
102 printk(
"LSA = %04x%08x IPGVR = 0x%04x\n"
103 "STACR = 0x%08x TRTR = 0x%08x RWMR = 0x%08x\n"
104 "OCTX = 0x%08x OCRX = 0x%08x\n",
115 printk(
"REVID = 0x%08x TPC = 0x%08x\n",
128 printk(
"** MAL %s Registers **\n"
129 "CFG = 0x%08x ESR = 0x%08x IER = 0x%08x\n"
130 "TX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n"
131 "RX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n",
132 mal->
ofdev->dev.of_node->full_name,
158 printk(
"RCBS%d = 0x%08x (%d) ", i, r, r * 16);
173 if (__emacs[i] ==
NULL) {
177 spin_unlock_irqrestore(&emac_dbg_lock, flags);
187 if (__emacs[i] == dev) {
191 spin_unlock_irqrestore(&emac_dbg_lock, flags);
201 if (__mals[i] ==
NULL) {
205 spin_unlock_irqrestore(&emac_dbg_lock, flags);
215 if (__mals[i] == mal) {
219 spin_unlock_irqrestore(&emac_dbg_lock, flags);
231 emac_mal_dump(__mals[i]);
235 emac_mac_dump(__emacs[i]);
237 spin_unlock_irqrestore(&emac_dbg_lock, flags);
240 #if defined(CONFIG_MAGIC_SYSRQ)
241 static void emac_sysrq_handler(
int key)
249 .action_msg =
"Show EMAC(s) status",