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
01e421fe
Commit
01e421fe
authored
Dec 17, 2018
by
Ulf Hansson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixes' into next
parents
961de0a8
e3ae3401
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
16 deletions
+32
-16
drivers/mmc/core/mmc.c
drivers/mmc/core/mmc.c
+15
-9
drivers/mmc/host/omap_hsmmc.c
drivers/mmc/host/omap_hsmmc.c
+11
-1
drivers/mmc/host/sdhci-tegra.c
drivers/mmc/host/sdhci-tegra.c
+4
-4
drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.c
+2
-2
No files found.
drivers/mmc/core/mmc.c
View file @
01e421fe
...
...
@@ -30,6 +30,7 @@
#include "pwrseq.h"
#define DEFAULT_CMD6_TIMEOUT_MS 500
#define MIN_CACHE_EN_TIMEOUT_MS 1600
static
const
unsigned
int
tran_exp
[]
=
{
10000
,
100000
,
1000000
,
10000000
,
...
...
@@ -526,8 +527,7 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)
card
->
cid
.
year
+=
16
;
/* check whether the eMMC card supports BKOPS */
if
(
!
mmc_card_broken_hpi
(
card
)
&&
ext_csd
[
EXT_CSD_BKOPS_SUPPORT
]
&
0x1
)
{
if
(
ext_csd
[
EXT_CSD_BKOPS_SUPPORT
]
&
0x1
)
{
card
->
ext_csd
.
bkops
=
1
;
card
->
ext_csd
.
man_bkops_en
=
(
ext_csd
[
EXT_CSD_BKOPS_EN
]
&
...
...
@@ -1785,20 +1785,26 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
if
(
err
)
{
pr_warn
(
"%s: Enabling HPI failed
\n
"
,
mmc_hostname
(
card
->
host
));
card
->
ext_csd
.
hpi_en
=
0
;
err
=
0
;
}
else
}
else
{
card
->
ext_csd
.
hpi_en
=
1
;
}
}
/*
* If cache size is higher than 0, this indicates
* the existence of cache and it can be turned on.
* If cache size is higher than 0, this indicates the existence of cache
* and it can be turned on. Note that some eMMCs from Micron has been
* reported to need ~800 ms timeout, while enabling the cache after
* sudden power failure tests. Let's extend the timeout to a minimum of
* DEFAULT_CACHE_EN_TIMEOUT_MS and do it for all cards.
*/
if
(
!
mmc_card_broken_hpi
(
card
)
&&
card
->
ext_csd
.
cache_size
>
0
)
{
if
(
card
->
ext_csd
.
cache_size
>
0
)
{
unsigned
int
timeout_ms
=
MIN_CACHE_EN_TIMEOUT_MS
;
timeout_ms
=
max
(
card
->
ext_csd
.
generic_cmd6_time
,
timeout_ms
);
err
=
mmc_switch
(
card
,
EXT_CSD_CMD_SET_NORMAL
,
EXT_CSD_CACHE_CTRL
,
1
,
card
->
ext_csd
.
generic_cmd6_time
);
EXT_CSD_CACHE_CTRL
,
1
,
timeout_ms
);
if
(
err
&&
err
!=
-
EBADMSG
)
goto
free_card
;
...
...
drivers/mmc/host/omap_hsmmc.c
View file @
01e421fe
...
...
@@ -1899,7 +1899,6 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
mmc
->
max_blk_size
=
512
;
/* Block Length at max can be 1024 */
mmc
->
max_blk_count
=
0xFFFF
;
/* No. of Blocks is 16 bits */
mmc
->
max_req_size
=
mmc
->
max_blk_size
*
mmc
->
max_blk_count
;
mmc
->
max_seg_size
=
mmc
->
max_req_size
;
mmc
->
caps
|=
MMC_CAP_MMC_HIGHSPEED
|
MMC_CAP_SD_HIGHSPEED
|
MMC_CAP_WAIT_WHILE_BUSY
|
MMC_CAP_ERASE
|
MMC_CAP_CMD23
;
...
...
@@ -1929,6 +1928,17 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
goto
err_irq
;
}
/*
* Limit the maximum segment size to the lower of the request size
* and the DMA engine device segment size limits. In reality, with
* 32-bit transfers, the DMA engine can do longer segments than this
* but there is no way to represent that in the DMA model - if we
* increase this figure here, we get warnings from the DMA API debug.
*/
mmc
->
max_seg_size
=
min3
(
mmc
->
max_req_size
,
dma_get_max_seg_size
(
host
->
rx_chan
->
device
->
dev
),
dma_get_max_seg_size
(
host
->
tx_chan
->
device
->
dev
));
/* Request IRQ for MMC operations */
ret
=
devm_request_irq
(
&
pdev
->
dev
,
host
->
irq
,
omap_hsmmc_irq
,
0
,
mmc_hostname
(
mmc
),
host
);
...
...
drivers/mmc/host/sdhci-tegra.c
View file @
01e421fe
...
...
@@ -510,25 +510,25 @@ static void tegra_sdhci_parse_pad_autocal_dt(struct sdhci_host *host)
err
=
device_property_read_u32
(
host
->
mmc
->
parent
,
"nvidia,pad-autocal-pull-up-offset-3v3-timeout"
,
&
autocal
->
pull_up_3v3
);
&
autocal
->
pull_up_3v3
_timeout
);
if
(
err
)
autocal
->
pull_up_3v3_timeout
=
0
;
err
=
device_property_read_u32
(
host
->
mmc
->
parent
,
"nvidia,pad-autocal-pull-down-offset-3v3-timeout"
,
&
autocal
->
pull_down_3v3
);
&
autocal
->
pull_down_3v3
_timeout
);
if
(
err
)
autocal
->
pull_down_3v3_timeout
=
0
;
err
=
device_property_read_u32
(
host
->
mmc
->
parent
,
"nvidia,pad-autocal-pull-up-offset-1v8-timeout"
,
&
autocal
->
pull_up_1v8
);
&
autocal
->
pull_up_1v8
_timeout
);
if
(
err
)
autocal
->
pull_up_1v8_timeout
=
0
;
err
=
device_property_read_u32
(
host
->
mmc
->
parent
,
"nvidia,pad-autocal-pull-down-offset-1v8-timeout"
,
&
autocal
->
pull_down_1v8
);
&
autocal
->
pull_down_1v8
_timeout
);
if
(
err
)
autocal
->
pull_down_1v8_timeout
=
0
;
...
...
drivers/mmc/host/sdhci.c
View file @
01e421fe
...
...
@@ -127,12 +127,12 @@ static void sdhci_do_enable_v4_mode(struct sdhci_host *host)
{
u16
ctrl2
;
ctrl2
=
sdhci_read
b
(
host
,
SDHCI_HOST_CONTROL2
);
ctrl2
=
sdhci_read
w
(
host
,
SDHCI_HOST_CONTROL2
);
if
(
ctrl2
&
SDHCI_CTRL_V4_MODE
)
return
;
ctrl2
|=
SDHCI_CTRL_V4_MODE
;
sdhci_write
b
(
host
,
ctrl2
,
SDHCI_HOST_CONTROL
);
sdhci_write
w
(
host
,
ctrl2
,
SDHCI_HOST_CONTROL2
);
}
/*
...
...
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