Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Jun 2004 19:17:43 GMT
From:      Scott Long <scottl@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 54235 for review
Message-ID:  <200406051917.i55JHhPj084857@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=54235

Change 54235 by scottl@scottl-esp-sparc64 on 2004/06/05 19:17:16

	Create a parent DMA tag for the lsi64854 attachment.  These are mostly
	all dummy values.  busdma should really learn about newbus and be
	able to pass bus/parent contraints through it via an inherited parent
	tag.

Affected files ...

.. //depot/projects/scottl-esp/src/sys/dev/esp/esp_sbus.c#10 edit

Differences ...

==== //depot/projects/scottl-esp/src/sys/dev/esp/esp_sbus.c#10 (text+ko) ====

@@ -199,6 +199,22 @@
 	lsc->sc_regt = rman_get_bustag(lsc->sc_res);
 	lsc->sc_regh = rman_get_bushandle(lsc->sc_res);
 
+	/* Create a parent DMA tag based on this bus */
+	if (bus_dma_tag_create(NULL,			/* parent */
+				PAGE_SIZE, 0,		/* algnmnt, boundary */
+				BUS_SPACE_MAXADDR,	/* lowaddr */
+				BUS_SPACE_MAXADDR,	/* highaddr */
+				NULL, NULL,		/* filter, filterarg */
+				BUS_SPACE_MAXSIZE_32BIT,/* maxsize */
+				0,			/* nsegments */
+				BUS_SPACE_MAXSIZE_32BIT,/* maxsegsize */
+				0,			/* flags */
+				NULL, NULL,		/* No locking */
+				&lsc->sc_parent_dmat)) {
+		device_printf(dev, "cannot allocate parent DMA tag\n");
+		free(lsc, M_DEVBUF);
+		return (ENOMEM);
+	}
 	burst = sbus_get_burstsz(dev);
 
 #if ESP_SBUS_DEBUG



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406051917.i55JHhPj084857>