hw/audio: Remove dead code from ac97_realize
Remove unnecessary PCI configuration register initialization that was marked with TODO comments indicating it's redundant: - PCI_COMMAND register is already 0x00 by default, no need to override - PCI_BASE_ADDRESS_0 registers are automatically set by pci_register_bar() This aligns the code with the pattern used by other PCI audio devices in QEMU (via-ac97, intel-hda, es1370) and removes 15 lines of dead code. Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-ID: <20251102231903.65409-1-osama.abdelkader@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
b7974ab064
commit
1eb18789f8
1 changed files with 0 additions and 19 deletions
|
|
@ -1279,30 +1279,11 @@ static void ac97_realize(PCIDevice *dev, Error **errp)
|
|||
return;
|
||||
}
|
||||
|
||||
/* TODO: no need to override */
|
||||
c[PCI_COMMAND] = 0x00; /* pcicmd pci command rw, ro */
|
||||
c[PCI_COMMAND + 1] = 0x00;
|
||||
|
||||
/* TODO: */
|
||||
c[PCI_STATUS] = PCI_STATUS_FAST_BACK; /* pcists pci status rwc, ro */
|
||||
c[PCI_STATUS + 1] = PCI_STATUS_DEVSEL_MEDIUM >> 8;
|
||||
|
||||
c[PCI_CLASS_PROG] = 0x00; /* pi programming interface ro */
|
||||
|
||||
/* TODO set when bar is registered. no need to override. */
|
||||
/* nabmar native audio mixer base address rw */
|
||||
c[PCI_BASE_ADDRESS_0] = PCI_BASE_ADDRESS_SPACE_IO;
|
||||
c[PCI_BASE_ADDRESS_0 + 1] = 0x00;
|
||||
c[PCI_BASE_ADDRESS_0 + 2] = 0x00;
|
||||
c[PCI_BASE_ADDRESS_0 + 3] = 0x00;
|
||||
|
||||
/* TODO set when bar is registered. no need to override. */
|
||||
/* nabmbar native audio bus mastering base address rw */
|
||||
c[PCI_BASE_ADDRESS_0 + 4] = PCI_BASE_ADDRESS_SPACE_IO;
|
||||
c[PCI_BASE_ADDRESS_0 + 5] = 0x00;
|
||||
c[PCI_BASE_ADDRESS_0 + 6] = 0x00;
|
||||
c[PCI_BASE_ADDRESS_0 + 7] = 0x00;
|
||||
|
||||
c[PCI_INTERRUPT_LINE] = 0x00; /* intr_ln interrupt line rw */
|
||||
c[PCI_INTERRUPT_PIN] = 0x01; /* intr_pn interrupt pin ro */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue