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
3edc8502
Commit
3edc8502
authored
Jul 04, 2017
by
Vinod Koul
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/rcar' into for-linus
parents
2e76eba5
33cb0880
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
9 deletions
+25
-9
Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt
Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt
+3
-2
Documentation/devicetree/bindings/dma/shdma.txt
Documentation/devicetree/bindings/dma/shdma.txt
+1
-1
drivers/dma/sh/rcar-dmac.c
drivers/dma/sh/rcar-dmac.c
+21
-6
No files found.
Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt
View file @
3edc8502
...
...
@@ -30,8 +30,9 @@ Required Properties:
- interrupts: interrupt specifiers for the DMAC, one for each entry in
interrupt-names.
- interrupt-names: one entry per channel, named "ch%u", where %u is the
channel number ranging from zero to the number of channels minus one.
- interrupt-names: one entry for the error interrupt, named "error", plus one
entry per channel, named "ch%u", where %u is the channel number ranging from
zero to the number of channels minus one.
- clock-names: "fck" for the functional clock
- clocks: a list of phandle + clock-specifier pairs, one for each entry
...
...
Documentation/devicetree/bindings/dma/shdma.txt
View file @
3edc8502
* SHDMA Device Tree bindings
Sh-/r-mobile and
r-c
ar systems often have multiple identical DMA controller
Sh-/r-mobile and
R-C
ar systems often have multiple identical DMA controller
instances, capable of serving any of a common set of DMA slave devices, using
the same configuration. To describe this topology we require all compatible
SHDMA DT nodes to be placed under a DMA multiplexer node. All such compatible
...
...
drivers/dma/sh/rcar-dmac.c
View file @
3edc8502
...
...
@@ -144,6 +144,7 @@ struct rcar_dmac_chan_map {
* @chan: base DMA channel object
* @iomem: channel I/O memory base
* @index: index of this channel in the controller
* @irq: channel IRQ
* @src: slave memory address and size on the source side
* @dst: slave memory address and size on the destination side
* @mid_rid: hardware MID/RID for the DMA client using this channel
...
...
@@ -161,6 +162,7 @@ struct rcar_dmac_chan {
struct
dma_chan
chan
;
void
__iomem
*
iomem
;
unsigned
int
index
;
int
irq
;
struct
rcar_dmac_chan_slave
src
;
struct
rcar_dmac_chan_slave
dst
;
...
...
@@ -1008,7 +1010,11 @@ static void rcar_dmac_free_chan_resources(struct dma_chan *chan)
rcar_dmac_chan_halt
(
rchan
);
spin_unlock_irq
(
&
rchan
->
lock
);
/* Now no new interrupts will occur */
/*
* Now no new interrupts will occur, but one might already be
* running. Wait for it to finish before freeing resources.
*/
synchronize_irq
(
rchan
->
irq
);
if
(
rchan
->
mid_rid
>=
0
)
{
/* The caller is holding dma_list_mutex */
...
...
@@ -1363,6 +1369,13 @@ static void rcar_dmac_issue_pending(struct dma_chan *chan)
spin_unlock_irqrestore
(
&
rchan
->
lock
,
flags
);
}
static
void
rcar_dmac_device_synchronize
(
struct
dma_chan
*
chan
)
{
struct
rcar_dmac_chan
*
rchan
=
to_rcar_dmac_chan
(
chan
);
synchronize_irq
(
rchan
->
irq
);
}
/* -----------------------------------------------------------------------------
* IRQ handling
*/
...
...
@@ -1647,7 +1660,6 @@ static int rcar_dmac_chan_probe(struct rcar_dmac *dmac,
struct
dma_chan
*
chan
=
&
rchan
->
chan
;
char
pdev_irqname
[
5
];
char
*
irqname
;
int
irq
;
int
ret
;
rchan
->
index
=
index
;
...
...
@@ -1664,8 +1676,8 @@ static int rcar_dmac_chan_probe(struct rcar_dmac *dmac,
/* Request the channel interrupt. */
sprintf
(
pdev_irqname
,
"ch%u"
,
index
);
irq
=
platform_get_irq_byname
(
pdev
,
pdev_irqname
);
if
(
irq
<
0
)
{
rchan
->
irq
=
platform_get_irq_byname
(
pdev
,
pdev_irqname
);
if
(
rchan
->
irq
<
0
)
{
dev_err
(
dmac
->
dev
,
"no IRQ specified for channel %u
\n
"
,
index
);
return
-
ENODEV
;
}
...
...
@@ -1675,11 +1687,13 @@ static int rcar_dmac_chan_probe(struct rcar_dmac *dmac,
if
(
!
irqname
)
return
-
ENOMEM
;
ret
=
devm_request_threaded_irq
(
dmac
->
dev
,
irq
,
rcar_dmac_isr_channel
,
ret
=
devm_request_threaded_irq
(
dmac
->
dev
,
rchan
->
irq
,
rcar_dmac_isr_channel
,
rcar_dmac_isr_channel_thread
,
0
,
irqname
,
rchan
);
if
(
ret
)
{
dev_err
(
dmac
->
dev
,
"failed to request IRQ %u (%d)
\n
"
,
irq
,
ret
);
dev_err
(
dmac
->
dev
,
"failed to request IRQ %u (%d)
\n
"
,
rchan
->
irq
,
ret
);
return
ret
;
}
...
...
@@ -1843,6 +1857,7 @@ static int rcar_dmac_probe(struct platform_device *pdev)
engine
->
device_terminate_all
=
rcar_dmac_chan_terminate_all
;
engine
->
device_tx_status
=
rcar_dmac_tx_status
;
engine
->
device_issue_pending
=
rcar_dmac_issue_pending
;
engine
->
device_synchronize
=
rcar_dmac_device_synchronize
;
ret
=
dma_async_device_register
(
engine
);
if
(
ret
<
0
)
...
...
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