Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
OpenBMC Firmware
talos-obmc-linux
Commits
8e42ac81
Commit
8e42ac81
authored
9 years ago
by
Mark Brown
Browse files
Options
Download
Plain Diff
Merge remote-tracking branch 'spi/topic/dma' into spi-next
parents
bc645099
c37f45b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
drivers/spi/spi.c
drivers/spi/spi.c
+18
-4
No files found.
drivers/spi/spi.c
View file @
8e42ac81
...
...
@@ -539,8 +539,15 @@ static int __spi_map_msg(struct spi_master *master, struct spi_message *msg)
if
(
!
master
->
can_dma
)
return
0
;
tx_dev
=
master
->
dma_tx
->
device
->
dev
;
rx_dev
=
master
->
dma_rx
->
device
->
dev
;
if
(
master
->
dma_tx
)
tx_dev
=
master
->
dma_tx
->
device
->
dev
;
else
tx_dev
=
&
master
->
dev
;
if
(
master
->
dma_rx
)
rx_dev
=
master
->
dma_rx
->
device
->
dev
;
else
rx_dev
=
&
master
->
dev
;
list_for_each_entry
(
xfer
,
&
msg
->
transfers
,
transfer_list
)
{
if
(
!
master
->
can_dma
(
master
,
msg
->
spi
,
xfer
))
...
...
@@ -579,8 +586,15 @@ static int __spi_unmap_msg(struct spi_master *master, struct spi_message *msg)
if
(
!
master
->
cur_msg_mapped
||
!
master
->
can_dma
)
return
0
;
tx_dev
=
master
->
dma_tx
->
device
->
dev
;
rx_dev
=
master
->
dma_rx
->
device
->
dev
;
if
(
master
->
dma_tx
)
tx_dev
=
master
->
dma_tx
->
device
->
dev
;
else
tx_dev
=
&
master
->
dev
;
if
(
master
->
dma_rx
)
rx_dev
=
master
->
dma_rx
->
device
->
dev
;
else
rx_dev
=
&
master
->
dev
;
list_for_each_entry
(
xfer
,
&
msg
->
transfers
,
transfer_list
)
{
if
(
!
master
->
can_dma
(
master
,
msg
->
spi
,
xfer
))
...
...
This diff is collapsed.
Click to expand it.
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