9 #define __EXTERN_INLINE inline
12 #undef __EXTERN_INLINE
14 #include <linux/types.h>
15 #include <linux/pci.h>
16 #include <linux/sched.h>
20 #include <asm/ptrace.h>
38 # define DBG_CFG(args) printk args
40 # define DBG_CFG(args)
97 DBG_CFG((
"conf_read(addr=0x%lx, type1=%d, hose=%d)\n",
105 DBG_CFG((
"conf_read: MCPCIA_CAP_ERR(%d) was 0x%x\n", mid, stat0));
115 value = *((
vuip)addr);
127 DBG_CFG((
"conf_read(): finished\n"));
139 unsigned int stat0,
cpu;
149 DBG_CFG((
"conf_write: MCPCIA CAP_ERR(%d) was 0x%x\n", mid, stat0));
164 DBG_CFG((
"conf_write(): finished\n"));
169 mk_conf_addr(
struct pci_bus *pbus,
unsigned int devfn,
int where,
171 unsigned char *type1)
176 DBG_CFG((
"mk_conf_addr(bus=%d,devfn=0x%x,hose=%d,where=0x%x,"
177 " pci_addr=0x%p, type1=0x%p)\n",
178 bus, devfn, hose->
index, where, pci_addr, type1));
185 addr = (bus << 16) | (devfn << 8) | (where);
187 addr |= hose->config_space_base;
190 DBG_CFG((
"mk_conf_addr: returning pci_addr 0x%lx\n", addr));
195 mcpcia_read_config(
struct pci_bus *bus,
unsigned int devfn,
int where,
199 unsigned long addr,
w;
202 if (mk_conf_addr(bus, devfn, where, hose, &addr, &type1))
205 addr |= (size - 1) * 8;
222 mcpcia_write_config(
struct pci_bus *bus,
unsigned int devfn,
int where,
229 if (mk_conf_addr(bus, devfn, where, hose, &addr, &type1))
232 addr |= (size - 1) * 8;
240 .read = mcpcia_read_config,
241 .write = mcpcia_write_config,
253 mcpcia_probe_hose(
int h)
257 unsigned int pci_rev;
278 pci_rev = 0xffffffff;
288 mcpcia_new_hose(
int h)
302 hose->mem_space = hae_mem;
305 hose->sparse_io_base =
MCPCIA_IO(mid) - IDENT_ADDR;
306 hose->dense_io_base = 0;
334 mcpcia_pci_clr_err(
int mid)
348 mcpcia_pci_clr_err(mid);
427 if (mcpcia_probe_hose(h)) {
434 printk(
"mcpcia_init_hoses: found %d hoses\n", hose_count);
437 for (hose =
hose_head; hose; hose = hose->next)
438 mcpcia_startup_hose(hose);
450 for (i = 0; i < 24; i += 2) {
451 printk(
" paltmp[%d-%d] = %16lx %16lx\n",
454 for (i = 0; i < 8; i += 2) {
455 printk(
" shadow[%d-%d] = %16lx %16lx\n",
459 printk(
" Addr of excepting instruction = %16lx\n",
461 printk(
" Summary of arithmetic traps = %16lx\n",
463 printk(
" Exception mask = %16lx\n",
465 printk(
" Base address for PALcode = %16lx\n",
467 printk(
" Interrupt Status Reg = %16lx\n",
469 printk(
" CURRENT SETUP OF EV5 IBOX = %16lx\n",
471 printk(
" I-CACHE Reg %s parity error = %16lx\n",
475 printk(
" D-CACHE error Reg = %16lx\n",
480 printk(
" Data error in bank 1\n");
483 printk(
" Data error in bank 0\n");
486 printk(
" Tag error in bank 1\n");
489 printk(
" Tag error in bank 0\n");
493 printk(
" Effective VA = %16lx\n",
495 printk(
" Reason for D-stream = %16lx\n",
497 printk(
" EV5 SCache address = %16lx\n",
499 printk(
" EV5 SCache TAG/Data parity = %16lx\n",
501 printk(
" EV5 BC_TAG_ADDR = %16lx\n",
503 printk(
" EV5 EI_ADDR: Phys addr of Xfer = %16lx\n",
505 printk(
" Fill Syndrome = %16lx\n",
507 printk(
" EI_STAT reg = %16lx\n",
509 printk(
" LD_LOCK = %16lx\n",
514 mcpcia_print_system_area(
unsigned long la_ptr)
519 struct IOD_subpacket {
523 unsigned int pci_rev;
524 unsigned int cap_ctrl;
525 unsigned int hae_mem;
527 unsigned int int_ctl;
528 unsigned int int_reg;
529 unsigned int int_mask0;
530 unsigned int int_mask1;
531 unsigned int mc_err0;
532 unsigned int mc_err1;
533 unsigned int cap_err;
535 unsigned int pci_err1;
536 unsigned int mdpa_stat;
537 unsigned int mdpa_syn;
538 unsigned int mdpb_stat;
539 unsigned int mdpb_syn;
546 iodpp = (
struct IOD_subpacket *) (la_ptr + frame->
sys_offset);
548 for (hose =
hose_head; hose; hose = hose->next, iodpp++) {
550 printk(
"IOD %d Register Subpacket - Bridge Base Address %16lx\n",
551 hose->
index, iodpp->base);
552 printk(
" WHOAMI = %8x\n", iodpp->whoami);
553 printk(
" PCI_REV = %8x\n", iodpp->pci_rev);
554 printk(
" CAP_CTRL = %8x\n", iodpp->cap_ctrl);
555 printk(
" HAE_MEM = %8x\n", iodpp->hae_mem);
556 printk(
" HAE_IO = %8x\n", iodpp->hae_io);
557 printk(
" INT_CTL = %8x\n", iodpp->int_ctl);
558 printk(
" INT_REG = %8x\n", iodpp->int_reg);
559 printk(
" INT_MASK0 = %8x\n", iodpp->int_mask0);
560 printk(
" INT_MASK1 = %8x\n", iodpp->int_mask1);
561 printk(
" MC_ERR0 = %8x\n", iodpp->mc_err0);
562 printk(
" MC_ERR1 = %8x\n", iodpp->mc_err1);
563 printk(
" CAP_ERR = %8x\n", iodpp->cap_err);
564 printk(
" PCI_ERR1 = %8x\n", iodpp->pci_err1);
565 printk(
" MDPA_STAT = %8x\n", iodpp->mdpa_stat);
566 printk(
" MDPA_SYN = %8x\n", iodpp->mdpa_syn);
567 printk(
" MDPB_STAT = %8x\n", iodpp->mdpb_stat);
568 printk(
" MDPB_SYN = %8x\n", iodpp->mdpb_syn);
592 for (hose =
hose_head; hose; hose = hose->next)
609 if (!expected && vector != 0x620 && vector != 0x630) {
610 mcpcia_print_uncorrectable(mchk_logout);
611 mcpcia_print_system_area(la_ptr);