pci-auto.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555
  1. /*
  2. * PCI autoconfiguration library
  3. *
  4. * Author: Matt Porter <mporter@mvista.com>
  5. *
  6. * Copyright 2000, 2001 MontaVista Software Inc.
  7. * Copyright 2001 Bradley D. LaRonde <brad@ltc.com>
  8. * Copyright 2003 Paul Mundt <lethal@linux-sh.org>
  9. *
  10. * This program is free software; you can redistribute it and/or modify it
  11. * under the terms of the GNU General Public License as published by the
  12. * Free Software Foundation; either version 2 of the License, or (at your
  13. * option) any later version.
  14. */
  15. /*
  16. * Modified for MIPS by Jun Sun, jsun@mvista.com
  17. *
  18. * . Simplify the interface between pci_auto and the rest: a single function.
  19. * . Assign resources from low address to upper address.
  20. * . change most int to u32.
  21. *
  22. * Further modified to include it as mips generic code, ppopov@mvista.com.
  23. *
  24. * 2001-10-26 Bradley D. LaRonde <brad@ltc.com>
  25. * - Add a top_bus argument to the "early config" functions so that
  26. * they can set a fake parent bus pointer to convince the underlying
  27. * pci ops to use type 1 configuration for sub busses.
  28. * - Set bridge base and limit registers correctly.
  29. * - Align io and memory base properly before and after bridge setup.
  30. * - Don't fall through to pci_setup_bars for bridge.
  31. * - Reformat the debug output to look more like lspci's output.
  32. *
  33. * Cloned for SuperH by M. R. Brown, mrbrown@0xd6.org
  34. *
  35. * 2003-08-05 Paul Mundt <lethal@linux-sh.org>
  36. * - Don't update the BAR values on systems that already have valid addresses
  37. * and don't want these updated for whatever reason, by way of a new config
  38. * option check. However, we still read in the old BAR values so that they
  39. * can still be reported through the debug output.
  40. */
  41. #include <linux/kernel.h>
  42. #include <linux/init.h>
  43. #include <linux/types.h>
  44. #include <linux/pci.h>
  45. #undef DEBUG
  46. #ifdef DEBUG
  47. #define DBG(x...) printk(x)
  48. #else
  49. #define DBG(x...)
  50. #endif
  51. /*
  52. * These functions are used early on before PCI scanning is done
  53. * and all of the pci_dev and pci_bus structures have been created.
  54. */
  55. static struct pci_dev *fake_pci_dev(struct pci_channel *hose,
  56. int top_bus, int busnr, int devfn)
  57. {
  58. static struct pci_dev dev;
  59. static struct pci_bus bus;
  60. dev.bus = &bus;
  61. dev.sysdata = hose;
  62. dev.devfn = devfn;
  63. bus.number = busnr;
  64. bus.ops = hose->pci_ops;
  65. if(busnr != top_bus)
  66. /* Fake a parent bus structure. */
  67. bus.parent = &bus;
  68. else
  69. bus.parent = NULL;
  70. return &dev;
  71. }
  72. #define EARLY_PCI_OP(rw, size, type) \
  73. int early_##rw##_config_##size(struct pci_channel *hose, \
  74. int top_bus, int bus, int devfn, int offset, type value) \
  75. { \
  76. return pci_##rw##_config_##size( \
  77. fake_pci_dev(hose, top_bus, bus, devfn), \
  78. offset, value); \
  79. }
  80. EARLY_PCI_OP(read, byte, u8 *)
  81. EARLY_PCI_OP(read, word, u16 *)
  82. EARLY_PCI_OP(read, dword, u32 *)
  83. EARLY_PCI_OP(write, byte, u8)
  84. EARLY_PCI_OP(write, word, u16)
  85. EARLY_PCI_OP(write, dword, u32)
  86. static struct resource *io_resource_inuse;
  87. static struct resource *mem_resource_inuse;
  88. static u32 pciauto_lower_iospc;
  89. static u32 pciauto_upper_iospc;
  90. static u32 pciauto_lower_memspc;
  91. static u32 pciauto_upper_memspc;
  92. static void __init
  93. pciauto_setup_bars(struct pci_channel *hose,
  94. int top_bus,
  95. int current_bus,
  96. int pci_devfn,
  97. int bar_limit)
  98. {
  99. u32 bar_response, bar_size, bar_value;
  100. u32 bar, addr_mask, bar_nr = 0;
  101. u32 * upper_limit;
  102. u32 * lower_limit;
  103. int found_mem64 = 0;
  104. for (bar = PCI_BASE_ADDRESS_0; bar <= bar_limit; bar+=4) {
  105. #if !defined(CONFIG_SH_HS7751RVOIP) && !defined(CONFIG_SH_RTS7751R2D)
  106. u32 bar_addr;
  107. /* Read the old BAR value */
  108. early_read_config_dword(hose, top_bus,
  109. current_bus,
  110. pci_devfn,
  111. bar,
  112. &bar_addr);
  113. #endif
  114. /* Tickle the BAR and get the response */
  115. early_write_config_dword(hose, top_bus,
  116. current_bus,
  117. pci_devfn,
  118. bar,
  119. 0xffffffff);
  120. early_read_config_dword(hose, top_bus,
  121. current_bus,
  122. pci_devfn,
  123. bar,
  124. &bar_response);
  125. #if !defined(CONFIG_SH_HS7751RVOIP) && !defined(CONFIG_SH_RTS7751R2D)
  126. /*
  127. * Write the old BAR value back out, only update the BAR
  128. * if we implicitly want resources to be updated, which
  129. * is done by the generic code further down. -- PFM.
  130. */
  131. early_write_config_dword(hose, top_bus,
  132. current_bus,
  133. pci_devfn,
  134. bar,
  135. bar_addr);
  136. #endif
  137. /* If BAR is not implemented go to the next BAR */
  138. if (!bar_response)
  139. continue;
  140. /*
  141. * Workaround for a BAR that doesn't use its upper word,
  142. * like the ALi 1535D+ PCI DC-97 Controller Modem (M5457).
  143. * bdl <brad@ltc.com>
  144. */
  145. if (!(bar_response & 0xffff0000))
  146. bar_response |= 0xffff0000;
  147. retry:
  148. /* Check the BAR type and set our address mask */
  149. if (bar_response & PCI_BASE_ADDRESS_SPACE) {
  150. addr_mask = PCI_BASE_ADDRESS_IO_MASK;
  151. upper_limit = &pciauto_upper_iospc;
  152. lower_limit = &pciauto_lower_iospc;
  153. DBG(" I/O");
  154. } else {
  155. if ((bar_response & PCI_BASE_ADDRESS_MEM_TYPE_MASK) ==
  156. PCI_BASE_ADDRESS_MEM_TYPE_64)
  157. found_mem64 = 1;
  158. addr_mask = PCI_BASE_ADDRESS_MEM_MASK;
  159. upper_limit = &pciauto_upper_memspc;
  160. lower_limit = &pciauto_lower_memspc;
  161. DBG(" Mem");
  162. }
  163. /* Calculate requested size */
  164. bar_size = ~(bar_response & addr_mask) + 1;
  165. /* Allocate a base address */
  166. bar_value = ((*lower_limit - 1) & ~(bar_size - 1)) + bar_size;
  167. if ((bar_value + bar_size) > *upper_limit) {
  168. if (bar_response & PCI_BASE_ADDRESS_SPACE) {
  169. if (io_resource_inuse->child) {
  170. io_resource_inuse =
  171. io_resource_inuse->child;
  172. pciauto_lower_iospc =
  173. io_resource_inuse->start;
  174. pciauto_upper_iospc =
  175. io_resource_inuse->end + 1;
  176. goto retry;
  177. }
  178. } else {
  179. if (mem_resource_inuse->child) {
  180. mem_resource_inuse =
  181. mem_resource_inuse->child;
  182. pciauto_lower_memspc =
  183. mem_resource_inuse->start;
  184. pciauto_upper_memspc =
  185. mem_resource_inuse->end + 1;
  186. goto retry;
  187. }
  188. }
  189. DBG(" unavailable -- skipping, value %x size %x\n",
  190. bar_value, bar_size);
  191. continue;
  192. }
  193. #ifdef CONFIG_PCI_AUTO_UPDATE_RESOURCES
  194. /* Write it out and update our limit */
  195. early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
  196. bar, bar_value);
  197. #endif
  198. *lower_limit = bar_value + bar_size;
  199. /*
  200. * If we are a 64-bit decoder then increment to the
  201. * upper 32 bits of the bar and force it to locate
  202. * in the lower 4GB of memory.
  203. */
  204. if (found_mem64) {
  205. bar += 4;
  206. early_write_config_dword(hose, top_bus,
  207. current_bus,
  208. pci_devfn,
  209. bar,
  210. 0x00000000);
  211. }
  212. DBG(" at 0x%.8x [size=0x%x]\n", bar_value, bar_size);
  213. bar_nr++;
  214. }
  215. }
  216. static void __init
  217. pciauto_prescan_setup_bridge(struct pci_channel *hose,
  218. int top_bus,
  219. int current_bus,
  220. int pci_devfn,
  221. int sub_bus)
  222. {
  223. /* Configure bus number registers */
  224. early_write_config_byte(hose, top_bus, current_bus, pci_devfn,
  225. PCI_PRIMARY_BUS, current_bus);
  226. early_write_config_byte(hose, top_bus, current_bus, pci_devfn,
  227. PCI_SECONDARY_BUS, sub_bus + 1);
  228. early_write_config_byte(hose, top_bus, current_bus, pci_devfn,
  229. PCI_SUBORDINATE_BUS, 0xff);
  230. /* Align memory and I/O to 1MB and 4KB boundaries. */
  231. pciauto_lower_memspc = (pciauto_lower_memspc + (0x100000 - 1))
  232. & ~(0x100000 - 1);
  233. pciauto_lower_iospc = (pciauto_lower_iospc + (0x1000 - 1))
  234. & ~(0x1000 - 1);
  235. /* Set base (lower limit) of address range behind bridge. */
  236. early_write_config_word(hose, top_bus, current_bus, pci_devfn,
  237. PCI_MEMORY_BASE, pciauto_lower_memspc >> 16);
  238. early_write_config_byte(hose, top_bus, current_bus, pci_devfn,
  239. PCI_IO_BASE, (pciauto_lower_iospc & 0x0000f000) >> 8);
  240. early_write_config_word(hose, top_bus, current_bus, pci_devfn,
  241. PCI_IO_BASE_UPPER16, pciauto_lower_iospc >> 16);
  242. /* We don't support prefetchable memory for now, so disable */
  243. early_write_config_word(hose, top_bus, current_bus, pci_devfn,
  244. PCI_PREF_MEMORY_BASE, 0);
  245. early_write_config_word(hose, top_bus, current_bus, pci_devfn,
  246. PCI_PREF_MEMORY_LIMIT, 0);
  247. }
  248. static void __init
  249. pciauto_postscan_setup_bridge(struct pci_channel *hose,
  250. int top_bus,
  251. int current_bus,
  252. int pci_devfn,
  253. int sub_bus)
  254. {
  255. u32 temp;
  256. /*
  257. * [jsun] we always bump up baselines a little, so that if there
  258. * nothing behind P2P bridge, we don't wind up overlapping IO/MEM
  259. * spaces.
  260. */
  261. pciauto_lower_memspc += 1;
  262. pciauto_lower_iospc += 1;
  263. /* Configure bus number registers */
  264. early_write_config_byte(hose, top_bus, current_bus, pci_devfn,
  265. PCI_SUBORDINATE_BUS, sub_bus);
  266. /* Set upper limit of address range behind bridge. */
  267. early_write_config_word(hose, top_bus, current_bus, pci_devfn,
  268. PCI_MEMORY_LIMIT, pciauto_lower_memspc >> 16);
  269. early_write_config_byte(hose, top_bus, current_bus, pci_devfn,
  270. PCI_IO_LIMIT, (pciauto_lower_iospc & 0x0000f000) >> 8);
  271. early_write_config_word(hose, top_bus, current_bus, pci_devfn,
  272. PCI_IO_LIMIT_UPPER16, pciauto_lower_iospc >> 16);
  273. /* Align memory and I/O to 1MB and 4KB boundaries. */
  274. pciauto_lower_memspc = (pciauto_lower_memspc + (0x100000 - 1))
  275. & ~(0x100000 - 1);
  276. pciauto_lower_iospc = (pciauto_lower_iospc + (0x1000 - 1))
  277. & ~(0x1000 - 1);
  278. /* Enable memory and I/O accesses, enable bus master */
  279. early_read_config_dword(hose, top_bus, current_bus, pci_devfn,
  280. PCI_COMMAND, &temp);
  281. early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
  282. PCI_COMMAND, temp | PCI_COMMAND_IO | PCI_COMMAND_MEMORY
  283. | PCI_COMMAND_MASTER);
  284. }
  285. static void __init
  286. pciauto_prescan_setup_cardbus_bridge(struct pci_channel *hose,
  287. int top_bus,
  288. int current_bus,
  289. int pci_devfn,
  290. int sub_bus)
  291. {
  292. /* Configure bus number registers */
  293. early_write_config_byte(hose, top_bus, current_bus, pci_devfn,
  294. PCI_PRIMARY_BUS, current_bus);
  295. early_write_config_byte(hose, top_bus, current_bus, pci_devfn,
  296. PCI_SECONDARY_BUS, sub_bus + 1);
  297. early_write_config_byte(hose, top_bus, current_bus, pci_devfn,
  298. PCI_SUBORDINATE_BUS, 0xff);
  299. /* Align memory and I/O to 4KB and 4 byte boundaries. */
  300. pciauto_lower_memspc = (pciauto_lower_memspc + (0x1000 - 1))
  301. & ~(0x1000 - 1);
  302. pciauto_lower_iospc = (pciauto_lower_iospc + (0x4 - 1))
  303. & ~(0x4 - 1);
  304. early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
  305. PCI_CB_MEMORY_BASE_0, pciauto_lower_memspc);
  306. early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
  307. PCI_CB_IO_BASE_0, pciauto_lower_iospc);
  308. }
  309. static void __init
  310. pciauto_postscan_setup_cardbus_bridge(struct pci_channel *hose,
  311. int top_bus,
  312. int current_bus,
  313. int pci_devfn,
  314. int sub_bus)
  315. {
  316. u32 temp;
  317. #if !defined(CONFIG_SH_HS7751RVOIP) && !defined(CONFIG_SH_RTS7751R2D)
  318. /*
  319. * [jsun] we always bump up baselines a little, so that if there
  320. * nothing behind P2P bridge, we don't wind up overlapping IO/MEM
  321. * spaces.
  322. */
  323. pciauto_lower_memspc += 1;
  324. pciauto_lower_iospc += 1;
  325. #endif
  326. /*
  327. * Configure subordinate bus number. The PCI subsystem
  328. * bus scan will renumber buses (reserving three additional
  329. * for this PCI<->CardBus bridge for the case where a CardBus
  330. * adapter contains a P2P or CB2CB bridge.
  331. */
  332. early_write_config_byte(hose, top_bus, current_bus, pci_devfn,
  333. PCI_SUBORDINATE_BUS, sub_bus);
  334. /*
  335. * Reserve an additional 4MB for mem space and 16KB for
  336. * I/O space. This should cover any additional space
  337. * requirement of unusual CardBus devices with
  338. * additional bridges that can consume more address space.
  339. *
  340. * Although pcmcia-cs currently will reprogram bridge
  341. * windows, the goal is to add an option to leave them
  342. * alone and use the bridge window ranges as the regions
  343. * that are searched for free resources upon hot-insertion
  344. * of a device. This will allow a PCI<->CardBus bridge
  345. * configured by this routine to happily live behind a
  346. * P2P bridge in a system.
  347. */
  348. #if defined(CONFIG_SH_HS7751RVOIP) || defined(CONFIG_SH_RTS7751R2D)
  349. pciauto_lower_memspc += 0x00400000;
  350. pciauto_lower_iospc += 0x00004000;
  351. #endif
  352. /* Align memory and I/O to 4KB and 4 byte boundaries. */
  353. pciauto_lower_memspc = (pciauto_lower_memspc + (0x1000 - 1))
  354. & ~(0x1000 - 1);
  355. pciauto_lower_iospc = (pciauto_lower_iospc + (0x4 - 1))
  356. & ~(0x4 - 1);
  357. /* Set up memory and I/O filter limits, assume 32-bit I/O space */
  358. early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
  359. PCI_CB_MEMORY_LIMIT_0, pciauto_lower_memspc - 1);
  360. early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
  361. PCI_CB_IO_LIMIT_0, pciauto_lower_iospc - 1);
  362. /* Enable memory and I/O accesses, enable bus master */
  363. early_read_config_dword(hose, top_bus, current_bus, pci_devfn,
  364. PCI_COMMAND, &temp);
  365. early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
  366. PCI_COMMAND, temp | PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
  367. PCI_COMMAND_MASTER);
  368. }
  369. #define PCIAUTO_IDE_MODE_MASK 0x05
  370. static int __init
  371. pciauto_bus_scan(struct pci_channel *hose, int top_bus, int current_bus)
  372. {
  373. int sub_bus;
  374. u32 pci_devfn, pci_class, cmdstat, found_multi=0;
  375. unsigned short vid, did;
  376. unsigned char header_type;
  377. int devfn_start = 0;
  378. int devfn_stop = 0xff;
  379. sub_bus = current_bus;
  380. if (hose->first_devfn)
  381. devfn_start = hose->first_devfn;
  382. if (hose->last_devfn)
  383. devfn_stop = hose->last_devfn;
  384. for (pci_devfn=devfn_start; pci_devfn<devfn_stop; pci_devfn++) {
  385. if (PCI_FUNC(pci_devfn) && !found_multi)
  386. continue;
  387. early_read_config_word(hose, top_bus, current_bus, pci_devfn,
  388. PCI_VENDOR_ID, &vid);
  389. if (vid == 0xffff) continue;
  390. early_read_config_byte(hose, top_bus, current_bus, pci_devfn,
  391. PCI_HEADER_TYPE, &header_type);
  392. if (!PCI_FUNC(pci_devfn))
  393. found_multi = header_type & 0x80;
  394. early_read_config_word(hose, top_bus, current_bus, pci_devfn,
  395. PCI_DEVICE_ID, &did);
  396. early_read_config_dword(hose, top_bus, current_bus, pci_devfn,
  397. PCI_CLASS_REVISION, &pci_class);
  398. DBG("%.2x:%.2x.%x Class %.4x: %.4x:%.4x",
  399. current_bus, PCI_SLOT(pci_devfn), PCI_FUNC(pci_devfn),
  400. pci_class >> 16, vid, did);
  401. if (pci_class & 0xff)
  402. DBG(" (rev %.2x)", pci_class & 0xff);
  403. DBG("\n");
  404. if ((pci_class >> 16) == PCI_CLASS_BRIDGE_PCI) {
  405. DBG(" Bridge: primary=%.2x, secondary=%.2x\n",
  406. current_bus, sub_bus + 1);
  407. #if defined(CONFIG_SH_HS7751RVOIP) || defined(CONFIG_SH_RTS7751R2D)
  408. pciauto_setup_bars(hose, top_bus, current_bus, pci_devfn, PCI_BASE_ADDRESS_1);
  409. #endif
  410. pciauto_prescan_setup_bridge(hose, top_bus, current_bus,
  411. pci_devfn, sub_bus);
  412. DBG("Scanning sub bus %.2x, I/O 0x%.8x, Mem 0x%.8x\n",
  413. sub_bus + 1,
  414. pciauto_lower_iospc, pciauto_lower_memspc);
  415. sub_bus = pciauto_bus_scan(hose, top_bus, sub_bus+1);
  416. DBG("Back to bus %.2x\n", current_bus);
  417. pciauto_postscan_setup_bridge(hose, top_bus, current_bus,
  418. pci_devfn, sub_bus);
  419. continue;
  420. } else if ((pci_class >> 16) == PCI_CLASS_BRIDGE_CARDBUS) {
  421. DBG(" CARDBUS Bridge: primary=%.2x, secondary=%.2x\n",
  422. current_bus, sub_bus + 1);
  423. DBG("PCI Autoconfig: Found CardBus bridge, device %d function %d\n", PCI_SLOT(pci_devfn), PCI_FUNC(pci_devfn));
  424. /* Place CardBus Socket/ExCA registers */
  425. pciauto_setup_bars(hose, top_bus, current_bus, pci_devfn, PCI_BASE_ADDRESS_0);
  426. pciauto_prescan_setup_cardbus_bridge(hose, top_bus,
  427. current_bus, pci_devfn, sub_bus);
  428. DBG("Scanning sub bus %.2x, I/O 0x%.8x, Mem 0x%.8x\n",
  429. sub_bus + 1,
  430. pciauto_lower_iospc, pciauto_lower_memspc);
  431. sub_bus = pciauto_bus_scan(hose, top_bus, sub_bus+1);
  432. DBG("Back to bus %.2x, sub_bus is %x\n", current_bus, sub_bus);
  433. pciauto_postscan_setup_cardbus_bridge(hose, top_bus,
  434. current_bus, pci_devfn, sub_bus);
  435. continue;
  436. } else if ((pci_class >> 16) == PCI_CLASS_STORAGE_IDE) {
  437. unsigned char prg_iface;
  438. early_read_config_byte(hose, top_bus, current_bus,
  439. pci_devfn, PCI_CLASS_PROG, &prg_iface);
  440. if (!(prg_iface & PCIAUTO_IDE_MODE_MASK)) {
  441. DBG("Skipping legacy mode IDE controller\n");
  442. continue;
  443. }
  444. }
  445. /*
  446. * Found a peripheral, enable some standard
  447. * settings
  448. */
  449. early_read_config_dword(hose, top_bus, current_bus, pci_devfn,
  450. PCI_COMMAND, &cmdstat);
  451. early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
  452. PCI_COMMAND, cmdstat | PCI_COMMAND_IO |
  453. PCI_COMMAND_MEMORY |
  454. PCI_COMMAND_MASTER);
  455. #if !defined(CONFIG_SH_HS7751RVOIP) && !defined(CONFIG_SH_RTS7751R2D)
  456. early_write_config_byte(hose, top_bus, current_bus, pci_devfn,
  457. PCI_LATENCY_TIMER, 0x80);
  458. #endif
  459. /* Allocate PCI I/O and/or memory space */
  460. pciauto_setup_bars(hose, top_bus, current_bus, pci_devfn, PCI_BASE_ADDRESS_5);
  461. }
  462. return sub_bus;
  463. }
  464. int __init
  465. pciauto_assign_resources(int busno, struct pci_channel *hose)
  466. {
  467. /* setup resource limits */
  468. io_resource_inuse = hose->io_resource;
  469. mem_resource_inuse = hose->mem_resource;
  470. pciauto_lower_iospc = io_resource_inuse->start;
  471. pciauto_upper_iospc = io_resource_inuse->end + 1;
  472. pciauto_lower_memspc = mem_resource_inuse->start;
  473. pciauto_upper_memspc = mem_resource_inuse->end + 1;
  474. DBG("Autoconfig PCI channel 0x%p\n", hose);
  475. DBG("Scanning bus %.2x, I/O 0x%.8x:0x%.8x, Mem 0x%.8x:0x%.8x\n",
  476. busno, pciauto_lower_iospc, pciauto_upper_iospc,
  477. pciauto_lower_memspc, pciauto_upper_memspc);
  478. return pciauto_bus_scan(hose, busno, busno);
  479. }