sdhci-pci.c (0db949f1810f4d497762d57d8db6f219c0607529) | sdhci-pci.c (de1b3800b7ec929f95371e6ab0345bf8b583043d) |
---|---|
1/* 2 * SDHCI device on PCI 3 * 4 * This program is free software; you can redistribute it and/or modify it 5 * under the terms of the GNU General Public License as published by the 6 * Free Software Foundation; either version 2 of the License, or (at your 7 * option) any later version. 8 * --- 15 unchanged lines hidden (view full) --- 24 25static Property sdhci_pci_properties[] = { 26 DEFINE_SDHCI_COMMON_PROPERTIES(SDHCIState), 27 DEFINE_PROP_END_OF_LIST(), 28}; 29 30static void sdhci_pci_realize(PCIDevice *dev, Error **errp) 31{ | 1/* 2 * SDHCI device on PCI 3 * 4 * This program is free software; you can redistribute it and/or modify it 5 * under the terms of the GNU General Public License as published by the 6 * Free Software Foundation; either version 2 of the License, or (at your 7 * option) any later version. 8 * --- 15 unchanged lines hidden (view full) --- 24 25static Property sdhci_pci_properties[] = { 26 DEFINE_SDHCI_COMMON_PROPERTIES(SDHCIState), 27 DEFINE_PROP_END_OF_LIST(), 28}; 29 30static void sdhci_pci_realize(PCIDevice *dev, Error **errp) 31{ |
32 ERRP_GUARD(); |
|
32 SDHCIState *s = PCI_SDHCI(dev); | 33 SDHCIState *s = PCI_SDHCI(dev); |
33 Error *local_err = NULL; | |
34 35 sdhci_initfn(s); | 34 35 sdhci_initfn(s); |
36 sdhci_common_realize(s, &local_err); 37 if (local_err) { 38 error_propagate(errp, local_err); | 36 sdhci_common_realize(s, errp); 37 if (*errp) { |
39 return; 40 } 41 42 dev->config[PCI_CLASS_PROG] = 0x01; /* Standard Host supported DMA */ 43 dev->config[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin A */ 44 s->irq = pci_allocate_irq(dev); 45 s->dma_as = pci_get_address_space(dev); 46 pci_register_bar(dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->iomem); --- 42 unchanged lines hidden --- | 38 return; 39 } 40 41 dev->config[PCI_CLASS_PROG] = 0x01; /* Standard Host supported DMA */ 42 dev->config[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin A */ 43 s->irq = pci_allocate_irq(dev); 44 s->dma_as = pci_get_address_space(dev); 45 pci_register_bar(dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->iomem); --- 42 unchanged lines hidden --- |