Lines Matching refs:repo
290 int ps3_repository_find_device(struct ps3_repository_device *repo) in ps3_repository_find_device() argument
293 struct ps3_repository_device tmp = *repo; in ps3_repository_find_device()
296 BUG_ON(repo->bus_index > 10); in ps3_repository_find_device()
297 BUG_ON(repo->dev_index > 10); in ps3_repository_find_device()
335 *repo = tmp; in ps3_repository_find_device()
339 int ps3_repository_find_device_by_id(struct ps3_repository_device *repo, in ps3_repository_find_device_by_id() argument
412 *repo = tmp; in ps3_repository_find_device_by_id()
417 int (*callback)(const struct ps3_repository_device *repo)) in ps3_repository_find_devices() argument
420 struct ps3_repository_device repo; in ps3_repository_find_devices() local
424 repo.bus_type = bus_type; in ps3_repository_find_devices()
425 result = ps3_repository_find_bus(repo.bus_type, 0, &repo.bus_index); in ps3_repository_find_devices()
431 result = ps3_repository_read_bus_id(repo.bus_index, &repo.bus_id); in ps3_repository_find_devices()
434 repo.bus_index); in ps3_repository_find_devices()
438 for (repo.dev_index = 0; ; repo.dev_index++) { in ps3_repository_find_devices()
439 result = ps3_repository_find_device(&repo); in ps3_repository_find_devices()
446 result = callback(&repo); in ps3_repository_find_devices()
482 int ps3_repository_find_interrupt(const struct ps3_repository_device *repo, in ps3_repository_find_interrupt() argument
496 result = ps3_repository_read_dev_intr(repo->bus_index, in ps3_repository_find_interrupt()
497 repo->dev_index, res_index, &t, &id); in ps3_repository_find_interrupt()
520 int ps3_repository_find_reg(const struct ps3_repository_device *repo, in ps3_repository_find_reg() argument
535 result = ps3_repository_read_dev_reg(repo->bus_index, in ps3_repository_find_reg()
536 repo->dev_index, res_index, &t, &a, &l); in ps3_repository_find_reg()
1181 int __init ps3_repository_dump_resource_info(const struct ps3_repository_device *repo) in ps3_repository_dump_resource_info() argument
1187 repo->bus_index, repo->dev_index); in ps3_repository_dump_resource_info()
1193 result = ps3_repository_read_dev_intr(repo->bus_index, in ps3_repository_dump_resource_info()
1194 repo->dev_index, res_index, &intr_type, &interrupt_id); in ps3_repository_dump_resource_info()
1200 repo->bus_index, repo->dev_index); in ps3_repository_dump_resource_info()
1205 __func__, __LINE__, repo->bus_index, repo->dev_index, in ps3_repository_dump_resource_info()
1214 result = ps3_repository_read_dev_reg(repo->bus_index, in ps3_repository_dump_resource_info()
1215 repo->dev_index, res_index, ®_type, &bus_addr, &len); in ps3_repository_dump_resource_info()
1221 repo->bus_index, repo->dev_index); in ps3_repository_dump_resource_info()
1226 __func__, __LINE__, repo->bus_index, repo->dev_index, in ps3_repository_dump_resource_info()
1234 static int __init dump_stor_dev_info(struct ps3_repository_device *repo) in dump_stor_dev_info() argument
1241 repo->bus_index, repo->dev_index); in dump_stor_dev_info()
1243 result = ps3_repository_read_stor_dev_info(repo->bus_index, in dump_stor_dev_info()
1244 repo->dev_index, &port, &blk_size, &num_blocks, &num_regions); in dump_stor_dev_info()
1248 repo->bus_index, repo->dev_index); in dump_stor_dev_info()
1254 __func__, __LINE__, repo->bus_index, repo->dev_index, in dump_stor_dev_info()
1261 result = ps3_repository_read_stor_dev_region(repo->bus_index, in dump_stor_dev_info()
1262 repo->dev_index, region_index, ®ion_id, in dump_stor_dev_info()
1267 repo->bus_index, repo->dev_index); in dump_stor_dev_info()
1272 __func__, __LINE__, repo->bus_index, repo->dev_index, in dump_stor_dev_info()
1282 static int __init dump_device_info(struct ps3_repository_device *repo, in dump_device_info() argument
1287 pr_devel(" -> %s:%d: bus_%u\n", __func__, __LINE__, repo->bus_index); in dump_device_info()
1289 for (repo->dev_index = 0; repo->dev_index < num_dev; in dump_device_info()
1290 repo->dev_index++) { in dump_device_info()
1292 result = ps3_repository_read_dev_type(repo->bus_index, in dump_device_info()
1293 repo->dev_index, &repo->dev_type); in dump_device_info()
1298 repo->bus_index, repo->dev_index); in dump_device_info()
1302 result = ps3_repository_read_dev_id(repo->bus_index, in dump_device_info()
1303 repo->dev_index, &repo->dev_id); in dump_device_info()
1308 repo->bus_index, repo->dev_index); in dump_device_info()
1313 __LINE__, repo->bus_index, repo->dev_index, in dump_device_info()
1314 repo->dev_type, (unsigned long)repo->dev_id); in dump_device_info()
1316 ps3_repository_dump_resource_info(repo); in dump_device_info()
1318 if (repo->bus_type == PS3_BUS_TYPE_STORAGE) in dump_device_info()
1319 dump_stor_dev_info(repo); in dump_device_info()
1329 struct ps3_repository_device repo; in ps3_repository_dump_bus_info() local
1333 memset(&repo, 0, sizeof(repo)); in ps3_repository_dump_bus_info()
1335 for (repo.bus_index = 0; repo.bus_index < 10; repo.bus_index++) { in ps3_repository_dump_bus_info()
1338 result = ps3_repository_read_bus_type(repo.bus_index, in ps3_repository_dump_bus_info()
1339 &repo.bus_type); in ps3_repository_dump_bus_info()
1343 __func__, __LINE__, repo.bus_index); in ps3_repository_dump_bus_info()
1347 result = ps3_repository_read_bus_id(repo.bus_index, in ps3_repository_dump_bus_info()
1348 &repo.bus_id); in ps3_repository_dump_bus_info()
1352 __func__, __LINE__, repo.bus_index); in ps3_repository_dump_bus_info()
1356 if (repo.bus_index != repo.bus_id) in ps3_repository_dump_bus_info()
1360 result = ps3_repository_read_bus_num_dev(repo.bus_index, in ps3_repository_dump_bus_info()
1365 __func__, __LINE__, repo.bus_index); in ps3_repository_dump_bus_info()
1370 __func__, __LINE__, repo.bus_index, repo.bus_type, in ps3_repository_dump_bus_info()
1371 (unsigned long)repo.bus_id, num_dev); in ps3_repository_dump_bus_info()
1373 dump_device_info(&repo, num_dev); in ps3_repository_dump_bus_info()