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
Kirill Smelkov
linux
Commits
3c5b742f
Commit
3c5b742f
authored
Dec 20, 2021
by
Ulf Hansson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixes' into next
parents
5479a013
f89b548c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
1 deletion
+32
-1
drivers/mmc/core/core.c
drivers/mmc/core/core.c
+6
-1
drivers/mmc/core/core.h
drivers/mmc/core/core.h
+1
-0
drivers/mmc/core/host.c
drivers/mmc/core/host.c
+9
-0
drivers/mmc/host/meson-mx-sdhc-mmc.c
drivers/mmc/host/meson-mx-sdhc-mmc.c
+16
-0
No files found.
drivers/mmc/core/core.c
View file @
3c5b742f
...
...
@@ -2264,7 +2264,7 @@ void mmc_start_host(struct mmc_host *host)
_mmc_detect_change
(
host
,
0
,
false
);
}
void
mmc_stop_host
(
struct
mmc_host
*
host
)
void
__
mmc_stop_host
(
struct
mmc_host
*
host
)
{
if
(
host
->
slot
.
cd_irq
>=
0
)
{
mmc_gpio_set_cd_wake
(
host
,
false
);
...
...
@@ -2273,6 +2273,11 @@ void mmc_stop_host(struct mmc_host *host)
host
->
rescan_disable
=
1
;
cancel_delayed_work_sync
(
&
host
->
detect
);
}
void
mmc_stop_host
(
struct
mmc_host
*
host
)
{
__mmc_stop_host
(
host
);
/* clear pm flags now and let card drivers set them as needed */
host
->
pm_flags
=
0
;
...
...
drivers/mmc/core/core.h
View file @
3c5b742f
...
...
@@ -70,6 +70,7 @@ static inline void mmc_delay(unsigned int ms)
void
mmc_rescan
(
struct
work_struct
*
work
);
void
mmc_start_host
(
struct
mmc_host
*
host
);
void
__mmc_stop_host
(
struct
mmc_host
*
host
);
void
mmc_stop_host
(
struct
mmc_host
*
host
);
void
_mmc_detect_change
(
struct
mmc_host
*
host
,
unsigned
long
delay
,
...
...
drivers/mmc/core/host.c
View file @
3c5b742f
...
...
@@ -80,9 +80,18 @@ static void mmc_host_classdev_release(struct device *dev)
kfree
(
host
);
}
static
int
mmc_host_classdev_shutdown
(
struct
device
*
dev
)
{
struct
mmc_host
*
host
=
cls_dev_to_mmc_host
(
dev
);
__mmc_stop_host
(
host
);
return
0
;
}
static
struct
class
mmc_host_class
=
{
.
name
=
"mmc_host"
,
.
dev_release
=
mmc_host_classdev_release
,
.
shutdown_pre
=
mmc_host_classdev_shutdown
,
.
pm
=
MMC_HOST_CLASS_DEV_PM_OPS
,
};
...
...
drivers/mmc/host/meson-mx-sdhc-mmc.c
View file @
3c5b742f
...
...
@@ -135,6 +135,7 @@ static void meson_mx_sdhc_start_cmd(struct mmc_host *mmc,
struct
mmc_command
*
cmd
)
{
struct
meson_mx_sdhc_host
*
host
=
mmc_priv
(
mmc
);
bool
manual_stop
=
false
;
u32
ictl
,
send
;
int
pack_len
;
...
...
@@ -172,12 +173,27 @@ static void meson_mx_sdhc_start_cmd(struct mmc_host *mmc,
else
/* software flush: */
ictl
|=
MESON_SDHC_ICTL_DATA_XFER_OK
;
/*
* Mimic the logic from the vendor driver where (only)
* SD_IO_RW_EXTENDED commands with more than one block set the
* MESON_SDHC_MISC_MANUAL_STOP bit. This fixes the firmware
* download in the brcmfmac driver for a BCM43362/1 card.
* Without this sdio_memcpy_toio() (with a size of 219557
* bytes) times out if MESON_SDHC_MISC_MANUAL_STOP is not set.
*/
manual_stop
=
cmd
->
data
->
blocks
>
1
&&
cmd
->
opcode
==
SD_IO_RW_EXTENDED
;
}
else
{
pack_len
=
0
;
ictl
|=
MESON_SDHC_ICTL_RESP_OK
;
}
regmap_update_bits
(
host
->
regmap
,
MESON_SDHC_MISC
,
MESON_SDHC_MISC_MANUAL_STOP
,
manual_stop
?
MESON_SDHC_MISC_MANUAL_STOP
:
0
);
if
(
cmd
->
opcode
==
MMC_STOP_TRANSMISSION
)
send
|=
MESON_SDHC_SEND_DATA_STOP
;
...
...
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