162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * PCI / PCI-X / PCI-Express support for 4xx parts 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Copyright 2007 Ben. Herrenschmidt <benh@kernel.crashing.org>, IBM Corp. 562306a36Sopenharmony_ci * 662306a36Sopenharmony_ci * Bits and pieces extracted from arch/ppc support by 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * Matt Porter <mporter@kernel.crashing.org> 962306a36Sopenharmony_ci * 1062306a36Sopenharmony_ci * Copyright 2002-2005 MontaVista Software Inc. 1162306a36Sopenharmony_ci */ 1262306a36Sopenharmony_ci#ifndef __PPC4XX_PCI_H__ 1362306a36Sopenharmony_ci#define __PPC4XX_PCI_H__ 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci/* 1662306a36Sopenharmony_ci * 4xx PCI-X bridge register definitions 1762306a36Sopenharmony_ci */ 1862306a36Sopenharmony_ci#define PCIX0_VENDID 0x000 1962306a36Sopenharmony_ci#define PCIX0_DEVID 0x002 2062306a36Sopenharmony_ci#define PCIX0_COMMAND 0x004 2162306a36Sopenharmony_ci#define PCIX0_STATUS 0x006 2262306a36Sopenharmony_ci#define PCIX0_REVID 0x008 2362306a36Sopenharmony_ci#define PCIX0_CLS 0x009 2462306a36Sopenharmony_ci#define PCIX0_CACHELS 0x00c 2562306a36Sopenharmony_ci#define PCIX0_LATTIM 0x00d 2662306a36Sopenharmony_ci#define PCIX0_HDTYPE 0x00e 2762306a36Sopenharmony_ci#define PCIX0_BIST 0x00f 2862306a36Sopenharmony_ci#define PCIX0_BAR0L 0x010 2962306a36Sopenharmony_ci#define PCIX0_BAR0H 0x014 3062306a36Sopenharmony_ci#define PCIX0_BAR1 0x018 3162306a36Sopenharmony_ci#define PCIX0_BAR2L 0x01c 3262306a36Sopenharmony_ci#define PCIX0_BAR2H 0x020 3362306a36Sopenharmony_ci#define PCIX0_BAR3 0x024 3462306a36Sopenharmony_ci#define PCIX0_CISPTR 0x028 3562306a36Sopenharmony_ci#define PCIX0_SBSYSVID 0x02c 3662306a36Sopenharmony_ci#define PCIX0_SBSYSID 0x02e 3762306a36Sopenharmony_ci#define PCIX0_EROMBA 0x030 3862306a36Sopenharmony_ci#define PCIX0_CAP 0x034 3962306a36Sopenharmony_ci#define PCIX0_RES0 0x035 4062306a36Sopenharmony_ci#define PCIX0_RES1 0x036 4162306a36Sopenharmony_ci#define PCIX0_RES2 0x038 4262306a36Sopenharmony_ci#define PCIX0_INTLN 0x03c 4362306a36Sopenharmony_ci#define PCIX0_INTPN 0x03d 4462306a36Sopenharmony_ci#define PCIX0_MINGNT 0x03e 4562306a36Sopenharmony_ci#define PCIX0_MAXLTNCY 0x03f 4662306a36Sopenharmony_ci#define PCIX0_BRDGOPT1 0x040 4762306a36Sopenharmony_ci#define PCIX0_BRDGOPT2 0x044 4862306a36Sopenharmony_ci#define PCIX0_ERREN 0x050 4962306a36Sopenharmony_ci#define PCIX0_ERRSTS 0x054 5062306a36Sopenharmony_ci#define PCIX0_PLBBESR 0x058 5162306a36Sopenharmony_ci#define PCIX0_PLBBEARL 0x05c 5262306a36Sopenharmony_ci#define PCIX0_PLBBEARH 0x060 5362306a36Sopenharmony_ci#define PCIX0_POM0LAL 0x068 5462306a36Sopenharmony_ci#define PCIX0_POM0LAH 0x06c 5562306a36Sopenharmony_ci#define PCIX0_POM0SA 0x070 5662306a36Sopenharmony_ci#define PCIX0_POM0PCIAL 0x074 5762306a36Sopenharmony_ci#define PCIX0_POM0PCIAH 0x078 5862306a36Sopenharmony_ci#define PCIX0_POM1LAL 0x07c 5962306a36Sopenharmony_ci#define PCIX0_POM1LAH 0x080 6062306a36Sopenharmony_ci#define PCIX0_POM1SA 0x084 6162306a36Sopenharmony_ci#define PCIX0_POM1PCIAL 0x088 6262306a36Sopenharmony_ci#define PCIX0_POM1PCIAH 0x08c 6362306a36Sopenharmony_ci#define PCIX0_POM2SA 0x090 6462306a36Sopenharmony_ci#define PCIX0_PIM0SAL 0x098 6562306a36Sopenharmony_ci#define PCIX0_PIM0SA PCIX0_PIM0SAL 6662306a36Sopenharmony_ci#define PCIX0_PIM0LAL 0x09c 6762306a36Sopenharmony_ci#define PCIX0_PIM0LAH 0x0a0 6862306a36Sopenharmony_ci#define PCIX0_PIM1SA 0x0a4 6962306a36Sopenharmony_ci#define PCIX0_PIM1LAL 0x0a8 7062306a36Sopenharmony_ci#define PCIX0_PIM1LAH 0x0ac 7162306a36Sopenharmony_ci#define PCIX0_PIM2SAL 0x0b0 7262306a36Sopenharmony_ci#define PCIX0_PIM2SA PCIX0_PIM2SAL 7362306a36Sopenharmony_ci#define PCIX0_PIM2LAL 0x0b4 7462306a36Sopenharmony_ci#define PCIX0_PIM2LAH 0x0b8 7562306a36Sopenharmony_ci#define PCIX0_OMCAPID 0x0c0 7662306a36Sopenharmony_ci#define PCIX0_OMNIPTR 0x0c1 7762306a36Sopenharmony_ci#define PCIX0_OMMC 0x0c2 7862306a36Sopenharmony_ci#define PCIX0_OMMA 0x0c4 7962306a36Sopenharmony_ci#define PCIX0_OMMUA 0x0c8 8062306a36Sopenharmony_ci#define PCIX0_OMMDATA 0x0cc 8162306a36Sopenharmony_ci#define PCIX0_OMMEOI 0x0ce 8262306a36Sopenharmony_ci#define PCIX0_PMCAPID 0x0d0 8362306a36Sopenharmony_ci#define PCIX0_PMNIPTR 0x0d1 8462306a36Sopenharmony_ci#define PCIX0_PMC 0x0d2 8562306a36Sopenharmony_ci#define PCIX0_PMCSR 0x0d4 8662306a36Sopenharmony_ci#define PCIX0_PMCSRBSE 0x0d6 8762306a36Sopenharmony_ci#define PCIX0_PMDATA 0x0d7 8862306a36Sopenharmony_ci#define PCIX0_PMSCRR 0x0d8 8962306a36Sopenharmony_ci#define PCIX0_CAPID 0x0dc 9062306a36Sopenharmony_ci#define PCIX0_NIPTR 0x0dd 9162306a36Sopenharmony_ci#define PCIX0_CMD 0x0de 9262306a36Sopenharmony_ci#define PCIX0_STS 0x0e0 9362306a36Sopenharmony_ci#define PCIX0_IDR 0x0e4 9462306a36Sopenharmony_ci#define PCIX0_CID 0x0e8 9562306a36Sopenharmony_ci#define PCIX0_RID 0x0ec 9662306a36Sopenharmony_ci#define PCIX0_PIM0SAH 0x0f8 9762306a36Sopenharmony_ci#define PCIX0_PIM2SAH 0x0fc 9862306a36Sopenharmony_ci#define PCIX0_MSGIL 0x100 9962306a36Sopenharmony_ci#define PCIX0_MSGIH 0x104 10062306a36Sopenharmony_ci#define PCIX0_MSGOL 0x108 10162306a36Sopenharmony_ci#define PCIX0_MSGOH 0x10c 10262306a36Sopenharmony_ci#define PCIX0_IM 0x1f8 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_ci/* 10562306a36Sopenharmony_ci * 4xx PCI bridge register definitions 10662306a36Sopenharmony_ci */ 10762306a36Sopenharmony_ci#define PCIL0_PMM0LA 0x00 10862306a36Sopenharmony_ci#define PCIL0_PMM0MA 0x04 10962306a36Sopenharmony_ci#define PCIL0_PMM0PCILA 0x08 11062306a36Sopenharmony_ci#define PCIL0_PMM0PCIHA 0x0c 11162306a36Sopenharmony_ci#define PCIL0_PMM1LA 0x10 11262306a36Sopenharmony_ci#define PCIL0_PMM1MA 0x14 11362306a36Sopenharmony_ci#define PCIL0_PMM1PCILA 0x18 11462306a36Sopenharmony_ci#define PCIL0_PMM1PCIHA 0x1c 11562306a36Sopenharmony_ci#define PCIL0_PMM2LA 0x20 11662306a36Sopenharmony_ci#define PCIL0_PMM2MA 0x24 11762306a36Sopenharmony_ci#define PCIL0_PMM2PCILA 0x28 11862306a36Sopenharmony_ci#define PCIL0_PMM2PCIHA 0x2c 11962306a36Sopenharmony_ci#define PCIL0_PTM1MS 0x30 12062306a36Sopenharmony_ci#define PCIL0_PTM1LA 0x34 12162306a36Sopenharmony_ci#define PCIL0_PTM2MS 0x38 12262306a36Sopenharmony_ci#define PCIL0_PTM2LA 0x3c 12362306a36Sopenharmony_ci 12462306a36Sopenharmony_ci/* 12562306a36Sopenharmony_ci * 4xx PCIe bridge register definitions 12662306a36Sopenharmony_ci */ 12762306a36Sopenharmony_ci 12862306a36Sopenharmony_ci/* DCR offsets */ 12962306a36Sopenharmony_ci#define DCRO_PEGPL_CFGBAH 0x00 13062306a36Sopenharmony_ci#define DCRO_PEGPL_CFGBAL 0x01 13162306a36Sopenharmony_ci#define DCRO_PEGPL_CFGMSK 0x02 13262306a36Sopenharmony_ci#define DCRO_PEGPL_MSGBAH 0x03 13362306a36Sopenharmony_ci#define DCRO_PEGPL_MSGBAL 0x04 13462306a36Sopenharmony_ci#define DCRO_PEGPL_MSGMSK 0x05 13562306a36Sopenharmony_ci#define DCRO_PEGPL_OMR1BAH 0x06 13662306a36Sopenharmony_ci#define DCRO_PEGPL_OMR1BAL 0x07 13762306a36Sopenharmony_ci#define DCRO_PEGPL_OMR1MSKH 0x08 13862306a36Sopenharmony_ci#define DCRO_PEGPL_OMR1MSKL 0x09 13962306a36Sopenharmony_ci#define DCRO_PEGPL_OMR2BAH 0x0a 14062306a36Sopenharmony_ci#define DCRO_PEGPL_OMR2BAL 0x0b 14162306a36Sopenharmony_ci#define DCRO_PEGPL_OMR2MSKH 0x0c 14262306a36Sopenharmony_ci#define DCRO_PEGPL_OMR2MSKL 0x0d 14362306a36Sopenharmony_ci#define DCRO_PEGPL_OMR3BAH 0x0e 14462306a36Sopenharmony_ci#define DCRO_PEGPL_OMR3BAL 0x0f 14562306a36Sopenharmony_ci#define DCRO_PEGPL_OMR3MSKH 0x10 14662306a36Sopenharmony_ci#define DCRO_PEGPL_OMR3MSKL 0x11 14762306a36Sopenharmony_ci#define DCRO_PEGPL_REGBAH 0x12 14862306a36Sopenharmony_ci#define DCRO_PEGPL_REGBAL 0x13 14962306a36Sopenharmony_ci#define DCRO_PEGPL_REGMSK 0x14 15062306a36Sopenharmony_ci#define DCRO_PEGPL_SPECIAL 0x15 15162306a36Sopenharmony_ci#define DCRO_PEGPL_CFG 0x16 15262306a36Sopenharmony_ci#define DCRO_PEGPL_ESR 0x17 15362306a36Sopenharmony_ci#define DCRO_PEGPL_EARH 0x18 15462306a36Sopenharmony_ci#define DCRO_PEGPL_EARL 0x19 15562306a36Sopenharmony_ci#define DCRO_PEGPL_EATR 0x1a 15662306a36Sopenharmony_ci 15762306a36Sopenharmony_ci/* DMER mask */ 15862306a36Sopenharmony_ci#define GPL_DMER_MASK_DISA 0x02000000 15962306a36Sopenharmony_ci 16062306a36Sopenharmony_ci/* 16162306a36Sopenharmony_ci * System DCRs (SDRs) 16262306a36Sopenharmony_ci */ 16362306a36Sopenharmony_ci#define PESDR0_PLLLCT1 0x03a0 16462306a36Sopenharmony_ci#define PESDR0_PLLLCT2 0x03a1 16562306a36Sopenharmony_ci#define PESDR0_PLLLCT3 0x03a2 16662306a36Sopenharmony_ci 16762306a36Sopenharmony_ci/* 16862306a36Sopenharmony_ci * 440SPe additional DCRs 16962306a36Sopenharmony_ci */ 17062306a36Sopenharmony_ci#define PESDR0_440SPE_UTLSET1 0x0300 17162306a36Sopenharmony_ci#define PESDR0_440SPE_UTLSET2 0x0301 17262306a36Sopenharmony_ci#define PESDR0_440SPE_DLPSET 0x0302 17362306a36Sopenharmony_ci#define PESDR0_440SPE_LOOP 0x0303 17462306a36Sopenharmony_ci#define PESDR0_440SPE_RCSSET 0x0304 17562306a36Sopenharmony_ci#define PESDR0_440SPE_RCSSTS 0x0305 17662306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL0SET1 0x0306 17762306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL0SET2 0x0307 17862306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL0STS 0x0308 17962306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL1SET1 0x0309 18062306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL1SET2 0x030a 18162306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL1STS 0x030b 18262306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL2SET1 0x030c 18362306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL2SET2 0x030d 18462306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL2STS 0x030e 18562306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL3SET1 0x030f 18662306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL3SET2 0x0310 18762306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL3STS 0x0311 18862306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL4SET1 0x0312 18962306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL4SET2 0x0313 19062306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL4STS 0x0314 19162306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL5SET1 0x0315 19262306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL5SET2 0x0316 19362306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL5STS 0x0317 19462306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL6SET1 0x0318 19562306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL6SET2 0x0319 19662306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL6STS 0x031a 19762306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL7SET1 0x031b 19862306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL7SET2 0x031c 19962306a36Sopenharmony_ci#define PESDR0_440SPE_HSSL7STS 0x031d 20062306a36Sopenharmony_ci#define PESDR0_440SPE_HSSCTLSET 0x031e 20162306a36Sopenharmony_ci#define PESDR0_440SPE_LANE_ABCD 0x031f 20262306a36Sopenharmony_ci#define PESDR0_440SPE_LANE_EFGH 0x0320 20362306a36Sopenharmony_ci 20462306a36Sopenharmony_ci#define PESDR1_440SPE_UTLSET1 0x0340 20562306a36Sopenharmony_ci#define PESDR1_440SPE_UTLSET2 0x0341 20662306a36Sopenharmony_ci#define PESDR1_440SPE_DLPSET 0x0342 20762306a36Sopenharmony_ci#define PESDR1_440SPE_LOOP 0x0343 20862306a36Sopenharmony_ci#define PESDR1_440SPE_RCSSET 0x0344 20962306a36Sopenharmony_ci#define PESDR1_440SPE_RCSSTS 0x0345 21062306a36Sopenharmony_ci#define PESDR1_440SPE_HSSL0SET1 0x0346 21162306a36Sopenharmony_ci#define PESDR1_440SPE_HSSL0SET2 0x0347 21262306a36Sopenharmony_ci#define PESDR1_440SPE_HSSL0STS 0x0348 21362306a36Sopenharmony_ci#define PESDR1_440SPE_HSSL1SET1 0x0349 21462306a36Sopenharmony_ci#define PESDR1_440SPE_HSSL1SET2 0x034a 21562306a36Sopenharmony_ci#define PESDR1_440SPE_HSSL1STS 0x034b 21662306a36Sopenharmony_ci#define PESDR1_440SPE_HSSL2SET1 0x034c 21762306a36Sopenharmony_ci#define PESDR1_440SPE_HSSL2SET2 0x034d 21862306a36Sopenharmony_ci#define PESDR1_440SPE_HSSL2STS 0x034e 21962306a36Sopenharmony_ci#define PESDR1_440SPE_HSSL3SET1 0x034f 22062306a36Sopenharmony_ci#define PESDR1_440SPE_HSSL3SET2 0x0350 22162306a36Sopenharmony_ci#define PESDR1_440SPE_HSSL3STS 0x0351 22262306a36Sopenharmony_ci#define PESDR1_440SPE_HSSCTLSET 0x0352 22362306a36Sopenharmony_ci#define PESDR1_440SPE_LANE_ABCD 0x0353 22462306a36Sopenharmony_ci 22562306a36Sopenharmony_ci#define PESDR2_440SPE_UTLSET1 0x0370 22662306a36Sopenharmony_ci#define PESDR2_440SPE_UTLSET2 0x0371 22762306a36Sopenharmony_ci#define PESDR2_440SPE_DLPSET 0x0372 22862306a36Sopenharmony_ci#define PESDR2_440SPE_LOOP 0x0373 22962306a36Sopenharmony_ci#define PESDR2_440SPE_RCSSET 0x0374 23062306a36Sopenharmony_ci#define PESDR2_440SPE_RCSSTS 0x0375 23162306a36Sopenharmony_ci#define PESDR2_440SPE_HSSL0SET1 0x0376 23262306a36Sopenharmony_ci#define PESDR2_440SPE_HSSL0SET2 0x0377 23362306a36Sopenharmony_ci#define PESDR2_440SPE_HSSL0STS 0x0378 23462306a36Sopenharmony_ci#define PESDR2_440SPE_HSSL1SET1 0x0379 23562306a36Sopenharmony_ci#define PESDR2_440SPE_HSSL1SET2 0x037a 23662306a36Sopenharmony_ci#define PESDR2_440SPE_HSSL1STS 0x037b 23762306a36Sopenharmony_ci#define PESDR2_440SPE_HSSL2SET1 0x037c 23862306a36Sopenharmony_ci#define PESDR2_440SPE_HSSL2SET2 0x037d 23962306a36Sopenharmony_ci#define PESDR2_440SPE_HSSL2STS 0x037e 24062306a36Sopenharmony_ci#define PESDR2_440SPE_HSSL3SET1 0x037f 24162306a36Sopenharmony_ci#define PESDR2_440SPE_HSSL3SET2 0x0380 24262306a36Sopenharmony_ci#define PESDR2_440SPE_HSSL3STS 0x0381 24362306a36Sopenharmony_ci#define PESDR2_440SPE_HSSCTLSET 0x0382 24462306a36Sopenharmony_ci#define PESDR2_440SPE_LANE_ABCD 0x0383 24562306a36Sopenharmony_ci 24662306a36Sopenharmony_ci/* 24762306a36Sopenharmony_ci * 405EX additional DCRs 24862306a36Sopenharmony_ci */ 24962306a36Sopenharmony_ci#define PESDR0_405EX_UTLSET1 0x0400 25062306a36Sopenharmony_ci#define PESDR0_405EX_UTLSET2 0x0401 25162306a36Sopenharmony_ci#define PESDR0_405EX_DLPSET 0x0402 25262306a36Sopenharmony_ci#define PESDR0_405EX_LOOP 0x0403 25362306a36Sopenharmony_ci#define PESDR0_405EX_RCSSET 0x0404 25462306a36Sopenharmony_ci#define PESDR0_405EX_RCSSTS 0x0405 25562306a36Sopenharmony_ci#define PESDR0_405EX_PHYSET1 0x0406 25662306a36Sopenharmony_ci#define PESDR0_405EX_PHYSET2 0x0407 25762306a36Sopenharmony_ci#define PESDR0_405EX_BIST 0x0408 25862306a36Sopenharmony_ci#define PESDR0_405EX_LPB 0x040B 25962306a36Sopenharmony_ci#define PESDR0_405EX_PHYSTA 0x040C 26062306a36Sopenharmony_ci 26162306a36Sopenharmony_ci#define PESDR1_405EX_UTLSET1 0x0440 26262306a36Sopenharmony_ci#define PESDR1_405EX_UTLSET2 0x0441 26362306a36Sopenharmony_ci#define PESDR1_405EX_DLPSET 0x0442 26462306a36Sopenharmony_ci#define PESDR1_405EX_LOOP 0x0443 26562306a36Sopenharmony_ci#define PESDR1_405EX_RCSSET 0x0444 26662306a36Sopenharmony_ci#define PESDR1_405EX_RCSSTS 0x0445 26762306a36Sopenharmony_ci#define PESDR1_405EX_PHYSET1 0x0446 26862306a36Sopenharmony_ci#define PESDR1_405EX_PHYSET2 0x0447 26962306a36Sopenharmony_ci#define PESDR1_405EX_BIST 0x0448 27062306a36Sopenharmony_ci#define PESDR1_405EX_LPB 0x044B 27162306a36Sopenharmony_ci#define PESDR1_405EX_PHYSTA 0x044C 27262306a36Sopenharmony_ci 27362306a36Sopenharmony_ci/* 27462306a36Sopenharmony_ci * 460EX additional DCRs 27562306a36Sopenharmony_ci */ 27662306a36Sopenharmony_ci#define PESDR0_460EX_L0BIST 0x0308 27762306a36Sopenharmony_ci#define PESDR0_460EX_L0BISTSTS 0x0309 27862306a36Sopenharmony_ci#define PESDR0_460EX_L0CDRCTL 0x030A 27962306a36Sopenharmony_ci#define PESDR0_460EX_L0DRV 0x030B 28062306a36Sopenharmony_ci#define PESDR0_460EX_L0REC 0x030C 28162306a36Sopenharmony_ci#define PESDR0_460EX_L0LPB 0x030D 28262306a36Sopenharmony_ci#define PESDR0_460EX_L0CLK 0x030E 28362306a36Sopenharmony_ci#define PESDR0_460EX_PHY_CTL_RST 0x030F 28462306a36Sopenharmony_ci#define PESDR0_460EX_RSTSTA 0x0310 28562306a36Sopenharmony_ci#define PESDR0_460EX_OBS 0x0311 28662306a36Sopenharmony_ci#define PESDR0_460EX_L0ERRC 0x0320 28762306a36Sopenharmony_ci 28862306a36Sopenharmony_ci#define PESDR1_460EX_L0BIST 0x0348 28962306a36Sopenharmony_ci#define PESDR1_460EX_L1BIST 0x0349 29062306a36Sopenharmony_ci#define PESDR1_460EX_L2BIST 0x034A 29162306a36Sopenharmony_ci#define PESDR1_460EX_L3BIST 0x034B 29262306a36Sopenharmony_ci#define PESDR1_460EX_L0BISTSTS 0x034C 29362306a36Sopenharmony_ci#define PESDR1_460EX_L1BISTSTS 0x034D 29462306a36Sopenharmony_ci#define PESDR1_460EX_L2BISTSTS 0x034E 29562306a36Sopenharmony_ci#define PESDR1_460EX_L3BISTSTS 0x034F 29662306a36Sopenharmony_ci#define PESDR1_460EX_L0CDRCTL 0x0350 29762306a36Sopenharmony_ci#define PESDR1_460EX_L1CDRCTL 0x0351 29862306a36Sopenharmony_ci#define PESDR1_460EX_L2CDRCTL 0x0352 29962306a36Sopenharmony_ci#define PESDR1_460EX_L3CDRCTL 0x0353 30062306a36Sopenharmony_ci#define PESDR1_460EX_L0DRV 0x0354 30162306a36Sopenharmony_ci#define PESDR1_460EX_L1DRV 0x0355 30262306a36Sopenharmony_ci#define PESDR1_460EX_L2DRV 0x0356 30362306a36Sopenharmony_ci#define PESDR1_460EX_L3DRV 0x0357 30462306a36Sopenharmony_ci#define PESDR1_460EX_L0REC 0x0358 30562306a36Sopenharmony_ci#define PESDR1_460EX_L1REC 0x0359 30662306a36Sopenharmony_ci#define PESDR1_460EX_L2REC 0x035A 30762306a36Sopenharmony_ci#define PESDR1_460EX_L3REC 0x035B 30862306a36Sopenharmony_ci#define PESDR1_460EX_L0LPB 0x035C 30962306a36Sopenharmony_ci#define PESDR1_460EX_L1LPB 0x035D 31062306a36Sopenharmony_ci#define PESDR1_460EX_L2LPB 0x035E 31162306a36Sopenharmony_ci#define PESDR1_460EX_L3LPB 0x035F 31262306a36Sopenharmony_ci#define PESDR1_460EX_L0CLK 0x0360 31362306a36Sopenharmony_ci#define PESDR1_460EX_L1CLK 0x0361 31462306a36Sopenharmony_ci#define PESDR1_460EX_L2CLK 0x0362 31562306a36Sopenharmony_ci#define PESDR1_460EX_L3CLK 0x0363 31662306a36Sopenharmony_ci#define PESDR1_460EX_PHY_CTL_RST 0x0364 31762306a36Sopenharmony_ci#define PESDR1_460EX_RSTSTA 0x0365 31862306a36Sopenharmony_ci#define PESDR1_460EX_OBS 0x0366 31962306a36Sopenharmony_ci#define PESDR1_460EX_L0ERRC 0x0368 32062306a36Sopenharmony_ci#define PESDR1_460EX_L1ERRC 0x0369 32162306a36Sopenharmony_ci#define PESDR1_460EX_L2ERRC 0x036A 32262306a36Sopenharmony_ci#define PESDR1_460EX_L3ERRC 0x036B 32362306a36Sopenharmony_ci#define PESDR0_460EX_IHS1 0x036C 32462306a36Sopenharmony_ci#define PESDR0_460EX_IHS2 0x036D 32562306a36Sopenharmony_ci 32662306a36Sopenharmony_ci/* 32762306a36Sopenharmony_ci * 460SX additional DCRs 32862306a36Sopenharmony_ci */ 32962306a36Sopenharmony_ci#define PESDRn_460SX_RCEI 0x02 33062306a36Sopenharmony_ci 33162306a36Sopenharmony_ci#define PESDR0_460SX_HSSL0DAMP 0x320 33262306a36Sopenharmony_ci#define PESDR0_460SX_HSSL1DAMP 0x321 33362306a36Sopenharmony_ci#define PESDR0_460SX_HSSL2DAMP 0x322 33462306a36Sopenharmony_ci#define PESDR0_460SX_HSSL3DAMP 0x323 33562306a36Sopenharmony_ci#define PESDR0_460SX_HSSL4DAMP 0x324 33662306a36Sopenharmony_ci#define PESDR0_460SX_HSSL5DAMP 0x325 33762306a36Sopenharmony_ci#define PESDR0_460SX_HSSL6DAMP 0x326 33862306a36Sopenharmony_ci#define PESDR0_460SX_HSSL7DAMP 0x327 33962306a36Sopenharmony_ci 34062306a36Sopenharmony_ci#define PESDR1_460SX_HSSL0DAMP 0x354 34162306a36Sopenharmony_ci#define PESDR1_460SX_HSSL1DAMP 0x355 34262306a36Sopenharmony_ci#define PESDR1_460SX_HSSL2DAMP 0x356 34362306a36Sopenharmony_ci#define PESDR1_460SX_HSSL3DAMP 0x357 34462306a36Sopenharmony_ci 34562306a36Sopenharmony_ci#define PESDR2_460SX_HSSL0DAMP 0x384 34662306a36Sopenharmony_ci#define PESDR2_460SX_HSSL1DAMP 0x385 34762306a36Sopenharmony_ci#define PESDR2_460SX_HSSL2DAMP 0x386 34862306a36Sopenharmony_ci#define PESDR2_460SX_HSSL3DAMP 0x387 34962306a36Sopenharmony_ci 35062306a36Sopenharmony_ci#define PESDR0_460SX_HSSL0COEFA 0x328 35162306a36Sopenharmony_ci#define PESDR0_460SX_HSSL1COEFA 0x329 35262306a36Sopenharmony_ci#define PESDR0_460SX_HSSL2COEFA 0x32A 35362306a36Sopenharmony_ci#define PESDR0_460SX_HSSL3COEFA 0x32B 35462306a36Sopenharmony_ci#define PESDR0_460SX_HSSL4COEFA 0x32C 35562306a36Sopenharmony_ci#define PESDR0_460SX_HSSL5COEFA 0x32D 35662306a36Sopenharmony_ci#define PESDR0_460SX_HSSL6COEFA 0x32E 35762306a36Sopenharmony_ci#define PESDR0_460SX_HSSL7COEFA 0x32F 35862306a36Sopenharmony_ci 35962306a36Sopenharmony_ci#define PESDR1_460SX_HSSL0COEFA 0x358 36062306a36Sopenharmony_ci#define PESDR1_460SX_HSSL1COEFA 0x359 36162306a36Sopenharmony_ci#define PESDR1_460SX_HSSL2COEFA 0x35A 36262306a36Sopenharmony_ci#define PESDR1_460SX_HSSL3COEFA 0x35B 36362306a36Sopenharmony_ci 36462306a36Sopenharmony_ci#define PESDR2_460SX_HSSL0COEFA 0x388 36562306a36Sopenharmony_ci#define PESDR2_460SX_HSSL1COEFA 0x389 36662306a36Sopenharmony_ci#define PESDR2_460SX_HSSL2COEFA 0x38A 36762306a36Sopenharmony_ci#define PESDR2_460SX_HSSL3COEFA 0x38B 36862306a36Sopenharmony_ci 36962306a36Sopenharmony_ci#define PESDR0_460SX_HSSL1CALDRV 0x339 37062306a36Sopenharmony_ci#define PESDR1_460SX_HSSL1CALDRV 0x361 37162306a36Sopenharmony_ci#define PESDR2_460SX_HSSL1CALDRV 0x391 37262306a36Sopenharmony_ci 37362306a36Sopenharmony_ci#define PESDR0_460SX_HSSSLEW 0x338 37462306a36Sopenharmony_ci#define PESDR1_460SX_HSSSLEW 0x360 37562306a36Sopenharmony_ci#define PESDR2_460SX_HSSSLEW 0x390 37662306a36Sopenharmony_ci 37762306a36Sopenharmony_ci#define PESDR0_460SX_HSSCTLSET 0x31E 37862306a36Sopenharmony_ci#define PESDR1_460SX_HSSCTLSET 0x352 37962306a36Sopenharmony_ci#define PESDR2_460SX_HSSCTLSET 0x382 38062306a36Sopenharmony_ci 38162306a36Sopenharmony_ci#define PESDR0_460SX_RCSSET 0x304 38262306a36Sopenharmony_ci#define PESDR1_460SX_RCSSET 0x344 38362306a36Sopenharmony_ci#define PESDR2_460SX_RCSSET 0x374 38462306a36Sopenharmony_ci/* 38562306a36Sopenharmony_ci * Of the above, some are common offsets from the base 38662306a36Sopenharmony_ci */ 38762306a36Sopenharmony_ci#define PESDRn_UTLSET1 0x00 38862306a36Sopenharmony_ci#define PESDRn_UTLSET2 0x01 38962306a36Sopenharmony_ci#define PESDRn_DLPSET 0x02 39062306a36Sopenharmony_ci#define PESDRn_LOOP 0x03 39162306a36Sopenharmony_ci#define PESDRn_RCSSET 0x04 39262306a36Sopenharmony_ci#define PESDRn_RCSSTS 0x05 39362306a36Sopenharmony_ci 39462306a36Sopenharmony_ci/* 440spe only */ 39562306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL0SET1 0x06 39662306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL0SET2 0x07 39762306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL0STS 0x08 39862306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL1SET1 0x09 39962306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL1SET2 0x0a 40062306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL1STS 0x0b 40162306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL2SET1 0x0c 40262306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL2SET2 0x0d 40362306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL2STS 0x0e 40462306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL3SET1 0x0f 40562306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL3SET2 0x10 40662306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL3STS 0x11 40762306a36Sopenharmony_ci 40862306a36Sopenharmony_ci/* 440spe port 0 only */ 40962306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL4SET1 0x12 41062306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL4SET2 0x13 41162306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL4STS 0x14 41262306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL5SET1 0x15 41362306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL5SET2 0x16 41462306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL5STS 0x17 41562306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL6SET1 0x18 41662306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL6SET2 0x19 41762306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL6STS 0x1a 41862306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL7SET1 0x1b 41962306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL7SET2 0x1c 42062306a36Sopenharmony_ci#define PESDRn_440SPE_HSSL7STS 0x1d 42162306a36Sopenharmony_ci 42262306a36Sopenharmony_ci/* 405ex only */ 42362306a36Sopenharmony_ci#define PESDRn_405EX_PHYSET1 0x06 42462306a36Sopenharmony_ci#define PESDRn_405EX_PHYSET2 0x07 42562306a36Sopenharmony_ci#define PESDRn_405EX_PHYSTA 0x0c 42662306a36Sopenharmony_ci 42762306a36Sopenharmony_ci/* 42862306a36Sopenharmony_ci * UTL register offsets 42962306a36Sopenharmony_ci */ 43062306a36Sopenharmony_ci#define PEUTL_PBCTL 0x00 43162306a36Sopenharmony_ci#define PEUTL_PBBSZ 0x20 43262306a36Sopenharmony_ci#define PEUTL_OPDBSZ 0x68 43362306a36Sopenharmony_ci#define PEUTL_IPHBSZ 0x70 43462306a36Sopenharmony_ci#define PEUTL_IPDBSZ 0x78 43562306a36Sopenharmony_ci#define PEUTL_OUTTR 0x90 43662306a36Sopenharmony_ci#define PEUTL_INTR 0x98 43762306a36Sopenharmony_ci#define PEUTL_PCTL 0xa0 43862306a36Sopenharmony_ci#define PEUTL_RCSTA 0xB0 43962306a36Sopenharmony_ci#define PEUTL_RCIRQEN 0xb8 44062306a36Sopenharmony_ci 44162306a36Sopenharmony_ci/* 44262306a36Sopenharmony_ci * Config space register offsets 44362306a36Sopenharmony_ci */ 44462306a36Sopenharmony_ci#define PECFG_ECRTCTL 0x074 44562306a36Sopenharmony_ci 44662306a36Sopenharmony_ci#define PECFG_BAR0LMPA 0x210 44762306a36Sopenharmony_ci#define PECFG_BAR0HMPA 0x214 44862306a36Sopenharmony_ci#define PECFG_BAR1MPA 0x218 44962306a36Sopenharmony_ci#define PECFG_BAR2LMPA 0x220 45062306a36Sopenharmony_ci#define PECFG_BAR2HMPA 0x224 45162306a36Sopenharmony_ci 45262306a36Sopenharmony_ci#define PECFG_PIMEN 0x33c 45362306a36Sopenharmony_ci#define PECFG_PIM0LAL 0x340 45462306a36Sopenharmony_ci#define PECFG_PIM0LAH 0x344 45562306a36Sopenharmony_ci#define PECFG_PIM1LAL 0x348 45662306a36Sopenharmony_ci#define PECFG_PIM1LAH 0x34c 45762306a36Sopenharmony_ci#define PECFG_PIM01SAL 0x350 45862306a36Sopenharmony_ci#define PECFG_PIM01SAH 0x354 45962306a36Sopenharmony_ci 46062306a36Sopenharmony_ci#define PECFG_POM0LAL 0x380 46162306a36Sopenharmony_ci#define PECFG_POM0LAH 0x384 46262306a36Sopenharmony_ci#define PECFG_POM1LAL 0x388 46362306a36Sopenharmony_ci#define PECFG_POM1LAH 0x38c 46462306a36Sopenharmony_ci#define PECFG_POM2LAL 0x390 46562306a36Sopenharmony_ci#define PECFG_POM2LAH 0x394 46662306a36Sopenharmony_ci 46762306a36Sopenharmony_ci/* 460sx only */ 46862306a36Sopenharmony_ci#define PECFG_460SX_DLLSTA 0x3f8 46962306a36Sopenharmony_ci 47062306a36Sopenharmony_ci/* 460sx Bit Mappings */ 47162306a36Sopenharmony_ci#define PECFG_460SX_DLLSTA_LINKUP 0x00000010 47262306a36Sopenharmony_ci#define DCRO_PEGPL_460SX_OMR1MSKL_UOT 0x00000004 47362306a36Sopenharmony_ci 47462306a36Sopenharmony_ci/* PEGPL Bit Mappings */ 47562306a36Sopenharmony_ci#define DCRO_PEGPL_OMRxMSKL_VAL 0x00000001 47662306a36Sopenharmony_ci#define DCRO_PEGPL_OMR1MSKL_UOT 0x00000002 47762306a36Sopenharmony_ci#define DCRO_PEGPL_OMR3MSKL_IO 0x00000002 47862306a36Sopenharmony_ci 47962306a36Sopenharmony_ci/* 476FPE */ 48062306a36Sopenharmony_ci#define PCCFG_LCPA 0x270 48162306a36Sopenharmony_ci#define PECFG_TLDLP 0x3F8 48262306a36Sopenharmony_ci#define PECFG_TLDLP_LNKUP 0x00000008 48362306a36Sopenharmony_ci#define PECFG_TLDLP_PRESENT 0x00000010 48462306a36Sopenharmony_ci#define DCRO_PEGPL_476FPE_OMR1MSKL_UOT 0x00000004 48562306a36Sopenharmony_ci 48662306a36Sopenharmony_ci/* SDR Bit Mappings */ 48762306a36Sopenharmony_ci#define PESDRx_RCSSET_HLDPLB 0x10000000 48862306a36Sopenharmony_ci#define PESDRx_RCSSET_RSTGU 0x01000000 48962306a36Sopenharmony_ci#define PESDRx_RCSSET_RDY 0x00100000 49062306a36Sopenharmony_ci#define PESDRx_RCSSET_RSTDL 0x00010000 49162306a36Sopenharmony_ci#define PESDRx_RCSSET_RSTPYN 0x00001000 49262306a36Sopenharmony_ci 49362306a36Sopenharmony_cienum 49462306a36Sopenharmony_ci{ 49562306a36Sopenharmony_ci PTYPE_ENDPOINT = 0x0, 49662306a36Sopenharmony_ci PTYPE_LEGACY_ENDPOINT = 0x1, 49762306a36Sopenharmony_ci PTYPE_ROOT_PORT = 0x4, 49862306a36Sopenharmony_ci 49962306a36Sopenharmony_ci LNKW_X1 = 0x1, 50062306a36Sopenharmony_ci LNKW_X4 = 0x4, 50162306a36Sopenharmony_ci LNKW_X8 = 0x8 50262306a36Sopenharmony_ci}; 50362306a36Sopenharmony_ci 50462306a36Sopenharmony_ci 50562306a36Sopenharmony_ci#endif /* __PPC4XX_PCI_H__ */ 506