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
0a4bbddd
Commit
0a4bbddd
authored
Dec 07, 2010
by
Dan Williams
Browse files
Options
Browse Files
Download
Plain Diff
Merge branches 'fsldma' and 'intel-mid' into dmaengine
parents
c989a7fc
e2c8e425
0be035f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
10 deletions
+27
-10
drivers/dma/fsldma.c
drivers/dma/fsldma.c
+3
-1
drivers/dma/intel_mid_dma.c
drivers/dma/intel_mid_dma.c
+24
-9
No files found.
drivers/dma/fsldma.c
View file @
0a4bbddd
/*
* Freescale MPC85xx, MPC83xx DMA Engine support
*
* Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
* Copyright (C) 2007
-2010
Freescale Semiconductor, Inc. All rights reserved.
*
* Author:
* Zhang Wei <wei.zhang@freescale.com>, Jul 2007
...
...
@@ -1322,6 +1322,8 @@ static int __devinit fsldma_of_probe(struct platform_device *op,
fdev
->
common
.
device_control
=
fsl_dma_device_control
;
fdev
->
common
.
dev
=
&
op
->
dev
;
dma_set_mask
(
&
(
op
->
dev
),
DMA_BIT_MASK
(
36
));
dev_set_drvdata
(
&
op
->
dev
,
fdev
);
/*
...
...
drivers/dma/intel_mid_dma.c
View file @
0a4bbddd
...
...
@@ -664,11 +664,20 @@ static struct dma_async_tx_descriptor *intel_mid_dma_prep_memcpy(
/*calculate CTL_LO*/
ctl_lo
.
ctl_lo
=
0
;
ctl_lo
.
ctlx
.
int_en
=
1
;
ctl_lo
.
ctlx
.
dst_tr_width
=
mids
->
dma_slave
.
dst_addr_width
;
ctl_lo
.
ctlx
.
src_tr_width
=
mids
->
dma_slave
.
src_addr_width
;
ctl_lo
.
ctlx
.
dst_msize
=
mids
->
dma_slave
.
src_maxburst
;
ctl_lo
.
ctlx
.
src_msize
=
mids
->
dma_slave
.
dst_maxburst
;
/*
* Here we need some translation from "enum dma_slave_buswidth"
* to the format for our dma controller
* standard intel_mid_dmac's format
* 1 Byte 0b000
* 2 Bytes 0b001
* 4 Bytes 0b010
*/
ctl_lo
.
ctlx
.
dst_tr_width
=
mids
->
dma_slave
.
dst_addr_width
/
2
;
ctl_lo
.
ctlx
.
src_tr_width
=
mids
->
dma_slave
.
src_addr_width
/
2
;
if
(
mids
->
cfg_mode
==
LNW_DMA_MEM_TO_MEM
)
{
ctl_lo
.
ctlx
.
tt_fc
=
0
;
ctl_lo
.
ctlx
.
sinc
=
0
;
...
...
@@ -746,8 +755,18 @@ static struct dma_async_tx_descriptor *intel_mid_dma_prep_slave_sg(
BUG_ON
(
!
mids
);
if
(
!
midc
->
dma
->
pimr_mask
)
{
pr_debug
(
"MDMA: SG list is not supported by this controller
\n
"
);
return
NULL
;
/* We can still handle sg list with only one item */
if
(
sg_len
==
1
)
{
txd
=
intel_mid_dma_prep_memcpy
(
chan
,
mids
->
dma_slave
.
dst_addr
,
mids
->
dma_slave
.
src_addr
,
sgl
->
length
,
flags
);
return
txd
;
}
else
{
pr_warn
(
"MDMA: SG list is not supported by this controller
\n
"
);
return
NULL
;
}
}
pr_debug
(
"MDMA: SG Length = %d, direction = %d, Flags = %#lx
\n
"
,
...
...
@@ -758,6 +777,7 @@ static struct dma_async_tx_descriptor *intel_mid_dma_prep_slave_sg(
pr_err
(
"MDMA: Prep memcpy failed
\n
"
);
return
NULL
;
}
desc
=
to_intel_mid_dma_desc
(
txd
);
desc
->
dirn
=
direction
;
ctl_lo
.
ctl_lo
=
desc
->
ctl_lo
;
...
...
@@ -1021,11 +1041,6 @@ static irqreturn_t intel_mid_dma_interrupt(int irq, void *data)
/*DMA Interrupt*/
pr_debug
(
"MDMA:Got an interrupt on irq %d
\n
"
,
irq
);
if
(
!
mid
)
{
pr_err
(
"ERR_MDMA:null pointer mid
\n
"
);
return
-
EINVAL
;
}
pr_debug
(
"MDMA: Status %x, Mask %x
\n
"
,
tfr_status
,
mid
->
intr_mask
);
tfr_status
&=
mid
->
intr_mask
;
if
(
tfr_status
)
{
...
...
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