00001 00044 #if !defined (DM6437_HAL_PCI_H) 00045 #define DM6437_HAL_PCI_H 00046 00047 00048 /* ----------------------------------- DSP/BIOS Link */ 00049 #include <dsplink.h> 00050 00051 /* ----------------------------------- Hardware Abstraction Layer */ 00052 #include <dm6437_hal.h> 00053 00054 00055 #if defined (__cplusplus) 00056 extern "C" { 00057 #endif /* if defined (__cplusplus) */ 00058 00059 00066 #define NUM_BARS 6 00067 00074 #define PCI33_DMA_MAXTHROUGHPUT 132u 00075 00082 #define DDR_REGS_BAR_NO 1u 00083 00090 #define CFG_REGS_BAR_NO 2u 00091 00098 #define RWMEM_BAR_NO 4u 00099 00106 #define SHMEM_BAR_NO 5u 00107 00114 #define LPSC_GEM 39u 00115 00122 #define LPSC_EDMA_TPCC 2u 00123 00130 #define LPSC_EDMA_TPTC0 3u 00131 00138 #define LPSC_EDMA_TPTC1 4u 00139 00146 #define LPSC_EDMA_TPTC2 5u 00147 00154 #define LPSC_DDR 13u 00155 00162 #define DM6437_PCIMEM_BASE 0x30000000u 00163 00170 #define DM6437_DEVREG_BASE 0x40000u 00171 00178 #define DM6437_PLL0REG_BASE 0x40800u 00179 00186 #define DM6437_PLL1REG_BASE 0x40C00u 00187 00194 #define DM6437_EDMAREG_BASE 0x0u 00195 00202 #define DM6437_DDRREG_BASE 0x0u 00203 00210 #define DM6437_PSCREG_BASE 0x41000u 00211 00218 #define DM6437_PCIREG_BASE 0x1A000u 00219 00226 #define DM6437_SOFTINT0_MASK 0x01000000u 00227 00234 #define DM6437_SOFTINT1_MASK 0x02000000u 00235 00242 #define DM6437_LRESET_MASK 0x00000100u 00243 00250 #define DM6437_INTSTATUS_MASK 0x00080000u 00251 00258 #define DM6437_BOOTCMPLTBC_MASK 0x00000001u 00259 00266 #define DM6437_PCIADLEN 0x00800000u 00267 00274 #define DM6437_PCIADWRBITMASK 0xFF800000u 00275 00282 #define DM6437_PAGEWRBITMASK 0xFF800000u 00283 00284 00291 typedef struct DM6437_devRegs_tag { 00292 volatile Uint32 PINMUX0 ; 00293 volatile Uint32 PINMUX1 ; 00294 volatile Uint32 DSPBOOTADDR ; 00295 volatile Uint32 BOOTCMPLT ; 00296 volatile Uint32 RSVD0 ; 00297 volatile Uint32 BOOTCFG ; 00298 volatile Uint32 VDD1P0V_ADJ ; 00299 volatile Uint32 VDD1P2V_ADJ ; 00300 volatile Uint32 DDR_SLEW ; 00301 volatile Uint32 PERIPHEN ; 00302 volatile Uint32 DEVICE_ID ; 00303 volatile Uint32 DAC_DEMEN ; 00304 volatile Uint32 UHPICTL ; 00305 volatile Uint32 RSVD1 [2] ; 00306 volatile Uint32 MSTPRI0 ; 00307 volatile Uint32 MSTPRI1 ; 00308 volatile Uint32 VPSS_CLK_CTRL ; 00309 volatile Uint32 VDD3P3V_PWRDN ; 00310 volatile Uint32 DFT_ENABLE ; 00311 volatile Uint32 SEC_SCAN_REG ; 00312 volatile Uint32 SEC_TEST_REG ; 00313 volatile Uint32 SEC_TAP_CTL ; 00314 volatile Uint32 PUBLIC_KEY0 ; 00315 volatile Uint32 PUBLIC_KEY1 ; 00316 volatile Uint32 PUBLIC_KEY2 ; 00317 volatile Uint32 PUBLIC_KEY3 ; 00318 volatile Uint32 VLYNQ_DELAY ; 00319 volatile Uint32 SEC_PSEUDO0 ; 00320 volatile Uint32 SEC_PSEUDO1 ; 00321 volatile Uint32 RSVD2 [3] ; 00322 volatile Uint32 TIMERCTL ; 00323 volatile Uint32 TPTCCCFG ; 00324 volatile Uint32 RSVD3 ; 00325 } DM6437_devRegs ; 00326 00333 typedef struct DM6437_pllRegs_tag { 00334 volatile Uint32 PID ; 00335 volatile Uint8 RSVD0 [220] ; 00336 volatile Uint32 FUSERR ; 00337 volatile Uint32 RSTYPE ; 00338 volatile Uint32 RSTDEF ; 00339 volatile Uint8 RSVD1 [20] ; 00340 volatile Uint32 PLLCTL ; 00341 volatile Uint32 OCSEL ; 00342 volatile Uint32 SECCTL ; 00343 volatile Uint8 RSVD2 [4] ; 00344 volatile Uint32 PLLM ; 00345 volatile Uint32 PREDIV ; 00346 volatile Uint32 PLLDIV1 ; 00347 volatile Uint32 PLLDIV2 ; 00348 volatile Uint32 PLLDIV3 ; 00349 volatile Uint32 OSCDIV1 ; 00350 volatile Uint32 POSTDIV ; 00351 volatile Uint32 BPDIV ; 00352 volatile Uint32 WAKEUP ; 00353 volatile Uint8 RSVD3 [4] ; 00354 volatile Uint32 PLLCMD ; 00355 volatile Uint32 PLLSTAT ; 00356 volatile Uint32 ALNCTL ; 00357 volatile Uint32 DCHANGE ; 00358 volatile Uint32 CKEN ; 00359 volatile Uint32 CKSTAT ; 00360 volatile Uint32 SYSTAT ; 00361 volatile Uint8 RSVD4 [12] ; 00362 volatile Uint32 PLLDIV4 ; 00363 volatile Uint32 PLLDIV5 ; 00364 volatile Uint32 PLLDIV6 ; 00365 volatile Uint32 PLLDIV7 ; 00366 volatile Uint32 PLLDIV8 ; 00367 } DM6437_pllRegs ; 00368 00375 typedef struct { 00376 volatile Uint32 ERCSR ; 00377 volatile Uint32 SDRSTAT ; 00378 volatile Uint32 SDBCR ; 00379 volatile Uint32 SDRCR ; 00380 volatile Uint32 SDTIMR ; 00381 volatile Uint32 SDTIMR2 ; 00382 volatile Uint8 RSVD0 [8] ; 00383 volatile Uint32 VBPR ; 00384 volatile Uint8 RSVD1 [4] ; 00385 volatile Uint32 VBCFG1 ; 00386 volatile Uint32 VBCFG2 ; 00387 volatile Uint8 RSVD2 [16] ; 00388 volatile Uint32 PERFC1R ; 00389 volatile Uint32 PERFC2R ; 00390 volatile Uint32 PCCR ; 00391 volatile Uint32 PCMRSR ; 00392 volatile Uint8 RSVD3 [48] ; 00393 volatile Uint32 ASYNCCS2CR ; 00394 volatile Uint32 ASYNCCS3CR ; 00395 volatile Uint32 ASYNCCS4CR ; 00396 volatile Uint32 ASYNCCS5CR ; 00397 volatile Uint8 RSVD4 [16] ; 00398 volatile Uint32 AWCCR ; 00399 volatile Uint8 RSVD5 [28] ; 00400 volatile Uint32 IRR ; 00401 volatile Uint32 IMR ; 00402 volatile Uint32 IMSR ; 00403 volatile Uint32 IMCR ; 00404 volatile Uint8 RSVD6 [16] ; 00405 volatile Uint32 DDRPHYREV ; 00406 volatile Uint32 DDRPHYCR ; 00407 volatile Uint32 DDRPHYSR ; 00408 volatile Uint8 RSVD7 [4] ; 00409 volatile Uint32 VTPCTRL ; 00410 volatile Uint32 VTPSTAT ; 00411 } DM6437_ddrRegs ; 00412 00419 typedef struct DM6437_pscRegs_tag { 00420 volatile Uint32 PID ; 00421 volatile Uint8 RSVD0 [12] ; 00422 volatile Uint32 GBLCTL ; 00423 volatile Uint8 RSVD1 [4] ; 00424 volatile Uint32 INTEVAL ; 00425 volatile Uint8 RSVD2 [36] ; 00426 volatile Uint32 ERRPR0 ; 00427 volatile Uint32 ERRPR1 ; 00428 volatile Uint8 RSVD3 [8] ; 00429 volatile Uint32 ERRCR0 ; 00430 volatile Uint32 ERRCR1 ; 00431 volatile Uint8 RSVD4 [8] ; 00432 volatile Uint32 PERRPR ; 00433 volatile Uint8 RSVD5 [4] ; 00434 volatile Uint32 PERRCR ; 00435 volatile Uint8 RSVD6 [4] ; 00436 volatile Uint32 EPCPR ; 00437 volatile Uint8 RSVD7 [4] ; 00438 volatile Uint32 EPCR ; 00439 volatile Uint8 RSVD8 [132] ; 00440 volatile Uint32 RAILSTAT ; 00441 volatile Uint32 RAILCTL ; 00442 volatile Uint32 RAILSEL ; 00443 volatile Uint8 RSVD9 [20] ; 00444 volatile Uint32 PTCMD ; 00445 volatile Uint8 RSVD10 [4] ; 00446 volatile Uint32 PTSTAT ; 00447 volatile Uint8 RSVD11 [212] ; 00448 volatile Uint32 PDSTAT [41] ; 00449 volatile Uint8 RSVD12 [92] ; 00450 volatile Uint32 PDCTL [41] ; 00451 volatile Uint8 RSVD13 [348] ; 00452 volatile Uint32 MRSTOUT [2] ; 00453 volatile Uint8 RSVD14 [8] ; 00454 volatile Uint32 MCKOUT [2] ; 00455 volatile Uint8 RSVD15 [232] ; 00456 volatile Uint32 MDCFG [41] ; 00457 volatile Uint8 RSVD16 [348] ; 00458 volatile Uint32 MDSTAT [41] ; 00459 volatile Uint8 RSVD17 [348] ; 00460 volatile Uint32 MDCTL [41] ; 00461 } DM6437_pscRegs ; 00462 00469 typedef struct DM6437_paramEntry_tags { 00470 volatile Uint32 OPTION ; 00471 volatile Uint32 SRC ; 00472 volatile Uint32 A_B_CNT ; 00473 volatile Uint32 DST ; 00474 volatile Uint32 SRC_DST_BIDX ; 00475 volatile Uint32 LINK_BCNTRLD ; 00476 volatile Uint32 SRC_DST_CIDX ; 00477 volatile Uint32 CCNT ; 00478 } DM6437_paramEntry ; 00479 00486 typedef struct DM6437_edmaRegs_tag { 00487 volatile Uint32 REV ; 00488 volatile Uint32 CCCFG ; 00489 volatile Uint8 RSVD0 [248] ; 00490 volatile Uint32 DCHMAP [64] ; 00491 volatile Uint32 QCHMAP [8] ; 00492 volatile Uint8 RSVD1 [32] ; 00493 volatile Uint32 DMAQNUM [8] ; 00494 volatile Uint32 QDMAQNUM ; 00495 volatile Uint8 RSVD2 [28] ; 00496 volatile Uint32 QUETCMAP ; 00497 volatile Uint32 QUEPRI ; 00498 volatile Uint8 RSVD3 [120] ; 00499 volatile Uint32 EMR ; 00500 volatile Uint32 EMRH ; 00501 volatile Uint32 EMCR ; 00502 volatile Uint32 EMCRH ; 00503 volatile Uint32 QEMR ; 00504 volatile Uint32 QEMCR ; 00505 volatile Uint32 CCERR ; 00506 volatile Uint32 CCERRCLR ; 00507 volatile Uint32 EEVAL ; 00508 volatile Uint8 RSVD4 [28] ; 00509 volatile Uint8 RSVD5 [64] ; 00510 volatile Uint32 QRAE [8] ; 00511 volatile Uint8 RSVD6[96] ; 00512 volatile Uint8 RSVD7 [512] ; 00513 volatile Uint32 QSTAT [8] ; 00514 volatile Uint32 QWMTHRA ; 00515 volatile Uint32 QWMTHRB ; 00516 volatile Uint8 RSVD8 [24] ; 00517 volatile Uint32 CCSTAT ; 00518 volatile Uint8 RSVD9 [188] ; 00519 volatile Uint32 AETCTL ; 00520 volatile Uint32 AETSTAT ; 00521 volatile Uint32 AETCMD ; 00522 volatile Uint8 RSVD10 [244] ; 00523 volatile Uint32 MPFAR ; 00524 volatile Uint32 MPFSR ; 00525 volatile Uint32 MPFCR ; 00526 volatile Uint32 MPPAG ; 00527 volatile Uint32 MPPA [8] ; 00528 volatile Uint8 RSVD11 [2000] ; 00529 volatile Uint32 ER ; 00530 volatile Uint32 ERH ; 00531 volatile Uint32 ECR ; 00532 volatile Uint32 ECRH ; 00533 volatile Uint32 ESR ; 00534 volatile Uint32 ESRH ; 00535 volatile Uint32 CER ; 00536 volatile Uint32 CERH ; 00537 volatile Uint32 EER ; 00538 volatile Uint32 EERH ; 00539 volatile Uint32 EECR ; 00540 volatile Uint32 EECRH ; 00541 volatile Uint32 EESR ; 00542 volatile Uint32 EESRH ; 00543 volatile Uint32 SER ; 00544 volatile Uint32 SERH ; 00545 volatile Uint32 SECR ; 00546 volatile Uint32 SECRH ; 00547 volatile Uint8 RSVD12 [8] ; 00548 volatile Uint32 IER ; 00549 volatile Uint32 IERH ; 00550 volatile Uint32 IECR ; 00551 volatile Uint32 IECRH ; 00552 volatile Uint32 IESR ; 00553 volatile Uint32 IESRH ; 00554 volatile Uint32 IPR ; 00555 volatile Uint32 IPRH ; 00556 volatile Uint32 ICR ; 00557 volatile Uint32 ICRH ; 00558 volatile Uint32 IEVAL ; 00559 volatile Uint8 RSVD13 [4] ; 00560 volatile Uint32 QER ; 00561 volatile Uint32 QEER ; 00562 volatile Uint32 QEECR ; 00563 volatile Uint32 QEESR ; 00564 volatile Uint32 QSER ; 00565 volatile Uint32 QSECR ; 00566 volatile Uint8 RSVD14 [3944] ; 00567 volatile Uint8 RSVD15 [4096] ; 00568 volatile Uint8 RSVD16 [4096] ; 00569 DM6437_paramEntry PARAMENTRY[512] ; 00570 } DM6437_edmaRegs ; 00571 00578 typedef struct DM6437_pciRegs_tag { 00579 volatile Uint32 PCIREVID ; 00580 volatile Uint8 RSVD0 [12] ; 00581 volatile Uint32 PCISTATSET ; 00582 volatile Uint32 PCISTATCLR ; 00583 volatile Uint8 RSVD1 [8] ; 00584 volatile Uint32 PCIHINTSET ; 00585 volatile Uint32 PCIHINTCLR ; 00586 volatile Uint8 RSVD2 [8] ; 00587 volatile Uint32 PCIBINTSET ; 00588 volatile Uint32 PCIBINTCLR ; 00589 volatile Uint32 PCIBCLKMGT ; 00590 volatile Uint8 RSVD3 [196] ; 00591 volatile Uint32 PCIVENDEVMIR ; 00592 volatile Uint32 PCICSRMIR ; 00593 volatile Uint32 PCICLREVMIR ; 00594 volatile Uint32 PCICLINEMIR ; 00595 volatile Uint32 PCIBAR0MSK ; 00596 volatile Uint32 PCIBAR1MSK ; 00597 volatile Uint32 PCIBAR2MSK ; 00598 volatile Uint32 PCIBAR3MSK ; 00599 volatile Uint32 PCIBAR4MSK ; 00600 volatile Uint32 PCIBAR5MSK ; 00601 volatile Uint8 RSVD4[4] ; 00602 volatile Uint32 PCISUBIDMIR ; 00603 volatile Uint8 RSVD5 [4] ; 00604 volatile Uint32 PCICPBPTRMIR ; 00605 volatile Uint8 RSVD6 [4] ; 00606 volatile Uint32 PCILGINTMIR ; 00607 volatile Uint8 RSVD7 [64] ; 00608 volatile Uint32 PCISLVCNTL ; 00609 volatile Uint8 RSVD8 [60] ; 00610 volatile Uint32 PCIBAR0TRL ; 00611 volatile Uint32 PCIBAR1TRL ; 00612 volatile Uint32 PCIBAR2TRL ; 00613 volatile Uint32 PCIBAR3TRL ; 00614 volatile Uint32 PCIBAR4TRL ; 00615 volatile Uint32 PCIBAR5TRL ; 00616 volatile Uint8 RSVD9 [8] ; 00617 volatile Uint32 PCIBARMIR [6] ; 00618 volatile Uint8 RSVD10 [264] ; 00619 volatile Uint32 PCIMCFGDAT ; 00620 volatile Uint32 PCIMCFGADR ; 00621 volatile Uint32 PCIMCFGCMD ; 00622 volatile Uint8 RSVD11 [4] ; 00623 volatile Uint32 PCIMSTCFG ; 00624 volatile Uint32 PCIADDSUB [32] ; 00625 volatile Uint32 PCIVENDEVPRG ; 00626 volatile Uint32 PCICMDSTATPRG ; 00627 volatile Uint32 PCICLREVPRG ; 00628 volatile Uint32 PCISUBIDPRG ; 00629 volatile Uint32 PCIMAXLGPRG ; 00630 volatile Uint32 PCILRSTREG ; 00631 volatile Uint32 PCICFGDONE ; 00632 volatile Uint32 PCIBAR0MPRG ; 00633 volatile Uint32 PCIBAR1MPRG ; 00634 volatile Uint32 PCIBAR2MPRG ; 00635 volatile Uint32 PCIBAR3MPRG ; 00636 volatile Uint32 PCIBAR4MPRG ; 00637 volatile Uint32 PCIBAR5MPRG ; 00638 volatile Uint32 PCIBAR0PRG ; 00639 volatile Uint32 PCIBAR1PRG ; 00640 volatile Uint32 PCIBAR2PRG ; 00641 volatile Uint32 PCIBAR3PRG ; 00642 volatile Uint32 PCIBAR4PRG ; 00643 volatile Uint32 PCIBAR5PRG ; 00644 volatile Uint32 PCIBAR0TRLPRG ; 00645 volatile Uint32 PCIBAR1TRLPRG ; 00646 volatile Uint32 PCIBAR2TRLPRG ; 00647 volatile Uint32 PCIBAR3TRLPRG ; 00648 volatile Uint32 PCIBAR4TRLPRG ; 00649 volatile Uint32 PCIBAR5TRLPRG ; 00650 volatile Uint32 PCIBASENPRG ; 00651 } DM6437_pciRegs ; 00652 00653 00677 struct DM6437_HalPciPhyObj_tag { 00678 Pvoid dev ; 00679 Uint32 irqId ; 00680 Uint32 busNo ; 00681 Uint32 slotNo ; 00682 Uint32 prevPageAddr ; 00683 Uint32 barPhys [NUM_BARS] ; 00684 Uint32 barLen [NUM_BARS] ; 00685 Uint32 barVirt [NUM_BARS] ; 00686 Uint32 edmaChnlId ; 00687 } ; 00688 00689 00690 #if defined (__cplusplus) 00691 } 00692 #endif /* if defined (__cplusplus) */ 00693 00694 #endif /* !defined (DM6437_HAL_PCI_H) */