| | 349 | } |
| | 350 | |
| | 351 | int sabre_config_cb(const pci_config_t *config) |
| | 352 | { |
| | 353 | phandle_t dev = get_cur_dev(); |
| | 354 | uint32_t props[28]; |
| | 355 | |
| | 356 | props[0] = 0x00000000; |
| | 357 | props[1] = 0x00000003; |
| | 358 | set_property(dev, "bus-range", (char *)props, 2 * sizeof(props[0])); |
| | 359 | props[0] = 0x000001fe; |
| | 360 | props[1] = 0x00000000; |
| | 361 | props[2] = 0x00000000; |
| | 362 | props[3] = 0x00010000; |
| | 363 | props[4] = 0x000001fe; |
| | 364 | props[5] = 0x01000000; |
| | 365 | props[6] = 0x00000000; |
| | 366 | props[7] = 0x00000100; |
| | 367 | set_property(dev, "reg", (char *)props, 8 * sizeof(props[0])); |
| | 368 | props[0] = 0x00000000; |
| | 369 | props[1] = 0x00000000; |
| | 370 | props[2] = 0x00000000; |
| | 371 | props[3] = 0x000001fe; |
| | 372 | props[4] = 0x01000000; |
| | 373 | props[5] = 0x00000000; |
| | 374 | props[6] = 0x01000000; |
| | 375 | props[7] = 0x01000000; |
| | 376 | props[8] = 0x00000000; |
| | 377 | props[9] = 0x00000000; |
| | 378 | props[10] = 0x000001fe; |
| | 379 | props[11] = 0x02000000; |
| | 380 | props[12] = 0x00000000; |
| | 381 | props[13] = 0x01000000; |
| | 382 | props[14] = 0x02000000; |
| | 383 | props[15] = 0x00000000; |
| | 384 | props[16] = 0x00000000; |
| | 385 | props[17] = 0x000001ff; |
| | 386 | props[18] = 0x00000000; |
| | 387 | props[19] = 0x00000001; |
| | 388 | props[20] = 0x00000000; |
| | 389 | props[21] = 0x03000000; |
| | 390 | props[22] = 0x00000000; |
| | 391 | props[23] = 0x00000000; |
| | 392 | props[24] = 0x000001ff; |
| | 393 | props[25] = 0x00000000; |
| | 394 | props[26] = 0x00000001; |
| | 395 | props[27] = 0x00000000; |
| | 396 | set_property(dev, "ranges", (char *)props, 28 * sizeof(props[0])); |
| | 397 | props[0] = 0xc0000000; |
| | 398 | props[1] = 0x20000000; |
| | 399 | set_property(dev, "virtual-dma", (char *)props, 2 * sizeof(props[0])); |
| | 400 | props[0] = 1; |
| | 401 | set_property(dev, "#virtual-dma-size-cells", (char *)props, |
| | 402 | sizeof(props[0])); |
| | 403 | set_property(dev, "#virtual-dma-addr-cells", (char *)props, |
| | 404 | sizeof(props[0])); |
| | 405 | return 0; |