4xx_pcie.c 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067
  1. /*
  2. * (C) Copyright 2006 - 2007
  3. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  4. *
  5. * Copyright (c) 2005 Cisco Systems. All rights reserved.
  6. * Roland Dreier <rolandd@cisco.com>
  7. *
  8. * See file CREDITS for list of people who contributed to this
  9. * project.
  10. *
  11. * This program is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License as
  13. * published by the Free Software Foundation; either version 2 of
  14. * the License, or (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. */
  22. #include <asm/processor.h>
  23. #include <asm-ppc/io.h>
  24. #include <ppc4xx.h>
  25. #include <common.h>
  26. #include <pci.h>
  27. #if defined(CONFIG_440SPE) && defined(CONFIG_PCI)
  28. #include <asm/4xx_pcie.h>
  29. enum {
  30. PTYPE_ENDPOINT = 0x0,
  31. PTYPE_LEGACY_ENDPOINT = 0x1,
  32. PTYPE_ROOT_PORT = 0x4,
  33. LNKW_X1 = 0x1,
  34. LNKW_X4 = 0x4,
  35. LNKW_X8 = 0x8
  36. };
  37. static u8* pcie_get_base(struct pci_controller *hose, unsigned int devfn)
  38. {
  39. u8 *base = (u8*)hose->cfg_data;
  40. /* use local configuration space for the first bus */
  41. if (PCI_BUS(devfn) == 0) {
  42. if (hose->cfg_data == (u8*)CFG_PCIE0_CFGBASE)
  43. base = (u8*)CFG_PCIE0_XCFGBASE;
  44. if (hose->cfg_data == (u8*)CFG_PCIE1_CFGBASE)
  45. base = (u8*)CFG_PCIE1_XCFGBASE;
  46. if (hose->cfg_data == (u8*)CFG_PCIE2_CFGBASE)
  47. base = (u8*)CFG_PCIE2_XCFGBASE;
  48. }
  49. return base;
  50. }
  51. static void pcie_dmer_disable(void)
  52. {
  53. mtdcr (DCRN_PEGPL_CFG(DCRN_PCIE0_BASE),
  54. mfdcr (DCRN_PEGPL_CFG(DCRN_PCIE0_BASE)) | GPL_DMER_MASK_DISA);
  55. mtdcr (DCRN_PEGPL_CFG(DCRN_PCIE1_BASE),
  56. mfdcr (DCRN_PEGPL_CFG(DCRN_PCIE1_BASE)) | GPL_DMER_MASK_DISA);
  57. mtdcr (DCRN_PEGPL_CFG(DCRN_PCIE2_BASE),
  58. mfdcr (DCRN_PEGPL_CFG(DCRN_PCIE2_BASE)) | GPL_DMER_MASK_DISA);
  59. }
  60. static void pcie_dmer_enable(void)
  61. {
  62. mtdcr (DCRN_PEGPL_CFG (DCRN_PCIE0_BASE),
  63. mfdcr (DCRN_PEGPL_CFG(DCRN_PCIE0_BASE)) & ~GPL_DMER_MASK_DISA);
  64. mtdcr (DCRN_PEGPL_CFG (DCRN_PCIE1_BASE),
  65. mfdcr (DCRN_PEGPL_CFG(DCRN_PCIE1_BASE)) & ~GPL_DMER_MASK_DISA);
  66. mtdcr (DCRN_PEGPL_CFG (DCRN_PCIE2_BASE),
  67. mfdcr (DCRN_PEGPL_CFG(DCRN_PCIE2_BASE)) & ~GPL_DMER_MASK_DISA);
  68. }
  69. static int pcie_read_config(struct pci_controller *hose, unsigned int devfn,
  70. int offset, int len, u32 *val) {
  71. u8 *address;
  72. *val = 0;
  73. /*
  74. * Bus numbers are relative to hose->first_busno
  75. */
  76. devfn -= PCI_BDF(hose->first_busno, 0, 0);
  77. /*
  78. * NOTICE: configuration space ranges are currenlty mapped only for
  79. * the first 16 buses, so such limit must be imposed. In case more
  80. * buses are required the TLB settings in board/amcc/<board>/init.S
  81. * need to be altered accordingly (one bus takes 1 MB of memory space).
  82. */
  83. if (PCI_BUS(devfn) >= 16)
  84. return 0;
  85. /*
  86. * Only single device/single function is supported for the primary and
  87. * secondary buses of the 440SPe host bridge.
  88. */
  89. if ((!((PCI_FUNC(devfn) == 0) && (PCI_DEV(devfn) == 0))) &&
  90. ((PCI_BUS(devfn) == 0) || (PCI_BUS(devfn) == 1)))
  91. return 0;
  92. address = pcie_get_base(hose, devfn);
  93. offset += devfn << 4;
  94. /*
  95. * Reading from configuration space of non-existing device can
  96. * generate transaction errors. For the read duration we suppress
  97. * assertion of machine check exceptions to avoid those.
  98. */
  99. pcie_dmer_disable ();
  100. switch (len) {
  101. case 1:
  102. *val = in_8(hose->cfg_data + offset);
  103. break;
  104. case 2:
  105. *val = in_le16((u16 *)(hose->cfg_data + offset));
  106. break;
  107. default:
  108. *val = in_le32((u32*)(hose->cfg_data + offset));
  109. break;
  110. }
  111. pcie_dmer_enable ();
  112. return 0;
  113. }
  114. static int pcie_write_config(struct pci_controller *hose, unsigned int devfn,
  115. int offset, int len, u32 val) {
  116. u8 *address;
  117. /*
  118. * Bus numbers are relative to hose->first_busno
  119. */
  120. devfn -= PCI_BDF(hose->first_busno, 0, 0);
  121. /*
  122. * Same constraints as in pcie_read_config().
  123. */
  124. if (PCI_BUS(devfn) >= 16)
  125. return 0;
  126. if ((!((PCI_FUNC(devfn) == 0) && (PCI_DEV(devfn) == 0))) &&
  127. ((PCI_BUS(devfn) == 0) || (PCI_BUS(devfn) == 1)))
  128. return 0;
  129. address = pcie_get_base(hose, devfn);
  130. offset += devfn << 4;
  131. /*
  132. * Suppress MCK exceptions, similar to pcie_read_config()
  133. */
  134. pcie_dmer_disable ();
  135. switch (len) {
  136. case 1:
  137. out_8(hose->cfg_data + offset, val);
  138. break;
  139. case 2:
  140. out_le16((u16 *)(hose->cfg_data + offset), val);
  141. break;
  142. default:
  143. out_le32((u32 *)(hose->cfg_data + offset), val);
  144. break;
  145. }
  146. pcie_dmer_enable ();
  147. return 0;
  148. }
  149. int pcie_read_config_byte(struct pci_controller *hose,pci_dev_t dev,int offset,u8 *val)
  150. {
  151. u32 v;
  152. int rv;
  153. rv = pcie_read_config(hose, dev, offset, 1, &v);
  154. *val = (u8)v;
  155. return rv;
  156. }
  157. int pcie_read_config_word(struct pci_controller *hose,pci_dev_t dev,int offset,u16 *val)
  158. {
  159. u32 v;
  160. int rv;
  161. rv = pcie_read_config(hose, dev, offset, 2, &v);
  162. *val = (u16)v;
  163. return rv;
  164. }
  165. int pcie_read_config_dword(struct pci_controller *hose,pci_dev_t dev,int offset,u32 *val)
  166. {
  167. u32 v;
  168. int rv;
  169. rv = pcie_read_config(hose, dev, offset, 3, &v);
  170. *val = (u32)v;
  171. return rv;
  172. }
  173. int pcie_write_config_byte(struct pci_controller *hose,pci_dev_t dev,int offset,u8 val)
  174. {
  175. return pcie_write_config(hose,(u32)dev,offset,1,val);
  176. }
  177. int pcie_write_config_word(struct pci_controller *hose,pci_dev_t dev,int offset,u16 val)
  178. {
  179. return pcie_write_config(hose,(u32)dev,offset,2,(u32 )val);
  180. }
  181. int pcie_write_config_dword(struct pci_controller *hose,pci_dev_t dev,int offset,u32 val)
  182. {
  183. return pcie_write_config(hose,(u32)dev,offset,3,(u32 )val);
  184. }
  185. static void ppc440spe_setup_utl(u32 port) {
  186. volatile void *utl_base = NULL;
  187. /*
  188. * Map UTL registers
  189. */
  190. switch (port) {
  191. case 0:
  192. mtdcr(DCRN_PEGPL_REGBAH(PCIE0), 0x0000000c);
  193. mtdcr(DCRN_PEGPL_REGBAL(PCIE0), 0x20000000);
  194. mtdcr(DCRN_PEGPL_REGMSK(PCIE0), 0x00007001);
  195. mtdcr(DCRN_PEGPL_SPECIAL(PCIE0), 0x68782800);
  196. break;
  197. case 1:
  198. mtdcr(DCRN_PEGPL_REGBAH(PCIE1), 0x0000000c);
  199. mtdcr(DCRN_PEGPL_REGBAL(PCIE1), 0x20001000);
  200. mtdcr(DCRN_PEGPL_REGMSK(PCIE1), 0x00007001);
  201. mtdcr(DCRN_PEGPL_SPECIAL(PCIE1), 0x68782800);
  202. break;
  203. case 2:
  204. mtdcr(DCRN_PEGPL_REGBAH(PCIE2), 0x0000000c);
  205. mtdcr(DCRN_PEGPL_REGBAL(PCIE2), 0x20002000);
  206. mtdcr(DCRN_PEGPL_REGMSK(PCIE2), 0x00007001);
  207. mtdcr(DCRN_PEGPL_SPECIAL(PCIE2), 0x68782800);
  208. break;
  209. }
  210. utl_base = (unsigned int *)(CFG_PCIE_BASE + 0x1000 * port);
  211. /*
  212. * Set buffer allocations and then assert VRB and TXE.
  213. */
  214. out_be32(utl_base + PEUTL_OUTTR, 0x08000000);
  215. out_be32(utl_base + PEUTL_INTR, 0x02000000);
  216. out_be32(utl_base + PEUTL_OPDBSZ, 0x10000000);
  217. out_be32(utl_base + PEUTL_PBBSZ, 0x53000000);
  218. out_be32(utl_base + PEUTL_IPHBSZ, 0x08000000);
  219. out_be32(utl_base + PEUTL_IPDBSZ, 0x10000000);
  220. out_be32(utl_base + PEUTL_RCIRQEN, 0x00f00000);
  221. out_be32(utl_base + PEUTL_PCTL, 0x80800066);
  222. }
  223. static int check_error(void)
  224. {
  225. u32 valPE0, valPE1, valPE2;
  226. int err = 0;
  227. /* SDR0_PEGPLLLCT1 reset */
  228. if (!(valPE0 = SDR_READ(PESDR0_PLLLCT1) & 0x01000000)) {
  229. printf("PCIE: SDR0_PEGPLLLCT1 reset error 0x%x\n", valPE0);
  230. }
  231. valPE0 = SDR_READ(PESDR0_RCSSET);
  232. valPE1 = SDR_READ(PESDR1_RCSSET);
  233. valPE2 = SDR_READ(PESDR2_RCSSET);
  234. /* SDR0_PExRCSSET rstgu */
  235. if (!(valPE0 & 0x01000000) ||
  236. !(valPE1 & 0x01000000) ||
  237. !(valPE2 & 0x01000000)) {
  238. printf("PCIE: SDR0_PExRCSSET rstgu error\n");
  239. err = -1;
  240. }
  241. /* SDR0_PExRCSSET rstdl */
  242. if (!(valPE0 & 0x00010000) ||
  243. !(valPE1 & 0x00010000) ||
  244. !(valPE2 & 0x00010000)) {
  245. printf("PCIE: SDR0_PExRCSSET rstdl error\n");
  246. err = -1;
  247. }
  248. /* SDR0_PExRCSSET rstpyn */
  249. if ((valPE0 & 0x00001000) ||
  250. (valPE1 & 0x00001000) ||
  251. (valPE2 & 0x00001000)) {
  252. printf("PCIE: SDR0_PExRCSSET rstpyn error\n");
  253. err = -1;
  254. }
  255. /* SDR0_PExRCSSET hldplb */
  256. if ((valPE0 & 0x10000000) ||
  257. (valPE1 & 0x10000000) ||
  258. (valPE2 & 0x10000000)) {
  259. printf("PCIE: SDR0_PExRCSSET hldplb error\n");
  260. err = -1;
  261. }
  262. /* SDR0_PExRCSSET rdy */
  263. if ((valPE0 & 0x00100000) ||
  264. (valPE1 & 0x00100000) ||
  265. (valPE2 & 0x00100000)) {
  266. printf("PCIE: SDR0_PExRCSSET rdy error\n");
  267. err = -1;
  268. }
  269. /* SDR0_PExRCSSET shutdown */
  270. if ((valPE0 & 0x00000100) ||
  271. (valPE1 & 0x00000100) ||
  272. (valPE2 & 0x00000100)) {
  273. printf("PCIE: SDR0_PExRCSSET shutdown error\n");
  274. err = -1;
  275. }
  276. return err;
  277. }
  278. /*
  279. * Initialize PCI Express core
  280. */
  281. int ppc440spe_init_pcie(void)
  282. {
  283. int time_out = 20;
  284. /* Set PLL clock receiver to LVPECL */
  285. SDR_WRITE(PESDR0_PLLLCT1, SDR_READ(PESDR0_PLLLCT1) | 1 << 28);
  286. if (check_error())
  287. return -1;
  288. if (!(SDR_READ(PESDR0_PLLLCT2) & 0x10000))
  289. {
  290. printf("PCIE: PESDR_PLLCT2 resistance calibration failed (0x%08x)\n",
  291. SDR_READ(PESDR0_PLLLCT2));
  292. return -1;
  293. }
  294. /* De-assert reset of PCIe PLL, wait for lock */
  295. SDR_WRITE(PESDR0_PLLLCT1, SDR_READ(PESDR0_PLLLCT1) & ~(1 << 24));
  296. udelay(3);
  297. while (time_out) {
  298. if (!(SDR_READ(PESDR0_PLLLCT3) & 0x10000000)) {
  299. time_out--;
  300. udelay(1);
  301. } else
  302. break;
  303. }
  304. if (!time_out) {
  305. printf("PCIE: VCO output not locked\n");
  306. return -1;
  307. }
  308. return 0;
  309. }
  310. /*
  311. * Yucca board as End point and root point setup
  312. * and
  313. * testing inbound and out bound windows
  314. *
  315. * YUCCA board can be plugged into another yucca board or you can get PCI-E
  316. * cable which can be used to setup loop back from one port to another port.
  317. * Please rememeber that unless there is a endpoint plugged in to root port it
  318. * will not initialize. It is the same in case of endpoint , unless there is
  319. * root port attached it will not initialize.
  320. *
  321. * In this release of software all the PCI-E ports are configured as either
  322. * endpoint or rootpoint.In future we will have support for selective ports
  323. * setup as endpoint and root point in single board.
  324. *
  325. * Once your board came up as root point , you can verify by reading
  326. * /proc/bus/pci/devices. Where you can see the configuration registers
  327. * of end point device attached to the port.
  328. *
  329. * Enpoint cofiguration can be verified by connecting Yucca board to any
  330. * host or another yucca board. Then try to scan the device. In case of
  331. * linux use "lspci" or appripriate os command.
  332. *
  333. * How do I verify the inbound and out bound windows ?(yucca to yucca)
  334. * in this configuration inbound and outbound windows are setup to access
  335. * sram memroy area. SRAM is at 0x4 0000 0000 , on PLB bus. This address
  336. * is mapped at 0x90000000. From u-boot prompt write data 0xb000 0000,
  337. * This is waere your POM(PLB out bound memory window) mapped. then
  338. * read the data from other yucca board's u-boot prompt at address
  339. * 0x9000 0000(SRAM). Data should match.
  340. * In case of inbound , write data to u-boot command prompt at 0xb000 0000
  341. * which is mapped to 0x4 0000 0000. Now on rootpoint yucca u-boot prompt check
  342. * data at 0x9000 0000(SRAM).Data should match.
  343. */
  344. int ppc440spe_init_pcie_rootport(int port)
  345. {
  346. static int core_init;
  347. volatile u32 val = 0;
  348. int attempts;
  349. if (!core_init) {
  350. ++core_init;
  351. if (ppc440spe_init_pcie())
  352. return -1;
  353. }
  354. /*
  355. * Initialize various parts of the PCI Express core for our port:
  356. *
  357. * - Set as a root port and enable max width
  358. * (PXIE0 -> X8, PCIE1 and PCIE2 -> X4).
  359. * - Set up UTL configuration.
  360. * - Increase SERDES drive strength to levels suggested by AMCC.
  361. * - De-assert RSTPYN, RSTDL and RSTGU.
  362. *
  363. * NOTICE for revB chip: PESDRn_UTLSET2 is not set - we leave it with
  364. * default setting 0x11310000. The register has new fields,
  365. * PESDRn_UTLSET2[LKINE] in particular: clearing it leads to PCIE core
  366. * hang.
  367. */
  368. switch (port) {
  369. case 0:
  370. SDR_WRITE(PESDR0_DLPSET, 1 << 24 | PTYPE_ROOT_PORT << 20 | LNKW_X8 << 12);
  371. SDR_WRITE(PESDR0_UTLSET1, 0x21222222);
  372. if (!ppc440spe_revB())
  373. SDR_WRITE(PESDR0_UTLSET2, 0x11000000);
  374. SDR_WRITE(PESDR0_HSSL0SET1, 0x35000000);
  375. SDR_WRITE(PESDR0_HSSL1SET1, 0x35000000);
  376. SDR_WRITE(PESDR0_HSSL2SET1, 0x35000000);
  377. SDR_WRITE(PESDR0_HSSL3SET1, 0x35000000);
  378. SDR_WRITE(PESDR0_HSSL4SET1, 0x35000000);
  379. SDR_WRITE(PESDR0_HSSL5SET1, 0x35000000);
  380. SDR_WRITE(PESDR0_HSSL6SET1, 0x35000000);
  381. SDR_WRITE(PESDR0_HSSL7SET1, 0x35000000);
  382. SDR_WRITE(PESDR0_RCSSET,
  383. (SDR_READ(PESDR0_RCSSET) & ~(1 << 24 | 1 << 16)) | 1 << 12);
  384. break;
  385. case 1:
  386. SDR_WRITE(PESDR1_DLPSET, 1 << 24 | PTYPE_ROOT_PORT << 20 | LNKW_X4 << 12);
  387. SDR_WRITE(PESDR1_UTLSET1, 0x21222222);
  388. if (!ppc440spe_revB())
  389. SDR_WRITE(PESDR1_UTLSET2, 0x11000000);
  390. SDR_WRITE(PESDR1_HSSL0SET1, 0x35000000);
  391. SDR_WRITE(PESDR1_HSSL1SET1, 0x35000000);
  392. SDR_WRITE(PESDR1_HSSL2SET1, 0x35000000);
  393. SDR_WRITE(PESDR1_HSSL3SET1, 0x35000000);
  394. SDR_WRITE(PESDR1_RCSSET,
  395. (SDR_READ(PESDR1_RCSSET) & ~(1 << 24 | 1 << 16)) | 1 << 12);
  396. break;
  397. case 2:
  398. SDR_WRITE(PESDR2_DLPSET, 1 << 24 | PTYPE_ROOT_PORT << 20 | LNKW_X4 << 12);
  399. SDR_WRITE(PESDR2_UTLSET1, 0x21222222);
  400. if (!ppc440spe_revB())
  401. SDR_WRITE(PESDR2_UTLSET2, 0x11000000);
  402. SDR_WRITE(PESDR2_HSSL0SET1, 0x35000000);
  403. SDR_WRITE(PESDR2_HSSL1SET1, 0x35000000);
  404. SDR_WRITE(PESDR2_HSSL2SET1, 0x35000000);
  405. SDR_WRITE(PESDR2_HSSL3SET1, 0x35000000);
  406. SDR_WRITE(PESDR2_RCSSET,
  407. (SDR_READ(PESDR2_RCSSET) & ~(1 << 24 | 1 << 16)) | 1 << 12);
  408. break;
  409. }
  410. /*
  411. * Notice: the following delay has critical impact on device
  412. * initialization - if too short (<50ms) the link doesn't get up.
  413. */
  414. mdelay(100);
  415. switch (port) {
  416. case 0:
  417. val = SDR_READ(PESDR0_RCSSTS);
  418. break;
  419. case 1:
  420. val = SDR_READ(PESDR1_RCSSTS);
  421. break;
  422. case 2:
  423. val = SDR_READ(PESDR2_RCSSTS);
  424. break;
  425. }
  426. if (val & (1 << 20)) {
  427. printf("PCIE%d: PGRST failed %08x\n", port, val);
  428. return -1;
  429. }
  430. /*
  431. * Verify link is up
  432. */
  433. val = 0;
  434. switch (port) {
  435. case 0:
  436. val = SDR_READ(PESDR0_LOOP);
  437. break;
  438. case 1:
  439. val = SDR_READ(PESDR1_LOOP);
  440. break;
  441. case 2:
  442. val = SDR_READ(PESDR2_LOOP);
  443. break;
  444. }
  445. if (!(val & 0x00001000)) {
  446. printf("PCIE%d: link is not up.\n", port);
  447. return -1;
  448. }
  449. /*
  450. * Setup UTL registers - but only on revA!
  451. * We use default settings for revB chip.
  452. */
  453. if (!ppc440spe_revB())
  454. ppc440spe_setup_utl(port);
  455. /*
  456. * We map PCI Express configuration access into the 512MB regions
  457. *
  458. * NOTICE: revB is very strict about PLB real addressess and ranges to
  459. * be mapped for config space; it seems to only work with d_nnnn_nnnn
  460. * range (hangs the core upon config transaction attempts when set
  461. * otherwise) while revA uses c_nnnn_nnnn.
  462. *
  463. * For revA:
  464. * PCIE0: 0xc_4000_0000
  465. * PCIE1: 0xc_8000_0000
  466. * PCIE2: 0xc_c000_0000
  467. *
  468. * For revB:
  469. * PCIE0: 0xd_0000_0000
  470. * PCIE1: 0xd_2000_0000
  471. * PCIE2: 0xd_4000_0000
  472. */
  473. switch (port) {
  474. case 0:
  475. if (ppc440spe_revB()) {
  476. mtdcr(DCRN_PEGPL_CFGBAH(PCIE0), 0x0000000d);
  477. mtdcr(DCRN_PEGPL_CFGBAL(PCIE0), 0x00000000);
  478. } else {
  479. /* revA */
  480. mtdcr(DCRN_PEGPL_CFGBAH(PCIE0), 0x0000000c);
  481. mtdcr(DCRN_PEGPL_CFGBAL(PCIE0), 0x40000000);
  482. }
  483. mtdcr(DCRN_PEGPL_CFGMSK(PCIE0), 0xe0000001); /* 512MB region, valid */
  484. break;
  485. case 1:
  486. if (ppc440spe_revB()) {
  487. mtdcr(DCRN_PEGPL_CFGBAH(PCIE1), 0x0000000d);
  488. mtdcr(DCRN_PEGPL_CFGBAL(PCIE1), 0x20000000);
  489. } else {
  490. mtdcr(DCRN_PEGPL_CFGBAH(PCIE1), 0x0000000c);
  491. mtdcr(DCRN_PEGPL_CFGBAL(PCIE1), 0x80000000);
  492. }
  493. mtdcr(DCRN_PEGPL_CFGMSK(PCIE1), 0xe0000001); /* 512MB region, valid */
  494. break;
  495. case 2:
  496. if (ppc440spe_revB()) {
  497. mtdcr(DCRN_PEGPL_CFGBAH(PCIE2), 0x0000000d);
  498. mtdcr(DCRN_PEGPL_CFGBAL(PCIE2), 0x40000000);
  499. } else {
  500. mtdcr(DCRN_PEGPL_CFGBAH(PCIE2), 0x0000000c);
  501. mtdcr(DCRN_PEGPL_CFGBAL(PCIE2), 0xc0000000);
  502. }
  503. mtdcr(DCRN_PEGPL_CFGMSK(PCIE2), 0xe0000001); /* 512MB region, valid */
  504. break;
  505. }
  506. /*
  507. * Check for VC0 active and assert RDY.
  508. */
  509. attempts = 10;
  510. switch (port) {
  511. case 0:
  512. while(!(SDR_READ(PESDR0_RCSSTS) & (1 << 16))) {
  513. if (!(attempts--)) {
  514. printf("PCIE0: VC0 not active\n");
  515. return -1;
  516. }
  517. mdelay(1000);
  518. }
  519. SDR_WRITE(PESDR0_RCSSET, SDR_READ(PESDR0_RCSSET) | 1 << 20);
  520. break;
  521. case 1:
  522. while(!(SDR_READ(PESDR1_RCSSTS) & (1 << 16))) {
  523. if (!(attempts--)) {
  524. printf("PCIE1: VC0 not active\n");
  525. return -1;
  526. }
  527. mdelay(1000);
  528. }
  529. SDR_WRITE(PESDR1_RCSSET, SDR_READ(PESDR1_RCSSET) | 1 << 20);
  530. break;
  531. case 2:
  532. while(!(SDR_READ(PESDR2_RCSSTS) & (1 << 16))) {
  533. if (!(attempts--)) {
  534. printf("PCIE2: VC0 not active\n");
  535. return -1;
  536. }
  537. mdelay(1000);
  538. }
  539. SDR_WRITE(PESDR2_RCSSET, SDR_READ(PESDR2_RCSSET) | 1 << 20);
  540. break;
  541. }
  542. mdelay(100);
  543. return 0;
  544. }
  545. int ppc440spe_init_pcie_endport(int port)
  546. {
  547. static int core_init;
  548. volatile u32 val = 0;
  549. int attempts;
  550. if (!core_init) {
  551. ++core_init;
  552. if (ppc440spe_init_pcie())
  553. return -1;
  554. }
  555. /*
  556. * Initialize various parts of the PCI Express core for our port:
  557. *
  558. * - Set as a end port and enable max width
  559. * (PXIE0 -> X8, PCIE1 and PCIE2 -> X4).
  560. * - Set up UTL configuration.
  561. * - Increase SERDES drive strength to levels suggested by AMCC.
  562. * - De-assert RSTPYN, RSTDL and RSTGU.
  563. *
  564. * NOTICE for revB chip: PESDRn_UTLSET2 is not set - we leave it with
  565. * default setting 0x11310000. The register has new fields,
  566. * PESDRn_UTLSET2[LKINE] in particular: clearing it leads to PCIE core
  567. * hang.
  568. */
  569. switch (port) {
  570. case 0:
  571. SDR_WRITE(PESDR0_DLPSET, 1 << 24 | PTYPE_LEGACY_ENDPOINT << 20 | LNKW_X8 << 12);
  572. SDR_WRITE(PESDR0_UTLSET1, 0x20222222);
  573. if (!ppc440spe_revB())
  574. SDR_WRITE(PESDR0_UTLSET2, 0x11000000);
  575. SDR_WRITE(PESDR0_HSSL0SET1, 0x35000000);
  576. SDR_WRITE(PESDR0_HSSL1SET1, 0x35000000);
  577. SDR_WRITE(PESDR0_HSSL2SET1, 0x35000000);
  578. SDR_WRITE(PESDR0_HSSL3SET1, 0x35000000);
  579. SDR_WRITE(PESDR0_HSSL4SET1, 0x35000000);
  580. SDR_WRITE(PESDR0_HSSL5SET1, 0x35000000);
  581. SDR_WRITE(PESDR0_HSSL6SET1, 0x35000000);
  582. SDR_WRITE(PESDR0_HSSL7SET1, 0x35000000);
  583. SDR_WRITE(PESDR0_RCSSET,
  584. (SDR_READ(PESDR0_RCSSET) & ~(1 << 24 | 1 << 16)) | 1 << 12);
  585. break;
  586. case 1:
  587. SDR_WRITE(PESDR1_DLPSET, 1 << 24 | PTYPE_LEGACY_ENDPOINT << 20 | LNKW_X4 << 12);
  588. SDR_WRITE(PESDR1_UTLSET1, 0x20222222);
  589. if (!ppc440spe_revB())
  590. SDR_WRITE(PESDR1_UTLSET2, 0x11000000);
  591. SDR_WRITE(PESDR1_HSSL0SET1, 0x35000000);
  592. SDR_WRITE(PESDR1_HSSL1SET1, 0x35000000);
  593. SDR_WRITE(PESDR1_HSSL2SET1, 0x35000000);
  594. SDR_WRITE(PESDR1_HSSL3SET1, 0x35000000);
  595. SDR_WRITE(PESDR1_RCSSET,
  596. (SDR_READ(PESDR1_RCSSET) & ~(1 << 24 | 1 << 16)) | 1 << 12);
  597. break;
  598. case 2:
  599. SDR_WRITE(PESDR2_DLPSET, 1 << 24 | PTYPE_LEGACY_ENDPOINT << 20 | LNKW_X4 << 12);
  600. SDR_WRITE(PESDR2_UTLSET1, 0x20222222);
  601. if (!ppc440spe_revB())
  602. SDR_WRITE(PESDR2_UTLSET2, 0x11000000);
  603. SDR_WRITE(PESDR2_HSSL0SET1, 0x35000000);
  604. SDR_WRITE(PESDR2_HSSL1SET1, 0x35000000);
  605. SDR_WRITE(PESDR2_HSSL2SET1, 0x35000000);
  606. SDR_WRITE(PESDR2_HSSL3SET1, 0x35000000);
  607. SDR_WRITE(PESDR2_RCSSET,
  608. (SDR_READ(PESDR2_RCSSET) & ~(1 << 24 | 1 << 16)) | 1 << 12);
  609. break;
  610. }
  611. /*
  612. * Notice: the following delay has critical impact on device
  613. * initialization - if too short (<50ms) the link doesn't get up.
  614. */
  615. mdelay(100);
  616. switch (port) {
  617. case 0: val = SDR_READ(PESDR0_RCSSTS); break;
  618. case 1: val = SDR_READ(PESDR1_RCSSTS); break;
  619. case 2: val = SDR_READ(PESDR2_RCSSTS); break;
  620. }
  621. if (val & (1 << 20)) {
  622. printf("PCIE%d: PGRST failed %08x\n", port, val);
  623. return -1;
  624. }
  625. /*
  626. * Verify link is up
  627. */
  628. val = 0;
  629. switch (port)
  630. {
  631. case 0:
  632. val = SDR_READ(PESDR0_LOOP);
  633. break;
  634. case 1:
  635. val = SDR_READ(PESDR1_LOOP);
  636. break;
  637. case 2:
  638. val = SDR_READ(PESDR2_LOOP);
  639. break;
  640. }
  641. if (!(val & 0x00001000)) {
  642. printf("PCIE%d: link is not up.\n", port);
  643. return -1;
  644. }
  645. /*
  646. * Setup UTL registers - but only on revA!
  647. * We use default settings for revB chip.
  648. */
  649. if (!ppc440spe_revB())
  650. ppc440spe_setup_utl(port);
  651. /*
  652. * We map PCI Express configuration access into the 512MB regions
  653. *
  654. * NOTICE: revB is very strict about PLB real addressess and ranges to
  655. * be mapped for config space; it seems to only work with d_nnnn_nnnn
  656. * range (hangs the core upon config transaction attempts when set
  657. * otherwise) while revA uses c_nnnn_nnnn.
  658. *
  659. * For revA:
  660. * PCIE0: 0xc_4000_0000
  661. * PCIE1: 0xc_8000_0000
  662. * PCIE2: 0xc_c000_0000
  663. *
  664. * For revB:
  665. * PCIE0: 0xd_0000_0000
  666. * PCIE1: 0xd_2000_0000
  667. * PCIE2: 0xd_4000_0000
  668. */
  669. switch (port) {
  670. case 0:
  671. if (ppc440spe_revB()) {
  672. mtdcr(DCRN_PEGPL_CFGBAH(PCIE0), 0x0000000d);
  673. mtdcr(DCRN_PEGPL_CFGBAL(PCIE0), 0x00000000);
  674. } else {
  675. /* revA */
  676. mtdcr(DCRN_PEGPL_CFGBAH(PCIE0), 0x0000000c);
  677. mtdcr(DCRN_PEGPL_CFGBAL(PCIE0), 0x40000000);
  678. }
  679. mtdcr(DCRN_PEGPL_CFGMSK(PCIE0), 0xe0000001); /* 512MB region, valid */
  680. break;
  681. case 1:
  682. if (ppc440spe_revB()) {
  683. mtdcr(DCRN_PEGPL_CFGBAH(PCIE1), 0x0000000d);
  684. mtdcr(DCRN_PEGPL_CFGBAL(PCIE1), 0x20000000);
  685. } else {
  686. mtdcr(DCRN_PEGPL_CFGBAH(PCIE1), 0x0000000c);
  687. mtdcr(DCRN_PEGPL_CFGBAL(PCIE1), 0x80000000);
  688. }
  689. mtdcr(DCRN_PEGPL_CFGMSK(PCIE1), 0xe0000001); /* 512MB region, valid */
  690. break;
  691. case 2:
  692. if (ppc440spe_revB()) {
  693. mtdcr(DCRN_PEGPL_CFGBAH(PCIE2), 0x0000000d);
  694. mtdcr(DCRN_PEGPL_CFGBAL(PCIE2), 0x40000000);
  695. } else {
  696. mtdcr(DCRN_PEGPL_CFGBAH(PCIE2), 0x0000000c);
  697. mtdcr(DCRN_PEGPL_CFGBAL(PCIE2), 0xc0000000);
  698. }
  699. mtdcr(DCRN_PEGPL_CFGMSK(PCIE2), 0xe0000001); /* 512MB region, valid */
  700. break;
  701. }
  702. /*
  703. * Check for VC0 active and assert RDY.
  704. */
  705. attempts = 10;
  706. switch (port) {
  707. case 0:
  708. while(!(SDR_READ(PESDR0_RCSSTS) & (1 << 16))) {
  709. if (!(attempts--)) {
  710. printf("PCIE0: VC0 not active\n");
  711. return -1;
  712. }
  713. mdelay(1000);
  714. }
  715. SDR_WRITE(PESDR0_RCSSET, SDR_READ(PESDR0_RCSSET) | 1 << 20);
  716. break;
  717. case 1:
  718. while(!(SDR_READ(PESDR1_RCSSTS) & (1 << 16))) {
  719. if (!(attempts--)) {
  720. printf("PCIE1: VC0 not active\n");
  721. return -1;
  722. }
  723. mdelay(1000);
  724. }
  725. SDR_WRITE(PESDR1_RCSSET, SDR_READ(PESDR1_RCSSET) | 1 << 20);
  726. break;
  727. case 2:
  728. while(!(SDR_READ(PESDR2_RCSSTS) & (1 << 16))) {
  729. if (!(attempts--)) {
  730. printf("PCIE2: VC0 not active\n");
  731. return -1;
  732. }
  733. mdelay(1000);
  734. }
  735. SDR_WRITE(PESDR2_RCSSET, SDR_READ(PESDR2_RCSSET) | 1 << 20);
  736. break;
  737. }
  738. mdelay(100);
  739. return 0;
  740. }
  741. void ppc440spe_setup_pcie_rootpoint(struct pci_controller *hose, int port)
  742. {
  743. volatile void *mbase = NULL;
  744. volatile void *rmbase = NULL;
  745. pci_set_ops(hose,
  746. pcie_read_config_byte,
  747. pcie_read_config_word,
  748. pcie_read_config_dword,
  749. pcie_write_config_byte,
  750. pcie_write_config_word,
  751. pcie_write_config_dword);
  752. switch (port) {
  753. case 0:
  754. mbase = (u32 *)CFG_PCIE0_XCFGBASE;
  755. rmbase = (u32 *)CFG_PCIE0_CFGBASE;
  756. hose->cfg_data = (u8 *)CFG_PCIE0_CFGBASE;
  757. break;
  758. case 1:
  759. mbase = (u32 *)CFG_PCIE1_XCFGBASE;
  760. rmbase = (u32 *)CFG_PCIE1_CFGBASE;
  761. hose->cfg_data = (u8 *)CFG_PCIE1_CFGBASE;
  762. break;
  763. case 2:
  764. mbase = (u32 *)CFG_PCIE2_XCFGBASE;
  765. rmbase = (u32 *)CFG_PCIE2_CFGBASE;
  766. hose->cfg_data = (u8 *)CFG_PCIE2_CFGBASE;
  767. break;
  768. }
  769. /*
  770. * Set bus numbers on our root port
  771. */
  772. out_8((u8 *)mbase + PCI_PRIMARY_BUS, 0);
  773. out_8((u8 *)mbase + PCI_SECONDARY_BUS, 1);
  774. out_8((u8 *)mbase + PCI_SUBORDINATE_BUS, 1);
  775. /*
  776. * Set up outbound translation to hose->mem_space from PLB
  777. * addresses at an offset of 0xd_0000_0000. We set the low
  778. * bits of the mask to 11 to turn off splitting into 8
  779. * subregions and to enable the outbound translation.
  780. */
  781. out_le32(mbase + PECFG_POM0LAH, 0x00000000);
  782. out_le32(mbase + PECFG_POM0LAL, 0x00000000);
  783. switch (port) {
  784. case 0:
  785. mtdcr(DCRN_PEGPL_OMR1BAH(PCIE0), 0x0000000d);
  786. mtdcr(DCRN_PEGPL_OMR1BAL(PCIE0), CFG_PCIE_MEMBASE +
  787. port * CFG_PCIE_MEMSIZE);
  788. mtdcr(DCRN_PEGPL_OMR1MSKH(PCIE0), 0x7fffffff);
  789. mtdcr(DCRN_PEGPL_OMR1MSKL(PCIE0),
  790. ~(CFG_PCIE_MEMSIZE - 1) | 3);
  791. break;
  792. case 1:
  793. mtdcr(DCRN_PEGPL_OMR1BAH(PCIE1), 0x0000000d);
  794. mtdcr(DCRN_PEGPL_OMR1BAL(PCIE1), (CFG_PCIE_MEMBASE +
  795. port * CFG_PCIE_MEMSIZE));
  796. mtdcr(DCRN_PEGPL_OMR1MSKH(PCIE1), 0x7fffffff);
  797. mtdcr(DCRN_PEGPL_OMR1MSKL(PCIE1),
  798. ~(CFG_PCIE_MEMSIZE - 1) | 3);
  799. break;
  800. case 2:
  801. mtdcr(DCRN_PEGPL_OMR1BAH(PCIE2), 0x0000000d);
  802. mtdcr(DCRN_PEGPL_OMR1BAL(PCIE2), (CFG_PCIE_MEMBASE +
  803. port * CFG_PCIE_MEMSIZE));
  804. mtdcr(DCRN_PEGPL_OMR1MSKH(PCIE2), 0x7fffffff);
  805. mtdcr(DCRN_PEGPL_OMR1MSKL(PCIE2),
  806. ~(CFG_PCIE_MEMSIZE - 1) | 3);
  807. break;
  808. }
  809. /* Set up 16GB inbound memory window at 0 */
  810. out_le32(mbase + PCI_BASE_ADDRESS_0, 0);
  811. out_le32(mbase + PCI_BASE_ADDRESS_1, 0);
  812. out_le32(mbase + PECFG_BAR0HMPA, 0x7fffffc);
  813. out_le32(mbase + PECFG_BAR0LMPA, 0);
  814. out_le32(mbase + PECFG_PIM01SAH, 0xffff0000);
  815. out_le32(mbase + PECFG_PIM01SAL, 0x00000000);
  816. out_le32(mbase + PECFG_PIM0LAL, 0);
  817. out_le32(mbase + PECFG_PIM0LAH, 0);
  818. out_le32(mbase + PECFG_PIM1LAL, 0x00000000);
  819. out_le32(mbase + PECFG_PIM1LAH, 0x00000004);
  820. out_le32(mbase + PECFG_PIMEN, 0x1);
  821. /* Enable I/O, Mem, and Busmaster cycles */
  822. out_le16((u16 *)(mbase + PCI_COMMAND),
  823. in_le16((u16 *)(mbase + PCI_COMMAND)) |
  824. PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
  825. printf("PCIE:%d successfully set as rootpoint\n",port);
  826. /* Set Device and Vendor Id */
  827. switch (port) {
  828. case 0:
  829. out_le16(mbase + 0x200, 0xaaa0);
  830. out_le16(mbase + 0x202, 0xbed0);
  831. break;
  832. case 1:
  833. out_le16(mbase + 0x200, 0xaaa1);
  834. out_le16(mbase + 0x202, 0xbed1);
  835. break;
  836. case 2:
  837. out_le16(mbase + 0x200, 0xaaa2);
  838. out_le16(mbase + 0x202, 0xbed2);
  839. break;
  840. default:
  841. out_le16(mbase + 0x200, 0xaaa3);
  842. out_le16(mbase + 0x202, 0xbed3);
  843. }
  844. /* Set Class Code to PCI-PCI bridge and Revision Id to 1 */
  845. out_le32(mbase + 0x208, 0x06040001);
  846. }
  847. int ppc440spe_setup_pcie_endpoint(struct pci_controller *hose, int port)
  848. {
  849. volatile void *mbase = NULL;
  850. int attempts = 0;
  851. pci_set_ops(hose,
  852. pcie_read_config_byte,
  853. pcie_read_config_word,
  854. pcie_read_config_dword,
  855. pcie_write_config_byte,
  856. pcie_write_config_word,
  857. pcie_write_config_dword);
  858. switch (port) {
  859. case 0:
  860. mbase = (u32 *)CFG_PCIE0_XCFGBASE;
  861. hose->cfg_data = (u8 *)CFG_PCIE0_CFGBASE;
  862. break;
  863. case 1:
  864. mbase = (u32 *)CFG_PCIE1_XCFGBASE;
  865. hose->cfg_data = (u8 *)CFG_PCIE1_CFGBASE;
  866. break;
  867. case 2:
  868. mbase = (u32 *)CFG_PCIE2_XCFGBASE;
  869. hose->cfg_data = (u8 *)CFG_PCIE2_CFGBASE;
  870. break;
  871. }
  872. /*
  873. * Set up outbound translation to hose->mem_space from PLB
  874. * addresses at an offset of 0xd_0000_0000. We set the low
  875. * bits of the mask to 11 to turn off splitting into 8
  876. * subregions and to enable the outbound translation.
  877. */
  878. out_le32(mbase + PECFG_POM0LAH, 0x00001ff8);
  879. out_le32(mbase + PECFG_POM0LAL, 0x00001000);
  880. switch (port) {
  881. case 0:
  882. mtdcr(DCRN_PEGPL_OMR1BAH(PCIE0), 0x0000000d);
  883. mtdcr(DCRN_PEGPL_OMR1BAL(PCIE0), CFG_PCIE_MEMBASE +
  884. port * CFG_PCIE_MEMSIZE);
  885. mtdcr(DCRN_PEGPL_OMR1MSKH(PCIE0), 0x7fffffff);
  886. mtdcr(DCRN_PEGPL_OMR1MSKL(PCIE0),
  887. ~(CFG_PCIE_MEMSIZE - 1) | 3);
  888. break;
  889. case 1:
  890. mtdcr(DCRN_PEGPL_OMR1BAH(PCIE1), 0x0000000d);
  891. mtdcr(DCRN_PEGPL_OMR1BAL(PCIE1), (CFG_PCIE_MEMBASE +
  892. port * CFG_PCIE_MEMSIZE));
  893. mtdcr(DCRN_PEGPL_OMR1MSKH(PCIE1), 0x7fffffff);
  894. mtdcr(DCRN_PEGPL_OMR1MSKL(PCIE1),
  895. ~(CFG_PCIE_MEMSIZE - 1) | 3);
  896. break;
  897. case 2:
  898. mtdcr(DCRN_PEGPL_OMR1BAH(PCIE2), 0x0000000d);
  899. mtdcr(DCRN_PEGPL_OMR1BAL(PCIE2), (CFG_PCIE_MEMBASE +
  900. port * CFG_PCIE_MEMSIZE));
  901. mtdcr(DCRN_PEGPL_OMR1MSKH(PCIE2), 0x7fffffff);
  902. mtdcr(DCRN_PEGPL_OMR1MSKL(PCIE2),
  903. ~(CFG_PCIE_MEMSIZE - 1) | 3);
  904. break;
  905. }
  906. /* Set up 16GB inbound memory window at 0 */
  907. out_le32(mbase + PCI_BASE_ADDRESS_0, 0);
  908. out_le32(mbase + PCI_BASE_ADDRESS_1, 0);
  909. out_le32(mbase + PECFG_BAR0HMPA, 0x7fffffc);
  910. out_le32(mbase + PECFG_BAR0LMPA, 0);
  911. out_le32(mbase + PECFG_PIM0LAL, 0x00000000);
  912. out_le32(mbase + PECFG_PIM0LAH, 0x00000004); /* pointing to SRAM */
  913. out_le32(mbase + PECFG_PIMEN, 0x1);
  914. /* Enable I/O, Mem, and Busmaster cycles */
  915. out_le16((u16 *)(mbase + PCI_COMMAND),
  916. in_le16((u16 *)(mbase + PCI_COMMAND)) |
  917. PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
  918. out_le16(mbase + 0x200,0xcaad); /* Setting vendor ID */
  919. out_le16(mbase + 0x202,0xfeed); /* Setting device ID */
  920. attempts = 10;
  921. switch (port) {
  922. case 0:
  923. while (!(SDR_READ(PESDR0_RCSSTS) & (1 << 8))) {
  924. if (!(attempts--)) {
  925. printf("PCIE0: BMEN is not active\n");
  926. return -1;
  927. }
  928. mdelay(1000);
  929. }
  930. break;
  931. case 1:
  932. while (!(SDR_READ(PESDR1_RCSSTS) & (1 << 8))) {
  933. if (!(attempts--)) {
  934. printf("PCIE1: BMEN is not active\n");
  935. return -1;
  936. }
  937. mdelay(1000);
  938. }
  939. break;
  940. case 2:
  941. while (!(SDR_READ(PESDR2_RCSSTS) & (1 << 8))) {
  942. if (!(attempts--)) {
  943. printf("PCIE2: BMEN is not active\n");
  944. return -1;
  945. }
  946. mdelay(1000);
  947. }
  948. break;
  949. }
  950. printf("PCIE:%d successfully set as endpoint\n",port);
  951. return 0;
  952. }
  953. #endif /* CONFIG_440SPE && CONFIG_PCI */