Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156911693
D17601.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D17601.id.diff
View Options
Index: head/sys/powerpc/powernv/opal_pci.c
===================================================================
--- head/sys/powerpc/powernv/opal_pci.c
+++ head/sys/powerpc/powernv/opal_pci.c
@@ -96,6 +96,9 @@
static void opalpic_pic_enable(device_t dev, u_int irq, u_int vector);
static void opalpic_pic_eoi(device_t dev, u_int irq);
+/* Bus interface */
+static bus_dma_tag_t opalpci_get_dma_tag(device_t dev, device_t child);
+
/*
* Commands
*/
@@ -119,6 +122,8 @@
*/
#define OPAL_PCI_DEFAULT_PE 1
+#define OPAL_PCI_BUS_SPACE_LOWADDR_32BIT 0x7FFFFFFFUL
+
/*
* Driver methods.
*/
@@ -142,6 +147,9 @@
DEVMETHOD(pic_enable, opalpic_pic_enable),
DEVMETHOD(pic_eoi, opalpic_pic_eoi),
+ /* Bus interface */
+ DEVMETHOD(bus_get_dma_tag, opalpci_get_dma_tag),
+
DEVMETHOD_END
};
@@ -424,6 +432,23 @@
msi_ranges[1], msi_ranges[0]);
}
+ /* Create the parent DMA tag */
+ err = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */
+ 1, 0, /* alignment, bounds */
+ OPAL_PCI_BUS_SPACE_LOWADDR_32BIT, /* lowaddr */
+ BUS_SPACE_MAXADDR_32BIT, /* highaddr */
+ NULL, NULL, /* filter, filterarg */
+ BUS_SPACE_MAXSIZE, /* maxsize */
+ BUS_SPACE_UNRESTRICTED, /* nsegments */
+ BUS_SPACE_MAXSIZE, /* maxsegsize */
+ 0, /* flags */
+ NULL, NULL, /* lockfunc, lockarg */
+ &sc->ofw_sc.sc_dmat);
+ if (err != 0) {
+ device_printf(dev, "Failed to create DMA tag\n");
+ return (err);
+ }
+
/*
* General OFW PCI attach
*/
@@ -660,4 +685,13 @@
opal_call(OPAL_PCI_MSI_EOI, sc->phb_id, irq);
PIC_EOI(root_pic, irq);
+}
+
+static bus_dma_tag_t
+opalpci_get_dma_tag(device_t dev, device_t child)
+{
+ struct opalpci_softc *sc;
+
+ sc = device_get_softc(dev);
+ return (sc->ofw_sc.sc_dmat);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, May 18, 7:25 AM (4 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33237974
Default Alt Text
D17601.id.diff (1 KB)
Attached To
Mode
D17601: ppc64: limited 32-bit DMA address range
Attached
Detach File
Event Timeline
Log In to Comment