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
8dfc27af
Commit
8dfc27af
authored
May 17, 2016
by
Vinod Koul
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/hsu' into for-linus
parents
56214883
17b3cf42
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
drivers/dma/hsu/hsu.c
drivers/dma/hsu/hsu.c
+5
-3
drivers/dma/hsu/hsu.h
drivers/dma/hsu/hsu.h
+4
-0
No files found.
drivers/dma/hsu/hsu.c
View file @
8dfc27af
...
@@ -77,8 +77,8 @@ static void hsu_dma_chan_start(struct hsu_dma_chan *hsuc)
...
@@ -77,8 +77,8 @@ static void hsu_dma_chan_start(struct hsu_dma_chan *hsuc)
hsu_chan_writel
(
hsuc
,
HSU_CH_MTSR
,
mtsr
);
hsu_chan_writel
(
hsuc
,
HSU_CH_MTSR
,
mtsr
);
/* Set descriptors */
/* Set descriptors */
count
=
(
desc
->
nents
-
desc
->
active
)
%
HSU_DMA_CHAN_NR_DESC
;
count
=
desc
->
nents
-
desc
->
active
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
for
(
i
=
0
;
i
<
count
&&
i
<
HSU_DMA_CHAN_NR_DESC
;
i
++
)
{
hsu_chan_writel
(
hsuc
,
HSU_CH_DxSAR
(
i
),
desc
->
sg
[
i
].
addr
);
hsu_chan_writel
(
hsuc
,
HSU_CH_DxSAR
(
i
),
desc
->
sg
[
i
].
addr
);
hsu_chan_writel
(
hsuc
,
HSU_CH_DxTSR
(
i
),
desc
->
sg
[
i
].
len
);
hsu_chan_writel
(
hsuc
,
HSU_CH_DxTSR
(
i
),
desc
->
sg
[
i
].
len
);
...
@@ -160,7 +160,7 @@ irqreturn_t hsu_dma_irq(struct hsu_dma_chip *chip, unsigned short nr)
...
@@ -160,7 +160,7 @@ irqreturn_t hsu_dma_irq(struct hsu_dma_chip *chip, unsigned short nr)
return
IRQ_NONE
;
return
IRQ_NONE
;
/* Timeout IRQ, need wait some time, see Errata 2 */
/* Timeout IRQ, need wait some time, see Errata 2 */
if
(
hsuc
->
direction
==
DMA_DEV_TO_MEM
&&
(
sr
&
HSU_CH_SR_DESCTO_ANY
)
)
if
(
sr
&
HSU_CH_SR_DESCTO_ANY
)
udelay
(
2
);
udelay
(
2
);
sr
&=
~
HSU_CH_SR_DESCTO_ANY
;
sr
&=
~
HSU_CH_SR_DESCTO_ANY
;
...
@@ -417,6 +417,8 @@ int hsu_dma_probe(struct hsu_dma_chip *chip)
...
@@ -417,6 +417,8 @@ int hsu_dma_probe(struct hsu_dma_chip *chip)
hsu
->
dma
.
dev
=
chip
->
dev
;
hsu
->
dma
.
dev
=
chip
->
dev
;
dma_set_max_seg_size
(
hsu
->
dma
.
dev
,
HSU_CH_DxTSR_MASK
);
ret
=
dma_async_device_register
(
&
hsu
->
dma
);
ret
=
dma_async_device_register
(
&
hsu
->
dma
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
...
drivers/dma/hsu/hsu.h
View file @
8dfc27af
...
@@ -55,6 +55,10 @@
...
@@ -55,6 +55,10 @@
#define HSU_CH_DCR_CHEI BIT(23)
#define HSU_CH_DCR_CHEI BIT(23)
#define HSU_CH_DCR_CHTOI(x) BIT(24 + (x))
#define HSU_CH_DCR_CHTOI(x) BIT(24 + (x))
/* Bits in HSU_CH_DxTSR */
#define HSU_CH_DxTSR_MASK GENMASK(15, 0)
#define HSU_CH_DxTSR_TSR(x) ((x) & HSU_CH_DxTSR_MASK)
struct
hsu_dma_sg
{
struct
hsu_dma_sg
{
dma_addr_t
addr
;
dma_addr_t
addr
;
unsigned
int
len
;
unsigned
int
len
;
...
...
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