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
ab2528c1
Commit
ab2528c1
authored
Apr 10, 2018
by
Vinod Koul
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/imx' into for-linus
parents
238eed66
2746e2c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
drivers/dma/imx-sdma.c
drivers/dma/imx-sdma.c
+21
-0
No files found.
drivers/dma/imx-sdma.c
View file @
ab2528c1
...
...
@@ -338,6 +338,7 @@ struct sdma_channel {
unsigned
int
chn_real_count
;
struct
tasklet_struct
tasklet
;
struct
imx_dma_data
data
;
bool
enabled
;
};
#define IMX_DMA_SG_LOOP BIT(0)
...
...
@@ -596,7 +597,14 @@ static int sdma_config_ownership(struct sdma_channel *sdmac,
static
void
sdma_enable_channel
(
struct
sdma_engine
*
sdma
,
int
channel
)
{
unsigned
long
flags
;
struct
sdma_channel
*
sdmac
=
&
sdma
->
channel
[
channel
];
writel
(
BIT
(
channel
),
sdma
->
regs
+
SDMA_H_START
);
spin_lock_irqsave
(
&
sdmac
->
lock
,
flags
);
sdmac
->
enabled
=
true
;
spin_unlock_irqrestore
(
&
sdmac
->
lock
,
flags
);
}
/*
...
...
@@ -685,6 +693,14 @@ static void sdma_update_channel_loop(struct sdma_channel *sdmac)
struct
sdma_buffer_descriptor
*
bd
;
int
error
=
0
;
enum
dma_status
old_status
=
sdmac
->
status
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
sdmac
->
lock
,
flags
);
if
(
!
sdmac
->
enabled
)
{
spin_unlock_irqrestore
(
&
sdmac
->
lock
,
flags
);
return
;
}
spin_unlock_irqrestore
(
&
sdmac
->
lock
,
flags
);
/*
* loop mode. Iterate over descriptors, re-setup them and
...
...
@@ -938,10 +954,15 @@ static int sdma_disable_channel(struct dma_chan *chan)
struct
sdma_channel
*
sdmac
=
to_sdma_chan
(
chan
);
struct
sdma_engine
*
sdma
=
sdmac
->
sdma
;
int
channel
=
sdmac
->
channel
;
unsigned
long
flags
;
writel_relaxed
(
BIT
(
channel
),
sdma
->
regs
+
SDMA_H_STATSTOP
);
sdmac
->
status
=
DMA_ERROR
;
spin_lock_irqsave
(
&
sdmac
->
lock
,
flags
);
sdmac
->
enabled
=
false
;
spin_unlock_irqrestore
(
&
sdmac
->
lock
,
flags
);
return
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