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
62d02e41
Commit
62d02e41
authored
Oct 03, 2014
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'spi/fix/rockchip' into spi-linus
parents
fe82dcec
a24e70c0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
drivers/spi/spi-rockchip.c
drivers/spi/spi-rockchip.c
+7
-8
No files found.
drivers/spi/spi-rockchip.c
View file @
62d02e41
...
...
@@ -415,7 +415,7 @@ static void rockchip_spi_dma_txcb(void *data)
spin_unlock_irqrestore
(
&
rs
->
lock
,
flags
);
}
static
int
rockchip_spi_dma_transfer
(
struct
rockchip_spi
*
rs
)
static
void
rockchip_spi_prepare_dma
(
struct
rockchip_spi
*
rs
)
{
unsigned
long
flags
;
struct
dma_slave_config
rxconf
,
txconf
;
...
...
@@ -474,8 +474,6 @@ static int rockchip_spi_dma_transfer(struct rockchip_spi *rs)
dmaengine_submit
(
txdesc
);
dma_async_issue_pending
(
rs
->
dma_tx
.
ch
);
}
return
1
;
}
static
void
rockchip_spi_config
(
struct
rockchip_spi
*
rs
)
...
...
@@ -557,16 +555,17 @@ static int rockchip_spi_transfer_one(
else
if
(
rs
->
rx
)
rs
->
tmode
=
CR0_XFM_RO
;
if
(
master
->
can_dma
&&
master
->
can_dma
(
master
,
spi
,
xfer
))
/* we need prepare dma before spi was enabled */
if
(
master
->
can_dma
&&
master
->
can_dma
(
master
,
spi
,
xfer
))
{
rs
->
use_dma
=
1
;
else
rockchip_spi_prepare_dma
(
rs
);
}
else
{
rs
->
use_dma
=
0
;
}
rockchip_spi_config
(
rs
);
if
(
rs
->
use_dma
)
ret
=
rockchip_spi_dma_transfer
(
rs
);
else
if
(
!
rs
->
use_dma
)
ret
=
rockchip_spi_pio_transfer
(
rs
);
return
ret
;
...
...
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