Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e0fa66e authored by Vinod Koul's avatar Vinod Koul
Browse files

Merge branch 'topic/omap' into for-linus

parents 9324fdf5 a074ae38
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -31,6 +31,34 @@ Example:
		dma-requests = <127>;
	};

* DMA router

DMA routers are transparent IP blocks used to route DMA request lines from
devices to the DMA controller. Some SoCs (like TI DRA7x) have more peripherals
integrated with DMA requests than what the DMA controller can handle directly.

Required property:
- dma-masters:		phandle of the DMA controller or list of phandles for
			the DMA controllers the router can direct the signal to.
- #dma-cells: 		Must be at least 1. Used to provide DMA router specific
			information. See DMA client binding below for more
			details.

Optional properties:
- dma-requests: 	Number of incoming request lines the router can handle.
- In the node pointed by the dma-masters:
	- dma-requests:	The router driver might need to look for this in order
			to configure the routing.

Example:
	sdma_xbar: dma-router@4a002b78 {
		compatible = "ti,dra7-dma-crossbar";
		reg = <0x4a002b78 0xfc>;
		#dma-cells = <1>;
		dma-requests = <205>;
		ti,dma-safe-map = <0>;
		dma-masters = <&sdma>;
	};

* DMA client

+52 −0
Original line number Diff line number Diff line
Texas Instruments DMA Crossbar (DMA request router)

Required properties:
- compatible:	"ti,dra7-dma-crossbar" for DRA7xx DMA crossbar
- reg:		Memory map for accessing module
- #dma-cells:	Should be set to <1>.
		Clients should use the crossbar request number (input)
- dma-requests:	Number of DMA requests the crossbar can receive
- dma-masters:	phandle pointing to the DMA controller

The DMA controller node need to have the following poroperties:
- dma-requests:	Number of DMA requests the controller can handle

Optional properties:
- ti,dma-safe-map: Safe routing value for unused request lines

Example:

/* DMA controller */
sdma: dma-controller@4a056000 {
	compatible = "ti,omap4430-sdma";
	reg = <0x4a056000 0x1000>;
	interrupts =	<GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
			<GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
			<GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
			<GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
	#dma-cells = <1>;
	dma-channels = <32>;
	dma-requests = <127>;
};

/* DMA crossbar */
sdma_xbar: dma-router@4a002b78 {
	compatible = "ti,dra7-dma-crossbar";
	reg = <0x4a002b78 0xfc>;
	#dma-cells = <1>;
	dma-requests = <205>;
	ti,dma-safe-map = <0>;
	dma-masters = <&sdma>;
};

/* DMA client */
uart1: serial@4806a000 {
	compatible = "ti,omap4-uart";
	reg = <0x4806a000 0x100>;
	interrupts-extended = <&gic GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
	ti,hwmods = "uart1";
	clock-frequency = <48000000>;
	status = "disabled";
	dmas = <&sdma_xbar 49>, <&sdma_xbar 50>;
	dma-names = "tx", "rx";
};
+4 −0
Original line number Diff line number Diff line
@@ -245,6 +245,9 @@ config TI_EDMA
	  Enable support for the TI EDMA controller. This DMA
	  engine is found on TI DaVinci and AM33xx parts.

config TI_DMA_CROSSBAR
	bool

config ARCH_HAS_ASYNC_TX_FIND_CHANNEL
	bool

@@ -330,6 +333,7 @@ config DMA_OMAP
	depends on ARCH_OMAP
	select DMA_ENGINE
	select DMA_VIRTUAL_CHANNELS
	select TI_DMA_CROSSBAR if SOC_DRA7XX

config DMA_BCM2835
	tristate "BCM2835 DMA engine support"
+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ obj-$(CONFIG_EP93XX_DMA) += ep93xx_dma.o
obj-$(CONFIG_DMA_SA11X0) += sa11x0-dma.o
obj-$(CONFIG_MMP_TDMA) += mmp_tdma.o
obj-$(CONFIG_DMA_OMAP) += omap-dma.o
obj-$(CONFIG_TI_DMA_CROSSBAR) += ti-dma-crossbar.o
obj-$(CONFIG_DMA_BCM2835) += bcm2835-dma.o
obj-$(CONFIG_MMP_PDMA) += mmp_pdma.o
obj-$(CONFIG_DMA_JZ4740) += dma-jz4740.o
+7 −0
Original line number Diff line number Diff line
@@ -267,6 +267,13 @@ static void dma_chan_put(struct dma_chan *chan)
	/* This channel is not in use anymore, free it */
	if (!chan->client_count && chan->device->device_free_chan_resources)
		chan->device->device_free_chan_resources(chan);

	/* If the channel is used via a DMA request router, free the mapping */
	if (chan->router && chan->router->route_free) {
		chan->router->route_free(chan->router->dev, chan->route_data);
		chan->router = NULL;
		chan->route_data = NULL;
	}
}

enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie)
Loading