18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * PCI / PCI-X / PCI-Express support for 4xx parts
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Copyright 2007 Ben. Herrenschmidt <benh@kernel.crashing.org>, IBM Corp.
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * Bits and pieces extracted from arch/ppc support by
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci * Matt Porter <mporter@kernel.crashing.org>
98c2ecf20Sopenharmony_ci *
108c2ecf20Sopenharmony_ci * Copyright 2002-2005 MontaVista Software Inc.
118c2ecf20Sopenharmony_ci */
128c2ecf20Sopenharmony_ci#ifndef __PPC4XX_PCI_H__
138c2ecf20Sopenharmony_ci#define __PPC4XX_PCI_H__
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci/*
168c2ecf20Sopenharmony_ci * 4xx PCI-X bridge register definitions
178c2ecf20Sopenharmony_ci */
188c2ecf20Sopenharmony_ci#define PCIX0_VENDID		0x000
198c2ecf20Sopenharmony_ci#define PCIX0_DEVID		0x002
208c2ecf20Sopenharmony_ci#define PCIX0_COMMAND		0x004
218c2ecf20Sopenharmony_ci#define PCIX0_STATUS		0x006
228c2ecf20Sopenharmony_ci#define PCIX0_REVID		0x008
238c2ecf20Sopenharmony_ci#define PCIX0_CLS		0x009
248c2ecf20Sopenharmony_ci#define PCIX0_CACHELS		0x00c
258c2ecf20Sopenharmony_ci#define PCIX0_LATTIM		0x00d
268c2ecf20Sopenharmony_ci#define PCIX0_HDTYPE		0x00e
278c2ecf20Sopenharmony_ci#define PCIX0_BIST		0x00f
288c2ecf20Sopenharmony_ci#define PCIX0_BAR0L		0x010
298c2ecf20Sopenharmony_ci#define PCIX0_BAR0H		0x014
308c2ecf20Sopenharmony_ci#define PCIX0_BAR1		0x018
318c2ecf20Sopenharmony_ci#define PCIX0_BAR2L		0x01c
328c2ecf20Sopenharmony_ci#define PCIX0_BAR2H		0x020
338c2ecf20Sopenharmony_ci#define PCIX0_BAR3		0x024
348c2ecf20Sopenharmony_ci#define PCIX0_CISPTR		0x028
358c2ecf20Sopenharmony_ci#define PCIX0_SBSYSVID		0x02c
368c2ecf20Sopenharmony_ci#define PCIX0_SBSYSID		0x02e
378c2ecf20Sopenharmony_ci#define PCIX0_EROMBA		0x030
388c2ecf20Sopenharmony_ci#define PCIX0_CAP		0x034
398c2ecf20Sopenharmony_ci#define PCIX0_RES0		0x035
408c2ecf20Sopenharmony_ci#define PCIX0_RES1		0x036
418c2ecf20Sopenharmony_ci#define PCIX0_RES2		0x038
428c2ecf20Sopenharmony_ci#define PCIX0_INTLN		0x03c
438c2ecf20Sopenharmony_ci#define PCIX0_INTPN		0x03d
448c2ecf20Sopenharmony_ci#define PCIX0_MINGNT		0x03e
458c2ecf20Sopenharmony_ci#define PCIX0_MAXLTNCY		0x03f
468c2ecf20Sopenharmony_ci#define PCIX0_BRDGOPT1		0x040
478c2ecf20Sopenharmony_ci#define PCIX0_BRDGOPT2		0x044
488c2ecf20Sopenharmony_ci#define PCIX0_ERREN		0x050
498c2ecf20Sopenharmony_ci#define PCIX0_ERRSTS		0x054
508c2ecf20Sopenharmony_ci#define PCIX0_PLBBESR		0x058
518c2ecf20Sopenharmony_ci#define PCIX0_PLBBEARL		0x05c
528c2ecf20Sopenharmony_ci#define PCIX0_PLBBEARH		0x060
538c2ecf20Sopenharmony_ci#define PCIX0_POM0LAL		0x068
548c2ecf20Sopenharmony_ci#define PCIX0_POM0LAH		0x06c
558c2ecf20Sopenharmony_ci#define PCIX0_POM0SA		0x070
568c2ecf20Sopenharmony_ci#define PCIX0_POM0PCIAL		0x074
578c2ecf20Sopenharmony_ci#define PCIX0_POM0PCIAH		0x078
588c2ecf20Sopenharmony_ci#define PCIX0_POM1LAL		0x07c
598c2ecf20Sopenharmony_ci#define PCIX0_POM1LAH		0x080
608c2ecf20Sopenharmony_ci#define PCIX0_POM1SA		0x084
618c2ecf20Sopenharmony_ci#define PCIX0_POM1PCIAL		0x088
628c2ecf20Sopenharmony_ci#define PCIX0_POM1PCIAH		0x08c
638c2ecf20Sopenharmony_ci#define PCIX0_POM2SA		0x090
648c2ecf20Sopenharmony_ci#define PCIX0_PIM0SAL		0x098
658c2ecf20Sopenharmony_ci#define PCIX0_PIM0SA		PCIX0_PIM0SAL
668c2ecf20Sopenharmony_ci#define PCIX0_PIM0LAL		0x09c
678c2ecf20Sopenharmony_ci#define PCIX0_PIM0LAH		0x0a0
688c2ecf20Sopenharmony_ci#define PCIX0_PIM1SA		0x0a4
698c2ecf20Sopenharmony_ci#define PCIX0_PIM1LAL		0x0a8
708c2ecf20Sopenharmony_ci#define PCIX0_PIM1LAH		0x0ac
718c2ecf20Sopenharmony_ci#define PCIX0_PIM2SAL		0x0b0
728c2ecf20Sopenharmony_ci#define PCIX0_PIM2SA		PCIX0_PIM2SAL
738c2ecf20Sopenharmony_ci#define PCIX0_PIM2LAL		0x0b4
748c2ecf20Sopenharmony_ci#define PCIX0_PIM2LAH		0x0b8
758c2ecf20Sopenharmony_ci#define PCIX0_OMCAPID		0x0c0
768c2ecf20Sopenharmony_ci#define PCIX0_OMNIPTR		0x0c1
778c2ecf20Sopenharmony_ci#define PCIX0_OMMC		0x0c2
788c2ecf20Sopenharmony_ci#define PCIX0_OMMA		0x0c4
798c2ecf20Sopenharmony_ci#define PCIX0_OMMUA		0x0c8
808c2ecf20Sopenharmony_ci#define PCIX0_OMMDATA		0x0cc
818c2ecf20Sopenharmony_ci#define PCIX0_OMMEOI		0x0ce
828c2ecf20Sopenharmony_ci#define PCIX0_PMCAPID		0x0d0
838c2ecf20Sopenharmony_ci#define PCIX0_PMNIPTR		0x0d1
848c2ecf20Sopenharmony_ci#define PCIX0_PMC		0x0d2
858c2ecf20Sopenharmony_ci#define PCIX0_PMCSR		0x0d4
868c2ecf20Sopenharmony_ci#define PCIX0_PMCSRBSE		0x0d6
878c2ecf20Sopenharmony_ci#define PCIX0_PMDATA		0x0d7
888c2ecf20Sopenharmony_ci#define PCIX0_PMSCRR		0x0d8
898c2ecf20Sopenharmony_ci#define PCIX0_CAPID		0x0dc
908c2ecf20Sopenharmony_ci#define PCIX0_NIPTR		0x0dd
918c2ecf20Sopenharmony_ci#define PCIX0_CMD		0x0de
928c2ecf20Sopenharmony_ci#define PCIX0_STS		0x0e0
938c2ecf20Sopenharmony_ci#define PCIX0_IDR		0x0e4
948c2ecf20Sopenharmony_ci#define PCIX0_CID		0x0e8
958c2ecf20Sopenharmony_ci#define PCIX0_RID		0x0ec
968c2ecf20Sopenharmony_ci#define PCIX0_PIM0SAH		0x0f8
978c2ecf20Sopenharmony_ci#define PCIX0_PIM2SAH		0x0fc
988c2ecf20Sopenharmony_ci#define PCIX0_MSGIL		0x100
998c2ecf20Sopenharmony_ci#define PCIX0_MSGIH		0x104
1008c2ecf20Sopenharmony_ci#define PCIX0_MSGOL		0x108
1018c2ecf20Sopenharmony_ci#define PCIX0_MSGOH		0x10c
1028c2ecf20Sopenharmony_ci#define PCIX0_IM		0x1f8
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_ci/*
1058c2ecf20Sopenharmony_ci * 4xx PCI bridge register definitions
1068c2ecf20Sopenharmony_ci */
1078c2ecf20Sopenharmony_ci#define PCIL0_PMM0LA		0x00
1088c2ecf20Sopenharmony_ci#define PCIL0_PMM0MA		0x04
1098c2ecf20Sopenharmony_ci#define PCIL0_PMM0PCILA		0x08
1108c2ecf20Sopenharmony_ci#define PCIL0_PMM0PCIHA		0x0c
1118c2ecf20Sopenharmony_ci#define PCIL0_PMM1LA		0x10
1128c2ecf20Sopenharmony_ci#define PCIL0_PMM1MA		0x14
1138c2ecf20Sopenharmony_ci#define PCIL0_PMM1PCILA		0x18
1148c2ecf20Sopenharmony_ci#define PCIL0_PMM1PCIHA		0x1c
1158c2ecf20Sopenharmony_ci#define PCIL0_PMM2LA		0x20
1168c2ecf20Sopenharmony_ci#define PCIL0_PMM2MA		0x24
1178c2ecf20Sopenharmony_ci#define PCIL0_PMM2PCILA		0x28
1188c2ecf20Sopenharmony_ci#define PCIL0_PMM2PCIHA		0x2c
1198c2ecf20Sopenharmony_ci#define PCIL0_PTM1MS		0x30
1208c2ecf20Sopenharmony_ci#define PCIL0_PTM1LA		0x34
1218c2ecf20Sopenharmony_ci#define PCIL0_PTM2MS		0x38
1228c2ecf20Sopenharmony_ci#define PCIL0_PTM2LA		0x3c
1238c2ecf20Sopenharmony_ci
1248c2ecf20Sopenharmony_ci/*
1258c2ecf20Sopenharmony_ci * 4xx PCIe bridge register definitions
1268c2ecf20Sopenharmony_ci */
1278c2ecf20Sopenharmony_ci
1288c2ecf20Sopenharmony_ci/* DCR offsets */
1298c2ecf20Sopenharmony_ci#define DCRO_PEGPL_CFGBAH		0x00
1308c2ecf20Sopenharmony_ci#define DCRO_PEGPL_CFGBAL		0x01
1318c2ecf20Sopenharmony_ci#define DCRO_PEGPL_CFGMSK		0x02
1328c2ecf20Sopenharmony_ci#define DCRO_PEGPL_MSGBAH		0x03
1338c2ecf20Sopenharmony_ci#define DCRO_PEGPL_MSGBAL		0x04
1348c2ecf20Sopenharmony_ci#define DCRO_PEGPL_MSGMSK		0x05
1358c2ecf20Sopenharmony_ci#define DCRO_PEGPL_OMR1BAH		0x06
1368c2ecf20Sopenharmony_ci#define DCRO_PEGPL_OMR1BAL		0x07
1378c2ecf20Sopenharmony_ci#define DCRO_PEGPL_OMR1MSKH		0x08
1388c2ecf20Sopenharmony_ci#define DCRO_PEGPL_OMR1MSKL		0x09
1398c2ecf20Sopenharmony_ci#define DCRO_PEGPL_OMR2BAH		0x0a
1408c2ecf20Sopenharmony_ci#define DCRO_PEGPL_OMR2BAL		0x0b
1418c2ecf20Sopenharmony_ci#define DCRO_PEGPL_OMR2MSKH		0x0c
1428c2ecf20Sopenharmony_ci#define DCRO_PEGPL_OMR2MSKL		0x0d
1438c2ecf20Sopenharmony_ci#define DCRO_PEGPL_OMR3BAH		0x0e
1448c2ecf20Sopenharmony_ci#define DCRO_PEGPL_OMR3BAL		0x0f
1458c2ecf20Sopenharmony_ci#define DCRO_PEGPL_OMR3MSKH		0x10
1468c2ecf20Sopenharmony_ci#define DCRO_PEGPL_OMR3MSKL		0x11
1478c2ecf20Sopenharmony_ci#define DCRO_PEGPL_REGBAH		0x12
1488c2ecf20Sopenharmony_ci#define DCRO_PEGPL_REGBAL		0x13
1498c2ecf20Sopenharmony_ci#define DCRO_PEGPL_REGMSK		0x14
1508c2ecf20Sopenharmony_ci#define DCRO_PEGPL_SPECIAL		0x15
1518c2ecf20Sopenharmony_ci#define DCRO_PEGPL_CFG			0x16
1528c2ecf20Sopenharmony_ci#define DCRO_PEGPL_ESR			0x17
1538c2ecf20Sopenharmony_ci#define DCRO_PEGPL_EARH			0x18
1548c2ecf20Sopenharmony_ci#define DCRO_PEGPL_EARL			0x19
1558c2ecf20Sopenharmony_ci#define DCRO_PEGPL_EATR			0x1a
1568c2ecf20Sopenharmony_ci
1578c2ecf20Sopenharmony_ci/* DMER mask */
1588c2ecf20Sopenharmony_ci#define GPL_DMER_MASK_DISA	0x02000000
1598c2ecf20Sopenharmony_ci
1608c2ecf20Sopenharmony_ci/*
1618c2ecf20Sopenharmony_ci * System DCRs (SDRs)
1628c2ecf20Sopenharmony_ci */
1638c2ecf20Sopenharmony_ci#define PESDR0_PLLLCT1			0x03a0
1648c2ecf20Sopenharmony_ci#define PESDR0_PLLLCT2			0x03a1
1658c2ecf20Sopenharmony_ci#define PESDR0_PLLLCT3			0x03a2
1668c2ecf20Sopenharmony_ci
1678c2ecf20Sopenharmony_ci/*
1688c2ecf20Sopenharmony_ci * 440SPe additional DCRs
1698c2ecf20Sopenharmony_ci */
1708c2ecf20Sopenharmony_ci#define PESDR0_440SPE_UTLSET1		0x0300
1718c2ecf20Sopenharmony_ci#define PESDR0_440SPE_UTLSET2		0x0301
1728c2ecf20Sopenharmony_ci#define PESDR0_440SPE_DLPSET		0x0302
1738c2ecf20Sopenharmony_ci#define PESDR0_440SPE_LOOP		0x0303
1748c2ecf20Sopenharmony_ci#define PESDR0_440SPE_RCSSET		0x0304
1758c2ecf20Sopenharmony_ci#define PESDR0_440SPE_RCSSTS		0x0305
1768c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL0SET1		0x0306
1778c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL0SET2		0x0307
1788c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL0STS		0x0308
1798c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL1SET1		0x0309
1808c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL1SET2		0x030a
1818c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL1STS		0x030b
1828c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL2SET1		0x030c
1838c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL2SET2		0x030d
1848c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL2STS		0x030e
1858c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL3SET1		0x030f
1868c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL3SET2		0x0310
1878c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL3STS		0x0311
1888c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL4SET1		0x0312
1898c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL4SET2		0x0313
1908c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL4STS	       	0x0314
1918c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL5SET1		0x0315
1928c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL5SET2		0x0316
1938c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL5STS		0x0317
1948c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL6SET1		0x0318
1958c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL6SET2		0x0319
1968c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL6STS		0x031a
1978c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL7SET1		0x031b
1988c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL7SET2		0x031c
1998c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSL7STS		0x031d
2008c2ecf20Sopenharmony_ci#define PESDR0_440SPE_HSSCTLSET		0x031e
2018c2ecf20Sopenharmony_ci#define PESDR0_440SPE_LANE_ABCD		0x031f
2028c2ecf20Sopenharmony_ci#define PESDR0_440SPE_LANE_EFGH		0x0320
2038c2ecf20Sopenharmony_ci
2048c2ecf20Sopenharmony_ci#define PESDR1_440SPE_UTLSET1		0x0340
2058c2ecf20Sopenharmony_ci#define PESDR1_440SPE_UTLSET2		0x0341
2068c2ecf20Sopenharmony_ci#define PESDR1_440SPE_DLPSET		0x0342
2078c2ecf20Sopenharmony_ci#define PESDR1_440SPE_LOOP		0x0343
2088c2ecf20Sopenharmony_ci#define PESDR1_440SPE_RCSSET		0x0344
2098c2ecf20Sopenharmony_ci#define PESDR1_440SPE_RCSSTS		0x0345
2108c2ecf20Sopenharmony_ci#define PESDR1_440SPE_HSSL0SET1		0x0346
2118c2ecf20Sopenharmony_ci#define PESDR1_440SPE_HSSL0SET2		0x0347
2128c2ecf20Sopenharmony_ci#define PESDR1_440SPE_HSSL0STS		0x0348
2138c2ecf20Sopenharmony_ci#define PESDR1_440SPE_HSSL1SET1		0x0349
2148c2ecf20Sopenharmony_ci#define PESDR1_440SPE_HSSL1SET2		0x034a
2158c2ecf20Sopenharmony_ci#define PESDR1_440SPE_HSSL1STS		0x034b
2168c2ecf20Sopenharmony_ci#define PESDR1_440SPE_HSSL2SET1		0x034c
2178c2ecf20Sopenharmony_ci#define PESDR1_440SPE_HSSL2SET2		0x034d
2188c2ecf20Sopenharmony_ci#define PESDR1_440SPE_HSSL2STS		0x034e
2198c2ecf20Sopenharmony_ci#define PESDR1_440SPE_HSSL3SET1		0x034f
2208c2ecf20Sopenharmony_ci#define PESDR1_440SPE_HSSL3SET2		0x0350
2218c2ecf20Sopenharmony_ci#define PESDR1_440SPE_HSSL3STS		0x0351
2228c2ecf20Sopenharmony_ci#define PESDR1_440SPE_HSSCTLSET		0x0352
2238c2ecf20Sopenharmony_ci#define PESDR1_440SPE_LANE_ABCD		0x0353
2248c2ecf20Sopenharmony_ci
2258c2ecf20Sopenharmony_ci#define PESDR2_440SPE_UTLSET1		0x0370
2268c2ecf20Sopenharmony_ci#define PESDR2_440SPE_UTLSET2		0x0371
2278c2ecf20Sopenharmony_ci#define PESDR2_440SPE_DLPSET		0x0372
2288c2ecf20Sopenharmony_ci#define PESDR2_440SPE_LOOP		0x0373
2298c2ecf20Sopenharmony_ci#define PESDR2_440SPE_RCSSET		0x0374
2308c2ecf20Sopenharmony_ci#define PESDR2_440SPE_RCSSTS		0x0375
2318c2ecf20Sopenharmony_ci#define PESDR2_440SPE_HSSL0SET1		0x0376
2328c2ecf20Sopenharmony_ci#define PESDR2_440SPE_HSSL0SET2		0x0377
2338c2ecf20Sopenharmony_ci#define PESDR2_440SPE_HSSL0STS		0x0378
2348c2ecf20Sopenharmony_ci#define PESDR2_440SPE_HSSL1SET1		0x0379
2358c2ecf20Sopenharmony_ci#define PESDR2_440SPE_HSSL1SET2		0x037a
2368c2ecf20Sopenharmony_ci#define PESDR2_440SPE_HSSL1STS		0x037b
2378c2ecf20Sopenharmony_ci#define PESDR2_440SPE_HSSL2SET1		0x037c
2388c2ecf20Sopenharmony_ci#define PESDR2_440SPE_HSSL2SET2		0x037d
2398c2ecf20Sopenharmony_ci#define PESDR2_440SPE_HSSL2STS		0x037e
2408c2ecf20Sopenharmony_ci#define PESDR2_440SPE_HSSL3SET1		0x037f
2418c2ecf20Sopenharmony_ci#define PESDR2_440SPE_HSSL3SET2		0x0380
2428c2ecf20Sopenharmony_ci#define PESDR2_440SPE_HSSL3STS		0x0381
2438c2ecf20Sopenharmony_ci#define PESDR2_440SPE_HSSCTLSET		0x0382
2448c2ecf20Sopenharmony_ci#define PESDR2_440SPE_LANE_ABCD		0x0383
2458c2ecf20Sopenharmony_ci
2468c2ecf20Sopenharmony_ci/*
2478c2ecf20Sopenharmony_ci * 405EX additional DCRs
2488c2ecf20Sopenharmony_ci */
2498c2ecf20Sopenharmony_ci#define PESDR0_405EX_UTLSET1		0x0400
2508c2ecf20Sopenharmony_ci#define PESDR0_405EX_UTLSET2		0x0401
2518c2ecf20Sopenharmony_ci#define PESDR0_405EX_DLPSET		0x0402
2528c2ecf20Sopenharmony_ci#define PESDR0_405EX_LOOP		0x0403
2538c2ecf20Sopenharmony_ci#define PESDR0_405EX_RCSSET		0x0404
2548c2ecf20Sopenharmony_ci#define PESDR0_405EX_RCSSTS		0x0405
2558c2ecf20Sopenharmony_ci#define PESDR0_405EX_PHYSET1		0x0406
2568c2ecf20Sopenharmony_ci#define PESDR0_405EX_PHYSET2		0x0407
2578c2ecf20Sopenharmony_ci#define PESDR0_405EX_BIST		0x0408
2588c2ecf20Sopenharmony_ci#define PESDR0_405EX_LPB		0x040B
2598c2ecf20Sopenharmony_ci#define PESDR0_405EX_PHYSTA		0x040C
2608c2ecf20Sopenharmony_ci
2618c2ecf20Sopenharmony_ci#define PESDR1_405EX_UTLSET1		0x0440
2628c2ecf20Sopenharmony_ci#define PESDR1_405EX_UTLSET2		0x0441
2638c2ecf20Sopenharmony_ci#define PESDR1_405EX_DLPSET		0x0442
2648c2ecf20Sopenharmony_ci#define PESDR1_405EX_LOOP		0x0443
2658c2ecf20Sopenharmony_ci#define PESDR1_405EX_RCSSET		0x0444
2668c2ecf20Sopenharmony_ci#define PESDR1_405EX_RCSSTS		0x0445
2678c2ecf20Sopenharmony_ci#define PESDR1_405EX_PHYSET1		0x0446
2688c2ecf20Sopenharmony_ci#define PESDR1_405EX_PHYSET2		0x0447
2698c2ecf20Sopenharmony_ci#define PESDR1_405EX_BIST		0x0448
2708c2ecf20Sopenharmony_ci#define PESDR1_405EX_LPB		0x044B
2718c2ecf20Sopenharmony_ci#define PESDR1_405EX_PHYSTA		0x044C
2728c2ecf20Sopenharmony_ci
2738c2ecf20Sopenharmony_ci/*
2748c2ecf20Sopenharmony_ci * 460EX additional DCRs
2758c2ecf20Sopenharmony_ci */
2768c2ecf20Sopenharmony_ci#define PESDR0_460EX_L0BIST		0x0308
2778c2ecf20Sopenharmony_ci#define PESDR0_460EX_L0BISTSTS		0x0309
2788c2ecf20Sopenharmony_ci#define PESDR0_460EX_L0CDRCTL		0x030A
2798c2ecf20Sopenharmony_ci#define PESDR0_460EX_L0DRV		0x030B
2808c2ecf20Sopenharmony_ci#define PESDR0_460EX_L0REC		0x030C
2818c2ecf20Sopenharmony_ci#define PESDR0_460EX_L0LPB		0x030D
2828c2ecf20Sopenharmony_ci#define PESDR0_460EX_L0CLK		0x030E
2838c2ecf20Sopenharmony_ci#define PESDR0_460EX_PHY_CTL_RST	0x030F
2848c2ecf20Sopenharmony_ci#define PESDR0_460EX_RSTSTA		0x0310
2858c2ecf20Sopenharmony_ci#define PESDR0_460EX_OBS		0x0311
2868c2ecf20Sopenharmony_ci#define PESDR0_460EX_L0ERRC		0x0320
2878c2ecf20Sopenharmony_ci
2888c2ecf20Sopenharmony_ci#define PESDR1_460EX_L0BIST		0x0348
2898c2ecf20Sopenharmony_ci#define PESDR1_460EX_L1BIST		0x0349
2908c2ecf20Sopenharmony_ci#define PESDR1_460EX_L2BIST		0x034A
2918c2ecf20Sopenharmony_ci#define PESDR1_460EX_L3BIST		0x034B
2928c2ecf20Sopenharmony_ci#define PESDR1_460EX_L0BISTSTS		0x034C
2938c2ecf20Sopenharmony_ci#define PESDR1_460EX_L1BISTSTS		0x034D
2948c2ecf20Sopenharmony_ci#define PESDR1_460EX_L2BISTSTS		0x034E
2958c2ecf20Sopenharmony_ci#define PESDR1_460EX_L3BISTSTS		0x034F
2968c2ecf20Sopenharmony_ci#define PESDR1_460EX_L0CDRCTL		0x0350
2978c2ecf20Sopenharmony_ci#define PESDR1_460EX_L1CDRCTL		0x0351
2988c2ecf20Sopenharmony_ci#define PESDR1_460EX_L2CDRCTL		0x0352
2998c2ecf20Sopenharmony_ci#define PESDR1_460EX_L3CDRCTL		0x0353
3008c2ecf20Sopenharmony_ci#define PESDR1_460EX_L0DRV		0x0354
3018c2ecf20Sopenharmony_ci#define PESDR1_460EX_L1DRV		0x0355
3028c2ecf20Sopenharmony_ci#define PESDR1_460EX_L2DRV		0x0356
3038c2ecf20Sopenharmony_ci#define PESDR1_460EX_L3DRV		0x0357
3048c2ecf20Sopenharmony_ci#define PESDR1_460EX_L0REC		0x0358
3058c2ecf20Sopenharmony_ci#define PESDR1_460EX_L1REC		0x0359
3068c2ecf20Sopenharmony_ci#define PESDR1_460EX_L2REC		0x035A
3078c2ecf20Sopenharmony_ci#define PESDR1_460EX_L3REC		0x035B
3088c2ecf20Sopenharmony_ci#define PESDR1_460EX_L0LPB		0x035C
3098c2ecf20Sopenharmony_ci#define PESDR1_460EX_L1LPB		0x035D
3108c2ecf20Sopenharmony_ci#define PESDR1_460EX_L2LPB		0x035E
3118c2ecf20Sopenharmony_ci#define PESDR1_460EX_L3LPB		0x035F
3128c2ecf20Sopenharmony_ci#define PESDR1_460EX_L0CLK		0x0360
3138c2ecf20Sopenharmony_ci#define PESDR1_460EX_L1CLK		0x0361
3148c2ecf20Sopenharmony_ci#define PESDR1_460EX_L2CLK		0x0362
3158c2ecf20Sopenharmony_ci#define PESDR1_460EX_L3CLK		0x0363
3168c2ecf20Sopenharmony_ci#define PESDR1_460EX_PHY_CTL_RST	0x0364
3178c2ecf20Sopenharmony_ci#define PESDR1_460EX_RSTSTA		0x0365
3188c2ecf20Sopenharmony_ci#define PESDR1_460EX_OBS		0x0366
3198c2ecf20Sopenharmony_ci#define PESDR1_460EX_L0ERRC		0x0368
3208c2ecf20Sopenharmony_ci#define PESDR1_460EX_L1ERRC		0x0369
3218c2ecf20Sopenharmony_ci#define PESDR1_460EX_L2ERRC		0x036A
3228c2ecf20Sopenharmony_ci#define PESDR1_460EX_L3ERRC		0x036B
3238c2ecf20Sopenharmony_ci#define PESDR0_460EX_IHS1		0x036C
3248c2ecf20Sopenharmony_ci#define PESDR0_460EX_IHS2		0x036D
3258c2ecf20Sopenharmony_ci
3268c2ecf20Sopenharmony_ci/*
3278c2ecf20Sopenharmony_ci * 460SX additional DCRs
3288c2ecf20Sopenharmony_ci */
3298c2ecf20Sopenharmony_ci#define PESDRn_460SX_RCEI		0x02
3308c2ecf20Sopenharmony_ci
3318c2ecf20Sopenharmony_ci#define PESDR0_460SX_HSSL0DAMP		0x320
3328c2ecf20Sopenharmony_ci#define PESDR0_460SX_HSSL1DAMP		0x321
3338c2ecf20Sopenharmony_ci#define PESDR0_460SX_HSSL2DAMP		0x322
3348c2ecf20Sopenharmony_ci#define PESDR0_460SX_HSSL3DAMP		0x323
3358c2ecf20Sopenharmony_ci#define PESDR0_460SX_HSSL4DAMP		0x324
3368c2ecf20Sopenharmony_ci#define PESDR0_460SX_HSSL5DAMP		0x325
3378c2ecf20Sopenharmony_ci#define PESDR0_460SX_HSSL6DAMP		0x326
3388c2ecf20Sopenharmony_ci#define PESDR0_460SX_HSSL7DAMP		0x327
3398c2ecf20Sopenharmony_ci
3408c2ecf20Sopenharmony_ci#define PESDR1_460SX_HSSL0DAMP		0x354
3418c2ecf20Sopenharmony_ci#define PESDR1_460SX_HSSL1DAMP		0x355
3428c2ecf20Sopenharmony_ci#define PESDR1_460SX_HSSL2DAMP		0x356
3438c2ecf20Sopenharmony_ci#define PESDR1_460SX_HSSL3DAMP		0x357
3448c2ecf20Sopenharmony_ci
3458c2ecf20Sopenharmony_ci#define PESDR2_460SX_HSSL0DAMP		0x384
3468c2ecf20Sopenharmony_ci#define PESDR2_460SX_HSSL1DAMP		0x385
3478c2ecf20Sopenharmony_ci#define PESDR2_460SX_HSSL2DAMP		0x386
3488c2ecf20Sopenharmony_ci#define PESDR2_460SX_HSSL3DAMP		0x387
3498c2ecf20Sopenharmony_ci
3508c2ecf20Sopenharmony_ci#define PESDR0_460SX_HSSL0COEFA		0x328
3518c2ecf20Sopenharmony_ci#define PESDR0_460SX_HSSL1COEFA		0x329
3528c2ecf20Sopenharmony_ci#define PESDR0_460SX_HSSL2COEFA		0x32A
3538c2ecf20Sopenharmony_ci#define PESDR0_460SX_HSSL3COEFA		0x32B
3548c2ecf20Sopenharmony_ci#define PESDR0_460SX_HSSL4COEFA		0x32C
3558c2ecf20Sopenharmony_ci#define PESDR0_460SX_HSSL5COEFA		0x32D
3568c2ecf20Sopenharmony_ci#define PESDR0_460SX_HSSL6COEFA		0x32E
3578c2ecf20Sopenharmony_ci#define PESDR0_460SX_HSSL7COEFA		0x32F
3588c2ecf20Sopenharmony_ci
3598c2ecf20Sopenharmony_ci#define PESDR1_460SX_HSSL0COEFA		0x358
3608c2ecf20Sopenharmony_ci#define PESDR1_460SX_HSSL1COEFA		0x359
3618c2ecf20Sopenharmony_ci#define PESDR1_460SX_HSSL2COEFA		0x35A
3628c2ecf20Sopenharmony_ci#define PESDR1_460SX_HSSL3COEFA		0x35B
3638c2ecf20Sopenharmony_ci
3648c2ecf20Sopenharmony_ci#define PESDR2_460SX_HSSL0COEFA		0x388
3658c2ecf20Sopenharmony_ci#define PESDR2_460SX_HSSL1COEFA		0x389
3668c2ecf20Sopenharmony_ci#define PESDR2_460SX_HSSL2COEFA		0x38A
3678c2ecf20Sopenharmony_ci#define PESDR2_460SX_HSSL3COEFA		0x38B
3688c2ecf20Sopenharmony_ci
3698c2ecf20Sopenharmony_ci#define PESDR0_460SX_HSSL1CALDRV	0x339
3708c2ecf20Sopenharmony_ci#define PESDR1_460SX_HSSL1CALDRV	0x361
3718c2ecf20Sopenharmony_ci#define PESDR2_460SX_HSSL1CALDRV	0x391
3728c2ecf20Sopenharmony_ci
3738c2ecf20Sopenharmony_ci#define PESDR0_460SX_HSSSLEW		0x338
3748c2ecf20Sopenharmony_ci#define PESDR1_460SX_HSSSLEW		0x360
3758c2ecf20Sopenharmony_ci#define PESDR2_460SX_HSSSLEW		0x390
3768c2ecf20Sopenharmony_ci
3778c2ecf20Sopenharmony_ci#define PESDR0_460SX_HSSCTLSET		0x31E
3788c2ecf20Sopenharmony_ci#define PESDR1_460SX_HSSCTLSET		0x352
3798c2ecf20Sopenharmony_ci#define PESDR2_460SX_HSSCTLSET		0x382
3808c2ecf20Sopenharmony_ci
3818c2ecf20Sopenharmony_ci#define PESDR0_460SX_RCSSET		0x304
3828c2ecf20Sopenharmony_ci#define PESDR1_460SX_RCSSET		0x344
3838c2ecf20Sopenharmony_ci#define PESDR2_460SX_RCSSET		0x374
3848c2ecf20Sopenharmony_ci/*
3858c2ecf20Sopenharmony_ci * Of the above, some are common offsets from the base
3868c2ecf20Sopenharmony_ci */
3878c2ecf20Sopenharmony_ci#define PESDRn_UTLSET1			0x00
3888c2ecf20Sopenharmony_ci#define PESDRn_UTLSET2			0x01
3898c2ecf20Sopenharmony_ci#define PESDRn_DLPSET			0x02
3908c2ecf20Sopenharmony_ci#define PESDRn_LOOP			0x03
3918c2ecf20Sopenharmony_ci#define PESDRn_RCSSET			0x04
3928c2ecf20Sopenharmony_ci#define PESDRn_RCSSTS			0x05
3938c2ecf20Sopenharmony_ci
3948c2ecf20Sopenharmony_ci/* 440spe only */
3958c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL0SET1		0x06
3968c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL0SET2		0x07
3978c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL0STS		0x08
3988c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL1SET1		0x09
3998c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL1SET2		0x0a
4008c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL1STS		0x0b
4018c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL2SET1		0x0c
4028c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL2SET2		0x0d
4038c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL2STS		0x0e
4048c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL3SET1		0x0f
4058c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL3SET2		0x10
4068c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL3STS		0x11
4078c2ecf20Sopenharmony_ci
4088c2ecf20Sopenharmony_ci/* 440spe port 0 only */
4098c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL4SET1		0x12
4108c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL4SET2		0x13
4118c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL4STS	       	0x14
4128c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL5SET1		0x15
4138c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL5SET2		0x16
4148c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL5STS		0x17
4158c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL6SET1		0x18
4168c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL6SET2		0x19
4178c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL6STS		0x1a
4188c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL7SET1		0x1b
4198c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL7SET2		0x1c
4208c2ecf20Sopenharmony_ci#define PESDRn_440SPE_HSSL7STS		0x1d
4218c2ecf20Sopenharmony_ci
4228c2ecf20Sopenharmony_ci/* 405ex only */
4238c2ecf20Sopenharmony_ci#define PESDRn_405EX_PHYSET1		0x06
4248c2ecf20Sopenharmony_ci#define PESDRn_405EX_PHYSET2		0x07
4258c2ecf20Sopenharmony_ci#define PESDRn_405EX_PHYSTA		0x0c
4268c2ecf20Sopenharmony_ci
4278c2ecf20Sopenharmony_ci/*
4288c2ecf20Sopenharmony_ci * UTL register offsets
4298c2ecf20Sopenharmony_ci */
4308c2ecf20Sopenharmony_ci#define PEUTL_PBCTL		0x00
4318c2ecf20Sopenharmony_ci#define PEUTL_PBBSZ		0x20
4328c2ecf20Sopenharmony_ci#define PEUTL_OPDBSZ		0x68
4338c2ecf20Sopenharmony_ci#define PEUTL_IPHBSZ		0x70
4348c2ecf20Sopenharmony_ci#define PEUTL_IPDBSZ		0x78
4358c2ecf20Sopenharmony_ci#define PEUTL_OUTTR		0x90
4368c2ecf20Sopenharmony_ci#define PEUTL_INTR		0x98
4378c2ecf20Sopenharmony_ci#define PEUTL_PCTL		0xa0
4388c2ecf20Sopenharmony_ci#define PEUTL_RCSTA		0xB0
4398c2ecf20Sopenharmony_ci#define PEUTL_RCIRQEN		0xb8
4408c2ecf20Sopenharmony_ci
4418c2ecf20Sopenharmony_ci/*
4428c2ecf20Sopenharmony_ci * Config space register offsets
4438c2ecf20Sopenharmony_ci */
4448c2ecf20Sopenharmony_ci#define PECFG_ECRTCTL		0x074
4458c2ecf20Sopenharmony_ci
4468c2ecf20Sopenharmony_ci#define PECFG_BAR0LMPA		0x210
4478c2ecf20Sopenharmony_ci#define PECFG_BAR0HMPA		0x214
4488c2ecf20Sopenharmony_ci#define PECFG_BAR1MPA		0x218
4498c2ecf20Sopenharmony_ci#define PECFG_BAR2LMPA		0x220
4508c2ecf20Sopenharmony_ci#define PECFG_BAR2HMPA		0x224
4518c2ecf20Sopenharmony_ci
4528c2ecf20Sopenharmony_ci#define PECFG_PIMEN		0x33c
4538c2ecf20Sopenharmony_ci#define PECFG_PIM0LAL		0x340
4548c2ecf20Sopenharmony_ci#define PECFG_PIM0LAH		0x344
4558c2ecf20Sopenharmony_ci#define PECFG_PIM1LAL		0x348
4568c2ecf20Sopenharmony_ci#define PECFG_PIM1LAH		0x34c
4578c2ecf20Sopenharmony_ci#define PECFG_PIM01SAL		0x350
4588c2ecf20Sopenharmony_ci#define PECFG_PIM01SAH		0x354
4598c2ecf20Sopenharmony_ci
4608c2ecf20Sopenharmony_ci#define PECFG_POM0LAL		0x380
4618c2ecf20Sopenharmony_ci#define PECFG_POM0LAH		0x384
4628c2ecf20Sopenharmony_ci#define PECFG_POM1LAL		0x388
4638c2ecf20Sopenharmony_ci#define PECFG_POM1LAH		0x38c
4648c2ecf20Sopenharmony_ci#define PECFG_POM2LAL		0x390
4658c2ecf20Sopenharmony_ci#define PECFG_POM2LAH		0x394
4668c2ecf20Sopenharmony_ci
4678c2ecf20Sopenharmony_ci/* 460sx only */
4688c2ecf20Sopenharmony_ci#define PECFG_460SX_DLLSTA     0x3f8
4698c2ecf20Sopenharmony_ci
4708c2ecf20Sopenharmony_ci/* 460sx Bit Mappings */
4718c2ecf20Sopenharmony_ci#define PECFG_460SX_DLLSTA_LINKUP	 0x00000010
4728c2ecf20Sopenharmony_ci#define DCRO_PEGPL_460SX_OMR1MSKL_UOT	 0x00000004
4738c2ecf20Sopenharmony_ci
4748c2ecf20Sopenharmony_ci/* PEGPL Bit Mappings */
4758c2ecf20Sopenharmony_ci#define DCRO_PEGPL_OMRxMSKL_VAL	 0x00000001
4768c2ecf20Sopenharmony_ci#define DCRO_PEGPL_OMR1MSKL_UOT	 0x00000002
4778c2ecf20Sopenharmony_ci#define DCRO_PEGPL_OMR3MSKL_IO	 0x00000002
4788c2ecf20Sopenharmony_ci
4798c2ecf20Sopenharmony_ci/* 476FPE */
4808c2ecf20Sopenharmony_ci#define PCCFG_LCPA			0x270
4818c2ecf20Sopenharmony_ci#define PECFG_TLDLP			0x3F8
4828c2ecf20Sopenharmony_ci#define PECFG_TLDLP_LNKUP		0x00000008
4838c2ecf20Sopenharmony_ci#define PECFG_TLDLP_PRESENT		0x00000010
4848c2ecf20Sopenharmony_ci#define DCRO_PEGPL_476FPE_OMR1MSKL_UOT	 0x00000004
4858c2ecf20Sopenharmony_ci
4868c2ecf20Sopenharmony_ci/* SDR Bit Mappings */
4878c2ecf20Sopenharmony_ci#define PESDRx_RCSSET_HLDPLB	0x10000000
4888c2ecf20Sopenharmony_ci#define PESDRx_RCSSET_RSTGU	0x01000000
4898c2ecf20Sopenharmony_ci#define PESDRx_RCSSET_RDY       0x00100000
4908c2ecf20Sopenharmony_ci#define PESDRx_RCSSET_RSTDL     0x00010000
4918c2ecf20Sopenharmony_ci#define PESDRx_RCSSET_RSTPYN    0x00001000
4928c2ecf20Sopenharmony_ci
4938c2ecf20Sopenharmony_cienum
4948c2ecf20Sopenharmony_ci{
4958c2ecf20Sopenharmony_ci	PTYPE_ENDPOINT		= 0x0,
4968c2ecf20Sopenharmony_ci	PTYPE_LEGACY_ENDPOINT	= 0x1,
4978c2ecf20Sopenharmony_ci	PTYPE_ROOT_PORT		= 0x4,
4988c2ecf20Sopenharmony_ci
4998c2ecf20Sopenharmony_ci	LNKW_X1			= 0x1,
5008c2ecf20Sopenharmony_ci	LNKW_X4			= 0x4,
5018c2ecf20Sopenharmony_ci	LNKW_X8			= 0x8
5028c2ecf20Sopenharmony_ci};
5038c2ecf20Sopenharmony_ci
5048c2ecf20Sopenharmony_ci
5058c2ecf20Sopenharmony_ci#endif /* __PPC4XX_PCI_H__ */
506