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
faf73fa1
Commit
faf73fa1
authored
Oct 30, 2017
by
Ulf Hansson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixes' into next
parents
35ed78a0
48e1dc10
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
7 deletions
+23
-7
drivers/mmc/host/renesas_sdhi_internal_dmac.c
drivers/mmc/host/renesas_sdhi_internal_dmac.c
+10
-7
drivers/mmc/host/tmio_mmc_core.c
drivers/mmc/host/tmio_mmc_core.c
+13
-0
No files found.
drivers/mmc/host/renesas_sdhi_internal_dmac.c
View file @
faf73fa1
...
...
@@ -146,11 +146,8 @@ renesas_sdhi_internal_dmac_start_dma(struct tmio_mmc_host *host,
WARN_ON
(
host
->
sg_len
>
1
);
/* This DMAC cannot handle if buffer is not 8-bytes alignment */
if
(
!
IS_ALIGNED
(
sg
->
offset
,
8
))
{
host
->
force_pio
=
true
;
renesas_sdhi_internal_dmac_enable_dma
(
host
,
false
);
return
;
}
if
(
!
IS_ALIGNED
(
sg
->
offset
,
8
))
goto
force_pio
;
if
(
data
->
flags
&
MMC_DATA_READ
)
{
dtran_mode
|=
DTRAN_MODE_CH_NUM_CH1
;
...
...
@@ -163,8 +160,8 @@ renesas_sdhi_internal_dmac_start_dma(struct tmio_mmc_host *host,
}
ret
=
dma_map_sg
(
&
host
->
pdev
->
dev
,
sg
,
host
->
sg_len
,
dir
);
if
(
ret
<
0
)
return
;
if
(
ret
==
0
)
goto
force_pio
;
renesas_sdhi_internal_dmac_enable_dma
(
host
,
true
);
...
...
@@ -176,6 +173,12 @@ renesas_sdhi_internal_dmac_start_dma(struct tmio_mmc_host *host,
dtran_mode
);
renesas_sdhi_internal_dmac_dm_write
(
host
,
DM_DTRAN_ADDR
,
sg
->
dma_address
);
return
;
force_pio:
host
->
force_pio
=
true
;
renesas_sdhi_internal_dmac_enable_dma
(
host
,
false
);
}
static
void
renesas_sdhi_internal_dmac_issue_tasklet_fn
(
unsigned
long
arg
)
...
...
drivers/mmc/host/tmio_mmc_core.c
View file @
faf73fa1
...
...
@@ -47,6 +47,7 @@
#include <linux/mmc/sdio.h>
#include <linux/scatterlist.h>
#include <linux/spinlock.h>
#include <linux/swiotlb.h>
#include <linux/workqueue.h>
#include "tmio_mmc.h"
...
...
@@ -1215,6 +1216,18 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host,
mmc
->
max_blk_count
=
pdata
->
max_blk_count
?
:
(
PAGE_SIZE
/
mmc
->
max_blk_size
)
*
mmc
->
max_segs
;
mmc
->
max_req_size
=
mmc
->
max_blk_size
*
mmc
->
max_blk_count
;
/*
* Since swiotlb has memory size limitation, this will calculate
* the maximum size locally (because we don't have any APIs for it now)
* and check the current max_req_size. And then, this will update
* the max_req_size if needed as a workaround.
*/
if
(
swiotlb_max_segment
())
{
unsigned
int
max_size
=
(
1
<<
IO_TLB_SHIFT
)
*
IO_TLB_SEGSIZE
;
if
(
mmc
->
max_req_size
>
max_size
)
mmc
->
max_req_size
=
max_size
;
}
mmc
->
max_seg_size
=
mmc
->
max_req_size
;
_host
->
native_hotplug
=
!
(
pdata
->
flags
&
TMIO_MMC_USE_GPIO_CD
||
...
...
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