405gp_pci.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528
  1. /*-----------------------------------------------------------------------------+
  2. *
  3. * This source code has been made available to you by IBM on an AS-IS
  4. * basis. Anyone receiving this source is licensed under IBM
  5. * copyrights to use it in any way he or she deems fit, including
  6. * copying it, modifying it, compiling it, and redistributing it either
  7. * with or without modifications. No license under IBM patents or
  8. * patent applications is to be implied by the copyright license.
  9. *
  10. * Any user of this software should understand that IBM cannot provide
  11. * technical support for this software and will not be responsible for
  12. * any consequences resulting from the use of this software.
  13. *
  14. * Any person who transfers this source code or any derivative work
  15. * must include the IBM copyright notice, this paragraph, and the
  16. * preceding two paragraphs in the transferred software.
  17. *
  18. * COPYRIGHT I B M CORPORATION 1995
  19. * LICENSED MATERIAL - PROGRAM PROPERTY OF I B M
  20. *-----------------------------------------------------------------------------*/
  21. /*----------------------------------------------------------------------------+
  22. *
  23. * File Name: 405gp_pci.c
  24. *
  25. * Function: Initialization code for the 405GP PCI Configuration regs.
  26. *
  27. * Author: Mark Game
  28. *
  29. * Change Activity-
  30. *
  31. * Date Description of Change BY
  32. * --------- --------------------- ---
  33. * 09-Sep-98 Created MCG
  34. * 02-Nov-98 Removed External arbiter selected message JWB
  35. * 27-Nov-98 Zero out PTMBAR2 and disable in PTM2MS JWB
  36. * 04-Jan-99 Zero out other unused PMM and PTM regs. Change bus scan MCG
  37. * from (0 to n) to (1 to n).
  38. * 17-May-99 Port to Walnut JWB
  39. * 17-Jun-99 Updated for VGA support JWB
  40. * 21-Jun-99 Updated to allow SRAM region to be a target from PCI bus JWB
  41. * 19-Jul-99 Updated for 405GP pass 1 errata #26 (Low PCI subsequent MCG
  42. * target latency timer values are not supported).
  43. * Should be fixed in pass 2.
  44. * 09-Sep-99 Removed use of PTM2 since the SRAM region no longer needs JWB
  45. * to be a PCI target. Zero out PTMBAR2 and disable in PTM2MS.
  46. * 10-Dec-99 Updated PCI_Write_CFG_Reg for pass2 errata #6 JWB
  47. * 11-Jan-00 Ensure PMMxMAs disabled before setting PMMxLAs. This is not
  48. * really required after a reset since PMMxMAs are already
  49. * disabled but is a good practice nonetheless. JWB
  50. * 12-Jun-01 stefan.roese@esd-electronics.com
  51. * - PCI host/adapter handling reworked
  52. * 09-Jul-01 stefan.roese@esd-electronics.com
  53. * - PCI host now configures from device 0 (not 1) to max_dev,
  54. * (host configures itself)
  55. * - On CPCI-405 pci base address and size is generated from
  56. * SDRAM and FLASH size (CFG regs not used anymore)
  57. * - Some minor changes for CPCI-405-A (adapter version)
  58. * 14-Sep-01 stefan.roese@esd-electronics.com
  59. * - CONFIG_PCI_SCAN_SHOW added to print pci devices upon startup
  60. * 28-Sep-01 stefan.roese@esd-electronics.com
  61. * - Changed pci master configuration for linux compatibility
  62. * (no need for bios_fixup() anymore)
  63. * 26-Feb-02 stefan.roese@esd-electronics.com
  64. * - Bug fixed in pci configuration (Andrew May)
  65. * - Removed pci class code init for CPCI405 board
  66. * 15-May-02 stefan.roese@esd-electronics.com
  67. * - New vga device handling
  68. * 29-May-02 stefan.roese@esd-electronics.com
  69. * - PCI class code init added (if defined)
  70. *----------------------------------------------------------------------------*/
  71. #include <common.h>
  72. #include <command.h>
  73. #if !defined(CONFIG_440)
  74. #include <405gp_pci.h>
  75. #endif
  76. #include <asm/processor.h>
  77. #include <pci.h>
  78. #if defined(CONFIG_405GP) || defined(CONFIG_405EP)
  79. #ifdef CONFIG_PCI
  80. /*#define DEBUG*/
  81. /*-----------------------------------------------------------------------------+
  82. * pci_init. Initializes the 405GP PCI Configuration regs.
  83. *-----------------------------------------------------------------------------*/
  84. void pci_405gp_init(struct pci_controller *hose)
  85. {
  86. DECLARE_GLOBAL_DATA_PTR;
  87. int i, reg_num = 0;
  88. bd_t *bd = gd->bd;
  89. unsigned short temp_short;
  90. unsigned long ptmpcila[2] = {CFG_PCI_PTM1PCI, CFG_PCI_PTM2PCI};
  91. #if defined(CONFIG_CPCI405) || defined(CONFIG_PMC405)
  92. unsigned long ptmla[2] = {bd->bi_memstart, bd->bi_flashstart};
  93. unsigned long ptmms[2] = {~(bd->bi_memsize - 1) | 1, ~(bd->bi_flashsize - 1) | 1};
  94. #else
  95. unsigned long ptmla[2] = {CFG_PCI_PTM1LA, CFG_PCI_PTM2LA};
  96. unsigned long ptmms[2] = {CFG_PCI_PTM1MS, CFG_PCI_PTM2MS};
  97. #endif
  98. #if defined(CONFIG_PIP405) || defined (CONFIG_MIP405)
  99. unsigned long pmmla[3] = {0x80000000, 0xA0000000, 0};
  100. unsigned long pmmma[3] = {0xE0000001, 0xE0000001, 0};
  101. unsigned long pmmpcila[3] = {0x80000000, 0x00000000, 0};
  102. unsigned long pmmpciha[3] = {0x00000000, 0x00000000, 0};
  103. #else
  104. unsigned long pmmla[3] = {0x80000000, 0,0};
  105. unsigned long pmmma[3] = {0xC0000001, 0,0};
  106. unsigned long pmmpcila[3] = {0x80000000, 0,0};
  107. unsigned long pmmpciha[3] = {0x00000000, 0,0};
  108. #endif
  109. #ifdef CONFIG_PCI_PNP
  110. #if (CONFIG_PCI_HOST == PCI_HOST_AUTO)
  111. char *s;
  112. #endif
  113. #endif
  114. /*
  115. * Register the hose
  116. */
  117. hose->first_busno = 0;
  118. hose->last_busno = 0xff;
  119. /* ISA/PCI I/O space */
  120. pci_set_region(hose->regions + reg_num++,
  121. MIN_PCI_PCI_IOADDR,
  122. MIN_PLB_PCI_IOADDR,
  123. 0x10000,
  124. PCI_REGION_IO);
  125. /* PCI I/O space */
  126. pci_set_region(hose->regions + reg_num++,
  127. 0x00800000,
  128. 0xe8800000,
  129. 0x03800000,
  130. PCI_REGION_IO);
  131. reg_num = 2;
  132. /* Memory spaces */
  133. for (i=0; i<2; i++)
  134. if (ptmms[i] & 1)
  135. {
  136. if (!i) hose->pci_fb = hose->regions + reg_num;
  137. pci_set_region(hose->regions + reg_num++,
  138. ptmpcila[i], ptmla[i],
  139. ~(ptmms[i] & 0xfffff000) + 1,
  140. PCI_REGION_MEM |
  141. PCI_REGION_MEMORY);
  142. }
  143. /* PCI memory spaces */
  144. for (i=0; i<3; i++)
  145. if (pmmma[i] & 1)
  146. {
  147. pci_set_region(hose->regions + reg_num++,
  148. pmmpcila[i], pmmla[i],
  149. ~(pmmma[i] & 0xfffff000) + 1,
  150. PCI_REGION_MEM);
  151. }
  152. hose->region_count = reg_num;
  153. pci_setup_indirect(hose,
  154. PCICFGADR,
  155. PCICFGDATA);
  156. if (hose->pci_fb)
  157. pciauto_region_init(hose->pci_fb);
  158. pci_register_hose(hose);
  159. /*--------------------------------------------------------------------------+
  160. * 405GP PCI Master configuration.
  161. * Map one 512 MB range of PLB/processor addresses to PCI memory space.
  162. * PLB address 0x80000000-0xBFFFFFFF ==> PCI address 0x80000000-0xBFFFFFFF
  163. * Use byte reversed out routines to handle endianess.
  164. *--------------------------------------------------------------------------*/
  165. out32r(PMM0MA, (pmmma[0]&~0x1)); /* disable, configure PMMxLA, PMMxPCILA first */
  166. out32r(PMM0LA, pmmla[0]);
  167. out32r(PMM0PCILA, pmmpcila[0]);
  168. out32r(PMM0PCIHA, pmmpciha[0]);
  169. out32r(PMM0MA, pmmma[0]);
  170. /*--------------------------------------------------------------------------+
  171. * PMM1 is not used. Initialize them to zero.
  172. *--------------------------------------------------------------------------*/
  173. out32r(PMM1MA, (pmmma[1]&~0x1));
  174. out32r(PMM1LA, pmmla[1]);
  175. out32r(PMM1PCILA, pmmpcila[1]);
  176. out32r(PMM1PCIHA, pmmpciha[1]);
  177. out32r(PMM1MA, pmmma[1]);
  178. /*--------------------------------------------------------------------------+
  179. * PMM2 is not used. Initialize them to zero.
  180. *--------------------------------------------------------------------------*/
  181. out32r(PMM2MA, (pmmma[2]&~0x1));
  182. out32r(PMM2LA, pmmla[2]);
  183. out32r(PMM2PCILA, pmmpcila[2]);
  184. out32r(PMM2PCIHA, pmmpciha[2]);
  185. out32r(PMM2MA, pmmma[2]);
  186. /*--------------------------------------------------------------------------+
  187. * 405GP PCI Target configuration. (PTM1)
  188. * Note: PTM1MS is hardwire enabled but we set the enable bit anyway.
  189. *--------------------------------------------------------------------------*/
  190. out32r(PTM1LA, ptmla[0]); /* insert address */
  191. out32r(PTM1MS, ptmms[0]); /* insert size, enable bit is 1 */
  192. pci_write_config_dword(PCIDEVID_405GP, PCI_BASE_ADDRESS_1, ptmpcila[0]);
  193. /*--------------------------------------------------------------------------+
  194. * 405GP PCI Target configuration. (PTM2)
  195. *--------------------------------------------------------------------------*/
  196. out32r(PTM2LA, ptmla[1]); /* insert address */
  197. pci_write_config_dword(PCIDEVID_405GP, PCI_BASE_ADDRESS_2, ptmpcila[1]);
  198. if (ptmms[1] == 0)
  199. {
  200. out32r(PTM2MS, 0x00000001); /* set enable bit */
  201. pci_write_config_dword(PCIDEVID_405GP, PCI_BASE_ADDRESS_2, 0x00000000);
  202. out32r(PTM2MS, 0x00000000); /* disable */
  203. }
  204. else
  205. {
  206. out32r(PTM2MS, ptmms[1]); /* insert size, enable bit is 1 */
  207. }
  208. /*
  209. * Insert Subsystem Vendor and Device ID
  210. */
  211. pci_write_config_word(PCIDEVID_405GP, PCI_SUBSYSTEM_VENDOR_ID, CFG_PCI_SUBSYS_VENDORID);
  212. #ifdef CONFIG_CPCI405
  213. if (mfdcr(strap) & PSR_PCI_ARBIT_EN)
  214. pci_write_config_word(PCIDEVID_405GP, PCI_SUBSYSTEM_ID, CFG_PCI_SUBSYS_DEVICEID);
  215. else
  216. pci_write_config_word(PCIDEVID_405GP, PCI_SUBSYSTEM_ID, CFG_PCI_SUBSYS_DEVICEID2);
  217. #else
  218. pci_write_config_word(PCIDEVID_405GP, PCI_SUBSYSTEM_ID, CFG_PCI_SUBSYS_DEVICEID);
  219. #endif
  220. /*
  221. * Insert Class-code
  222. */
  223. #ifdef CFG_PCI_CLASSCODE
  224. pci_write_config_word(PCIDEVID_405GP, PCI_CLASS_SUB_CODE, CFG_PCI_CLASSCODE);
  225. #endif /* CFG_PCI_CLASSCODE */
  226. /*--------------------------------------------------------------------------+
  227. * If PCI speed = 66Mhz, set 66Mhz capable bit.
  228. *--------------------------------------------------------------------------*/
  229. if (bd->bi_pci_busfreq >= 66000000) {
  230. pci_read_config_word(PCIDEVID_405GP, PCI_STATUS, &temp_short);
  231. pci_write_config_word(PCIDEVID_405GP,PCI_STATUS,(temp_short|PCI_STATUS_66MHZ));
  232. }
  233. #if (CONFIG_PCI_HOST != PCI_HOST_ADAPTER)
  234. #if (CONFIG_PCI_HOST == PCI_HOST_AUTO)
  235. if ((mfdcr(strap) & PSR_PCI_ARBIT_EN) ||
  236. (((s = getenv("pciscan")) != NULL) && (strcmp(s, "yes") == 0)))
  237. #endif
  238. {
  239. /*--------------------------------------------------------------------------+
  240. * Write the 405GP PCI Configuration regs.
  241. * Enable 405GP to be a master on the PCI bus (PMM).
  242. * Enable 405GP to act as a PCI memory target (PTM).
  243. *--------------------------------------------------------------------------*/
  244. pci_read_config_word(PCIDEVID_405GP, PCI_COMMAND, &temp_short);
  245. pci_write_config_word(PCIDEVID_405GP, PCI_COMMAND, temp_short |
  246. PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY);
  247. }
  248. #endif
  249. #if defined(CONFIG_405EP) /* on ppc405ep vendor id is not set */
  250. pci_write_config_word(PCIDEVID_405GP, PCI_VENDOR_ID, 0x1014); /* IBM */
  251. #endif
  252. /*
  253. * Set HCE bit (Host Configuration Enabled)
  254. */
  255. pci_read_config_word(PCIDEVID_405GP, PCIBRDGOPT2, &temp_short);
  256. pci_write_config_word(PCIDEVID_405GP, PCIBRDGOPT2, (temp_short | 0x0001));
  257. #ifdef CONFIG_PCI_PNP
  258. /*--------------------------------------------------------------------------+
  259. * Scan the PCI bus and configure devices found.
  260. *--------------------------------------------------------------------------*/
  261. #if (CONFIG_PCI_HOST == PCI_HOST_AUTO)
  262. if ((mfdcr(strap) & PSR_PCI_ARBIT_EN) ||
  263. (((s = getenv("pciscan")) != NULL) && (strcmp(s, "yes") == 0)))
  264. #endif
  265. {
  266. #ifdef CONFIG_PCI_SCAN_SHOW
  267. printf("PCI: Bus Dev VenId DevId Class Int\n");
  268. #endif
  269. hose->last_busno = pci_hose_scan(hose);
  270. }
  271. #endif /* CONFIG_PCI_PNP */
  272. }
  273. /*
  274. * drivers/pci.c skips every host bridge but the 405GP since it could
  275. * be set as an Adapter.
  276. *
  277. * I (Andrew May) don't know what we should do here, but I don't want
  278. * the auto setup of a PCI device disabling what is done pci_405gp_init
  279. * as has happened before.
  280. */
  281. void pci_405gp_setup_bridge(struct pci_controller *hose, pci_dev_t dev,
  282. struct pci_config_table *entry)
  283. {
  284. #ifdef DEBUG
  285. printf("405gp_setup_bridge\n");
  286. #endif
  287. }
  288. /*
  289. *
  290. */
  291. void pci_405gp_fixup_irq(struct pci_controller *hose, pci_dev_t dev)
  292. {
  293. unsigned char int_line = 0xff;
  294. /*
  295. * Write pci interrupt line register (cpci405 specific)
  296. */
  297. switch (PCI_DEV(dev) & 0x03)
  298. {
  299. case 0:
  300. int_line = 27 + 2;
  301. break;
  302. case 1:
  303. int_line = 27 + 3;
  304. break;
  305. case 2:
  306. int_line = 27 + 0;
  307. break;
  308. case 3:
  309. int_line = 27 + 1;
  310. break;
  311. }
  312. pci_hose_write_config_byte(hose, dev, PCI_INTERRUPT_LINE, int_line);
  313. }
  314. void pci_405gp_setup_vga(struct pci_controller *hose, pci_dev_t dev,
  315. struct pci_config_table *entry)
  316. {
  317. unsigned int cmdstat = 0;
  318. pciauto_setup_device(hose, dev, 6, hose->pci_mem, hose->pci_io);
  319. /* always enable io space on vga boards */
  320. pci_hose_read_config_dword(hose, dev, PCI_COMMAND, &cmdstat);
  321. cmdstat |= PCI_COMMAND_IO;
  322. pci_hose_write_config_dword(hose, dev, PCI_COMMAND, cmdstat);
  323. }
  324. #if !(defined(CONFIG_PIP405) || defined (CONFIG_MIP405))
  325. /*
  326. *As is these functs get called out of flash Not a horrible
  327. *thing, but something to keep in mind. (no statics?)
  328. */
  329. static struct pci_config_table pci_405gp_config_table[] = {
  330. /*if VendID is 0 it terminates the table search (ie Walnut)*/
  331. #ifdef CFG_PCI_SUBSYS_VENDORID
  332. {CFG_PCI_SUBSYS_VENDORID, PCI_ANY_ID, PCI_CLASS_BRIDGE_HOST,
  333. PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, pci_405gp_setup_bridge},
  334. #endif
  335. {PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA,
  336. PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, pci_405gp_setup_vga},
  337. {PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_NOT_DEFINED_VGA,
  338. PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, pci_405gp_setup_vga},
  339. { }
  340. };
  341. static struct pci_controller hose = {
  342. fixup_irq: pci_405gp_fixup_irq,
  343. config_table: pci_405gp_config_table,
  344. };
  345. void pci_init_board(void)
  346. {
  347. /*we want the ptrs to RAM not flash (ie don't use init list)*/
  348. hose.fixup_irq = pci_405gp_fixup_irq;
  349. hose.config_table = pci_405gp_config_table;
  350. pci_405gp_init(&hose);
  351. }
  352. #endif
  353. #endif /* CONFIG_PCI */
  354. #endif /* CONFIG_405GP */
  355. /*-----------------------------------------------------------------------------+
  356. * CONFIG_440
  357. *-----------------------------------------------------------------------------*/
  358. #if defined(CONFIG_440) && defined(CONFIG_PCI)
  359. static struct pci_controller ppc440_hose = {0};
  360. void pci_440_init (struct pci_controller *hose)
  361. {
  362. int reg_num = 0;
  363. unsigned long strap;
  364. /*--------------------------------------------------------------------------+
  365. * The PCI initialization sequence enable bit must be set ... if not abort
  366. * pci setup since updating the bit requires chip reset.
  367. *--------------------------------------------------------------------------*/
  368. #if defined (CONFIG_440_GX)
  369. mfsdr(sdr_sdstp1,strap);
  370. if ( (strap & 0x00010000) == 0 ){
  371. printf("PCI: SDR0_STRP1[PISE] not set.\n");
  372. printf("PCI: Configuration aborted.\n");
  373. return;
  374. }
  375. #else
  376. strap = mfdcr(cpc0_strp1);
  377. if( (strap & 0x00040000) == 0 ){
  378. printf("PCI: CPC0_STRP1[PISE] not set.\n");
  379. printf("PCI: Configuration aborted.\n");
  380. return;
  381. }
  382. #endif
  383. /*--------------------------------------------------------------------------+
  384. * PCI controller init
  385. *--------------------------------------------------------------------------*/
  386. hose->first_busno = 0;
  387. hose->last_busno = 0xff;
  388. pci_set_region(hose->regions + reg_num++,
  389. 0x00000000,
  390. PCIX0_IOBASE,
  391. 0x10000,
  392. PCI_REGION_IO);
  393. pci_set_region(hose->regions + reg_num++,
  394. CFG_PCI_TARGBASE,
  395. CFG_PCI_MEMBASE,
  396. 0x10000000,
  397. PCI_REGION_MEM );
  398. hose->region_count = reg_num;
  399. pci_setup_indirect(hose, PCIX0_CFGADR, PCIX0_CFGDATA);
  400. #if defined(CFG_PCI_PRE_INIT)
  401. /* Let board change/modify hose & do initial checks */
  402. if( pci_pre_init (hose) == 0 ){
  403. printf("PCI: Board-specific initialization failed.\n");
  404. printf("PCI: Configuration aborted.\n");
  405. return;
  406. }
  407. #endif
  408. pci_register_hose( hose );
  409. /*--------------------------------------------------------------------------+
  410. * PCI target init
  411. *--------------------------------------------------------------------------*/
  412. #if defined(CFG_PCI_TARGET_INIT)
  413. pci_target_init(hose); /* Let board setup pci target */
  414. #else
  415. out16r( PCIX0_SBSYSVID, CFG_PCI_SUBSYS_VENDORID );
  416. out16r( PCIX0_SBSYSID, CFG_PCI_SUBSYS_ID );
  417. out16r( PCIX0_CLS, 0x00060000 ); /* Bridge, host bridge */
  418. #endif
  419. #if defined(CONFIG_440_GX)
  420. out32r( PCIX0_BRDGOPT1, 0x04000060 ); /* PLB Rq pri highest */
  421. out32r( PCIX0_BRDGOPT2, in32(PCIX0_BRDGOPT2) | 0x83 ); /* Enable host config, clear Timeout, ensure int src1 */
  422. #else
  423. out32r( PCIX0_BRDGOPT1, 0x10000060 ); /* PLB Rq pri highest */
  424. out32r( PCIX0_BRDGOPT2, in32(PCIX0_BRDGOPT2) | 1 ); /* Enable host config */
  425. #endif
  426. /*--------------------------------------------------------------------------+
  427. * PCI master init: default is one 256MB region for PCI memory:
  428. * 0x3_00000000 - 0x3_0FFFFFFF ==> CFG_PCI_MEMBASE
  429. *--------------------------------------------------------------------------*/
  430. #if defined(CFG_PCI_MASTER_INIT)
  431. pci_master_init(hose); /* Let board setup pci master */
  432. #else
  433. out32r( PCIX0_POM0SA, 0 ); /* disable */
  434. out32r( PCIX0_POM1SA, 0 ); /* disable */
  435. out32r( PCIX0_POM2SA, 0 ); /* disable */
  436. out32r( PCIX0_POM0LAL, 0x00000000 );
  437. out32r( PCIX0_POM0LAH, 0x00000003 );
  438. out32r( PCIX0_POM0PCIAL, CFG_PCI_MEMBASE );
  439. out32r( PCIX0_POM0PCIAH, 0x00000000 );
  440. out32r( PCIX0_POM0SA, 0xf0000001 ); /* 256MB, enabled */
  441. out32r( PCIX0_STS, in32r( PCIX0_STS ) & ~0x0000fff8 );
  442. #endif
  443. /*--------------------------------------------------------------------------+
  444. * PCI host configuration -- we don't make any assumptions here ... the
  445. * _board_must_indicate_ what to do -- there's just too many runtime
  446. * scenarios in environments like cPCI, PPMC, etc. to make a determination
  447. * based on hard-coded values or state of arbiter enable.
  448. *--------------------------------------------------------------------------*/
  449. if( is_pci_host(hose) ){
  450. #ifdef CONFIG_PCI_SCAN_SHOW
  451. printf("PCI: Bus Dev VenId DevId Class Int\n");
  452. #endif
  453. out16r( PCIX0_CMD, in16r( PCIX0_CMD ) | PCI_COMMAND_MASTER);
  454. hose->last_busno = pci_hose_scan(hose);
  455. }
  456. }
  457. void pci_init_board(void)
  458. {
  459. pci_440_init (&ppc440_hose);
  460. }
  461. #endif /* CONFIG_440 & CONFIG_PCI */