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
nexedi
linux
Commits
09c505ce
Commit
09c505ce
authored
Apr 16, 2016
by
Vinod Koul
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/hsu' into fixes
parents
3fe6409c
4f4bc0ab
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
drivers/dma/hsu/hsu.c
drivers/dma/hsu/hsu.c
+8
-5
drivers/dma/hsu/hsu.h
drivers/dma/hsu/hsu.h
+3
-0
No files found.
drivers/dma/hsu/hsu.c
View file @
09c505ce
...
...
@@ -64,10 +64,10 @@ static void hsu_dma_chan_start(struct hsu_dma_chan *hsuc)
if
(
hsuc
->
direction
==
DMA_MEM_TO_DEV
)
{
bsr
=
config
->
dst_maxburst
;
mtsr
=
config
->
dst
_addr_width
;
mtsr
=
config
->
src
_addr_width
;
}
else
if
(
hsuc
->
direction
==
DMA_DEV_TO_MEM
)
{
bsr
=
config
->
src_maxburst
;
mtsr
=
config
->
src
_addr_width
;
mtsr
=
config
->
dst
_addr_width
;
}
hsu_chan_disable
(
hsuc
);
...
...
@@ -135,7 +135,7 @@ static u32 hsu_dma_chan_get_sr(struct hsu_dma_chan *hsuc)
sr
=
hsu_chan_readl
(
hsuc
,
HSU_CH_SR
);
spin_unlock_irqrestore
(
&
hsuc
->
vchan
.
lock
,
flags
);
return
sr
;
return
sr
&
~
(
HSU_CH_SR_DESCE_ANY
|
HSU_CH_SR_CDESC_ANY
)
;
}
irqreturn_t
hsu_dma_irq
(
struct
hsu_dma_chip
*
chip
,
unsigned
short
nr
)
...
...
@@ -254,10 +254,13 @@ static void hsu_dma_issue_pending(struct dma_chan *chan)
static
size_t
hsu_dma_active_desc_size
(
struct
hsu_dma_chan
*
hsuc
)
{
struct
hsu_dma_desc
*
desc
=
hsuc
->
desc
;
size_t
bytes
=
desc
->
length
;
size_t
bytes
=
0
;
int
i
;
i
=
desc
->
active
%
HSU_DMA_CHAN_NR_DESC
;
for
(
i
=
desc
->
active
;
i
<
desc
->
nents
;
i
++
)
bytes
+=
desc
->
sg
[
i
].
len
;
i
=
HSU_DMA_CHAN_NR_DESC
-
1
;
do
{
bytes
+=
hsu_chan_readl
(
hsuc
,
HSU_CH_DxTSR
(
i
));
}
while
(
--
i
>=
0
);
...
...
drivers/dma/hsu/hsu.h
View file @
09c505ce
...
...
@@ -41,6 +41,9 @@
#define HSU_CH_SR_DESCTO(x) BIT(8 + (x))
#define HSU_CH_SR_DESCTO_ANY (BIT(11) | BIT(10) | BIT(9) | BIT(8))
#define HSU_CH_SR_CHE BIT(15)
#define HSU_CH_SR_DESCE(x) BIT(16 + (x))
#define HSU_CH_SR_DESCE_ANY (BIT(19) | BIT(18) | BIT(17) | BIT(16))
#define HSU_CH_SR_CDESC_ANY (BIT(31) | BIT(30))
/* Bits in HSU_CH_CR */
#define HSU_CH_CR_CHA BIT(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