Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
0f5c85f4
Commit
0f5c85f4
authored
May 17, 2016
by
Vinod Koul
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/tegra' into for-linus
parents
53b84bad
86e486a0
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
927 additions
and
4 deletions
+927
-4
Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.txt
...entation/devicetree/bindings/dma/nvidia,tegra210-adma.txt
+55
-0
MAINTAINERS
MAINTAINERS
+3
-2
drivers/dma/Kconfig
drivers/dma/Kconfig
+14
-0
drivers/dma/Makefile
drivers/dma/Makefile
+1
-0
drivers/dma/tegra20-apb-dma.c
drivers/dma/tegra20-apb-dma.c
+14
-2
drivers/dma/tegra210-adma.c
drivers/dma/tegra210-adma.c
+840
-0
No files found.
Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.txt
0 → 100644
View file @
0f5c85f4
* NVIDIA Tegra Audio DMA (ADMA) controller
The Tegra Audio DMA controller that is used for transferring data
between system memory and the Audio Processing Engine (APE).
Required properties:
- compatible: Must be "nvidia,tegra210-adma".
- reg: Should contain DMA registers location and length. This should be
a single entry that includes all of the per-channel registers in one
contiguous bank.
- interrupt-parent: Phandle to the interrupt parent controller.
- interrupts: Should contain all of the per-channel DMA interrupts in
ascending order with respect to the DMA channel index.
- clocks: Must contain one entry for the ADMA module clock
(TEGRA210_CLK_D_AUDIO).
- clock-names: Must contain the name "d_audio" for the corresponding
'clocks' entry.
- #dma-cells : Must be 1. The first cell denotes the receive/transmit
request number and should be between 1 and the maximum number of
requests supported. This value corresponds to the RX/TX_REQUEST_SELECT
fields in the ADMA_CHn_CTRL register.
Example:
adma: dma@702e2000 {
compatible = "nvidia,tegra210-adma";
reg = <0x0 0x702e2000 0x0 0x2000>;
interrupt-parent = <&tegra_agic>;
interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA210_CLK_D_AUDIO>;
clock-names = "d_audio";
#dma-cells = <1>;
};
MAINTAINERS
View file @
0f5c85f4
...
@@ -10921,10 +10921,11 @@ M: Prashant Gaikwad <pgaikwad@nvidia.com>
...
@@ -10921,10 +10921,11 @@ M: Prashant Gaikwad <pgaikwad@nvidia.com>
S: Supported
S: Supported
F: drivers/clk/tegra/
F: drivers/clk/tegra/
TEGRA DMA DRIVER
TEGRA DMA DRIVER
S
M: Laxman Dewangan <ldewangan@nvidia.com>
M: Laxman Dewangan <ldewangan@nvidia.com>
M: Jon Hunter <jonathanh@nvidia.com>
S: Supported
S: Supported
F: drivers/dma/tegra
20-apb-dma.c
F: drivers/dma/tegra
*
TEGRA I2C DRIVER
TEGRA I2C DRIVER
M: Laxman Dewangan <ldewangan@nvidia.com>
M: Laxman Dewangan <ldewangan@nvidia.com>
...
...
drivers/dma/Kconfig
View file @
0f5c85f4
...
@@ -467,6 +467,20 @@ config TEGRA20_APB_DMA
...
@@ -467,6 +467,20 @@ config TEGRA20_APB_DMA
This DMA controller transfers data from memory to peripheral fifo
This DMA controller transfers data from memory to peripheral fifo
or vice versa. It does not support memory to memory data transfer.
or vice versa. It does not support memory to memory data transfer.
config TEGRA210_ADMA
bool "NVIDIA Tegra210 ADMA support"
depends on ARCH_TEGRA_210_SOC
select DMA_ENGINE
select DMA_VIRTUAL_CHANNELS
select PM_CLK
help
Support for the NVIDIA Tegra210 ADMA controller driver. The
DMA controller has multiple DMA channels and is used to service
various audio clients in the Tegra210 audio processing engine
(APE). This DMA controller transfers data from memory to
peripheral and vice versa. It does not support memory to
memory data transfer.
config TIMB_DMA
config TIMB_DMA
tristate "Timberdale FPGA DMA support"
tristate "Timberdale FPGA DMA support"
depends on MFD_TIMBERDALE
depends on MFD_TIMBERDALE
...
...
drivers/dma/Makefile
View file @
0f5c85f4
...
@@ -59,6 +59,7 @@ obj-$(CONFIG_STM32_DMA) += stm32-dma.o
...
@@ -59,6 +59,7 @@ obj-$(CONFIG_STM32_DMA) += stm32-dma.o
obj-$(CONFIG_S3C24XX_DMAC)
+=
s3c24xx-dma.o
obj-$(CONFIG_S3C24XX_DMAC)
+=
s3c24xx-dma.o
obj-$(CONFIG_TXX9_DMAC)
+=
txx9dmac.o
obj-$(CONFIG_TXX9_DMAC)
+=
txx9dmac.o
obj-$(CONFIG_TEGRA20_APB_DMA)
+=
tegra20-apb-dma.o
obj-$(CONFIG_TEGRA20_APB_DMA)
+=
tegra20-apb-dma.o
obj-$(CONFIG_TEGRA210_ADMA)
+=
tegra210-adma.o
obj-$(CONFIG_TIMB_DMA)
+=
timb_dma.o
obj-$(CONFIG_TIMB_DMA)
+=
timb_dma.o
obj-$(CONFIG_TI_CPPI41)
+=
cppi41.o
obj-$(CONFIG_TI_CPPI41)
+=
cppi41.o
obj-$(CONFIG_TI_DMA_CROSSBAR)
+=
ti-dma-crossbar.o
obj-$(CONFIG_TI_DMA_CROSSBAR)
+=
ti-dma-crossbar.o
...
...
drivers/dma/tegra20-apb-dma.c
View file @
0f5c85f4
...
@@ -54,6 +54,7 @@
...
@@ -54,6 +54,7 @@
#define TEGRA_APBDMA_CSR_ONCE BIT(27)
#define TEGRA_APBDMA_CSR_ONCE BIT(27)
#define TEGRA_APBDMA_CSR_FLOW BIT(21)
#define TEGRA_APBDMA_CSR_FLOW BIT(21)
#define TEGRA_APBDMA_CSR_REQ_SEL_SHIFT 16
#define TEGRA_APBDMA_CSR_REQ_SEL_SHIFT 16
#define TEGRA_APBDMA_CSR_REQ_SEL_MASK 0x1F
#define TEGRA_APBDMA_CSR_WCOUNT_MASK 0xFFFC
#define TEGRA_APBDMA_CSR_WCOUNT_MASK 0xFFFC
/* STATUS register */
/* STATUS register */
...
@@ -114,6 +115,8 @@
...
@@ -114,6 +115,8 @@
/* Channel base address offset from APBDMA base address */
/* Channel base address offset from APBDMA base address */
#define TEGRA_APBDMA_CHANNEL_BASE_ADD_OFFSET 0x1000
#define TEGRA_APBDMA_CHANNEL_BASE_ADD_OFFSET 0x1000
#define TEGRA_APBDMA_SLAVE_ID_INVALID (TEGRA_APBDMA_CSR_REQ_SEL_MASK + 1)
struct
tegra_dma
;
struct
tegra_dma
;
/*
/*
...
@@ -353,8 +356,11 @@ static int tegra_dma_slave_config(struct dma_chan *dc,
...
@@ -353,8 +356,11 @@ static int tegra_dma_slave_config(struct dma_chan *dc,
}
}
memcpy
(
&
tdc
->
dma_sconfig
,
sconfig
,
sizeof
(
*
sconfig
));
memcpy
(
&
tdc
->
dma_sconfig
,
sconfig
,
sizeof
(
*
sconfig
));
if
(
!
tdc
->
slave_id
)
if
(
tdc
->
slave_id
==
TEGRA_APBDMA_SLAVE_ID_INVALID
)
{
if
(
sconfig
->
slave_id
>
TEGRA_APBDMA_CSR_REQ_SEL_MASK
)
return
-
EINVAL
;
tdc
->
slave_id
=
sconfig
->
slave_id
;
tdc
->
slave_id
=
sconfig
->
slave_id
;
}
tdc
->
config_init
=
true
;
tdc
->
config_init
=
true
;
return
0
;
return
0
;
}
}
...
@@ -1236,7 +1242,7 @@ static void tegra_dma_free_chan_resources(struct dma_chan *dc)
...
@@ -1236,7 +1242,7 @@ static void tegra_dma_free_chan_resources(struct dma_chan *dc)
}
}
pm_runtime_put
(
tdma
->
dev
);
pm_runtime_put
(
tdma
->
dev
);
tdc
->
slave_id
=
0
;
tdc
->
slave_id
=
TEGRA_APBDMA_SLAVE_ID_INVALID
;
}
}
static
struct
dma_chan
*
tegra_dma_of_xlate
(
struct
of_phandle_args
*
dma_spec
,
static
struct
dma_chan
*
tegra_dma_of_xlate
(
struct
of_phandle_args
*
dma_spec
,
...
@@ -1246,6 +1252,11 @@ static struct dma_chan *tegra_dma_of_xlate(struct of_phandle_args *dma_spec,
...
@@ -1246,6 +1252,11 @@ static struct dma_chan *tegra_dma_of_xlate(struct of_phandle_args *dma_spec,
struct
dma_chan
*
chan
;
struct
dma_chan
*
chan
;
struct
tegra_dma_channel
*
tdc
;
struct
tegra_dma_channel
*
tdc
;
if
(
dma_spec
->
args
[
0
]
>
TEGRA_APBDMA_CSR_REQ_SEL_MASK
)
{
dev_err
(
tdma
->
dev
,
"Invalid slave id: %d
\n
"
,
dma_spec
->
args
[
0
]);
return
NULL
;
}
chan
=
dma_get_any_slave_channel
(
&
tdma
->
dma_dev
);
chan
=
dma_get_any_slave_channel
(
&
tdma
->
dma_dev
);
if
(
!
chan
)
if
(
!
chan
)
return
NULL
;
return
NULL
;
...
@@ -1389,6 +1400,7 @@ static int tegra_dma_probe(struct platform_device *pdev)
...
@@ -1389,6 +1400,7 @@ static int tegra_dma_probe(struct platform_device *pdev)
&
tdma
->
dma_dev
.
channels
);
&
tdma
->
dma_dev
.
channels
);
tdc
->
tdma
=
tdma
;
tdc
->
tdma
=
tdma
;
tdc
->
id
=
i
;
tdc
->
id
=
i
;
tdc
->
slave_id
=
TEGRA_APBDMA_SLAVE_ID_INVALID
;
tasklet_init
(
&
tdc
->
tasklet
,
tegra_dma_tasklet
,
tasklet_init
(
&
tdc
->
tasklet
,
tegra_dma_tasklet
,
(
unsigned
long
)
tdc
);
(
unsigned
long
)
tdc
);
...
...
drivers/dma/tegra210-adma.c
0 → 100644
View file @
0f5c85f4
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment