| 400 | } |
| 401 | |
| 402 | static int print_spibar(struct pci_dev *sb, struct pci_access *pacc) { |
| 403 | int i, size = 0, rcba_size = 0x4000; |
| 404 | volatile uint8_t *rcba; |
| 405 | uint32_t rcba_phys; |
| 406 | const io_register_t *spi_register = NULL; |
| 407 | uint32_t spibaroffset; |
| 408 | |
| 409 | printf("\n============= SPI Bar ==============\n\n"); |
| 410 | |
| 411 | switch (sb->device_id) { |
| 412 | case PCI_DEVICE_ID_INTEL_ICH6: |
| 413 | printf("This southbridge does not have a SPI controller.\n"); |
| 414 | return 1; |
| 415 | case PCI_DEVICE_ID_INTEL_ICH7: |
| 416 | case PCI_DEVICE_ID_INTEL_ICH7M: |
| 417 | case PCI_DEVICE_ID_INTEL_ICH7DH: |
| 418 | case PCI_DEVICE_ID_INTEL_ICH7MDH: |
| 419 | spibaroffset = ICH78_SPIBAR; |
| 420 | rcba_phys = pci_read_long(sb, 0xf0) & 0xfffffffe; |
| 421 | size = ARRAY_SIZE(ich7_spi_bar_registers); |
| 422 | spi_register = ich7_spi_bar_registers; |
| 423 | break; |
| 424 | case PCI_DEVICE_ID_INTEL_ICH8: |
| 425 | spibaroffset = ICH78_SPIBAR; |
| 426 | rcba_phys = pci_read_long(sb, 0xf0) & 0xfffffffe; |
| 427 | size = ARRAY_SIZE(spi_bar_registers); |
| 428 | spi_register = spi_bar_registers; |
| 429 | break; |
| 430 | case PCI_DEVICE_ID_INTEL_ICH8M: |
| 431 | case PCI_DEVICE_ID_INTEL_ICH8ME: |
| 432 | case PCI_DEVICE_ID_INTEL_ICH9DH: |
| 433 | case PCI_DEVICE_ID_INTEL_ICH9DO: |
| 434 | case PCI_DEVICE_ID_INTEL_ICH9R: |
| 435 | case PCI_DEVICE_ID_INTEL_ICH9: |
| 436 | case PCI_DEVICE_ID_INTEL_ICH9M: |
| 437 | case PCI_DEVICE_ID_INTEL_ICH9ME: |
| 438 | case PCI_DEVICE_ID_INTEL_ICH10: |
| 439 | case PCI_DEVICE_ID_INTEL_ICH10D: |
| 440 | case PCI_DEVICE_ID_INTEL_ICH10DO: |
| 441 | case PCI_DEVICE_ID_INTEL_ICH10R: |
| 442 | case PCI_DEVICE_ID_INTEL_NM10: |
| 443 | case PCI_DEVICE_ID_INTEL_I63XX: |
| 444 | case PCI_DEVICE_ID_INTEL_3400: |
| 445 | case PCI_DEVICE_ID_INTEL_3420: |
| 446 | case PCI_DEVICE_ID_INTEL_3450: |
| 447 | case PCI_DEVICE_ID_INTEL_3400_DESKTOP: |
| 448 | case PCI_DEVICE_ID_INTEL_3400_MOBILE: |
| 449 | case PCI_DEVICE_ID_INTEL_3400_MOBILE_SFF: |
| 450 | case PCI_DEVICE_ID_INTEL_B55_A: |
| 451 | case PCI_DEVICE_ID_INTEL_B55_B: |
| 452 | case PCI_DEVICE_ID_INTEL_H55: |
| 453 | case PCI_DEVICE_ID_INTEL_H57: |
| 454 | case PCI_DEVICE_ID_INTEL_HM55: |
| 455 | case PCI_DEVICE_ID_INTEL_HM57: |
| 456 | case PCI_DEVICE_ID_INTEL_P55: |
| 457 | case PCI_DEVICE_ID_INTEL_PM55: |
| 458 | case PCI_DEVICE_ID_INTEL_Q57: |
| 459 | case PCI_DEVICE_ID_INTEL_QM57: |
no test coverage detected