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
163367c9
Commit
163367c9
authored
Jun 17, 2019
by
Ulf Hansson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixes' into next
parents
1accbced
20314ce3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
20 deletions
+25
-20
drivers/mmc/core/mmc.c
drivers/mmc/core/mmc.c
+3
-3
drivers/mmc/host/mtk-sd.c
drivers/mmc/host/mtk-sd.c
+22
-17
No files found.
drivers/mmc/core/mmc.c
View file @
163367c9
...
...
@@ -1212,13 +1212,13 @@ static int mmc_select_hs400(struct mmc_card *card)
mmc_set_timing
(
host
,
MMC_TIMING_MMC_HS400
);
mmc_set_bus_speed
(
card
);
if
(
host
->
ops
->
hs400_complete
)
host
->
ops
->
hs400_complete
(
host
);
err
=
mmc_switch_status
(
card
);
if
(
err
)
goto
out_err
;
if
(
host
->
ops
->
hs400_complete
)
host
->
ops
->
hs400_complete
(
host
);
return
0
;
out_err:
...
...
drivers/mmc/host/mtk-sd.c
View file @
163367c9
...
...
@@ -1023,6 +1023,8 @@ static void msdc_request_done(struct msdc_host *host, struct mmc_request *mrq)
msdc_track_cmd_data
(
host
,
mrq
->
cmd
,
mrq
->
data
);
if
(
mrq
->
data
)
msdc_unprepare_data
(
host
,
mrq
);
if
(
host
->
error
)
msdc_reset_hw
(
host
);
mmc_request_done
(
host
->
mmc
,
mrq
);
}
...
...
@@ -1375,24 +1377,25 @@ static void msdc_request_timeout(struct work_struct *work)
}
}
static
void
__msdc_enable_sdio_irq
(
struct
m
mc_host
*
mmc
,
int
enb
)
static
void
__msdc_enable_sdio_irq
(
struct
m
sdc_host
*
host
,
int
enb
)
{
unsigned
long
flags
;
struct
msdc_host
*
host
=
mmc_priv
(
mmc
);
spin_lock_irqsave
(
&
host
->
lock
,
flags
);
if
(
enb
)
if
(
enb
)
{
sdr_set_bits
(
host
->
base
+
MSDC_INTEN
,
MSDC_INTEN_SDIOIRQ
);
else
sdr_set_bits
(
host
->
base
+
SDC_CFG
,
SDC_CFG_SDIOIDE
);
}
else
{
sdr_clr_bits
(
host
->
base
+
MSDC_INTEN
,
MSDC_INTEN_SDIOIRQ
);
spin_unlock_irqrestore
(
&
host
->
lock
,
flags
);
sdr_clr_bits
(
host
->
base
+
SDC_CFG
,
SDC_CFG_SDIOIDE
);
}
}
static
void
msdc_enable_sdio_irq
(
struct
mmc_host
*
mmc
,
int
enb
)
{
unsigned
long
flags
;
struct
msdc_host
*
host
=
mmc_priv
(
mmc
);
__msdc_enable_sdio_irq
(
mmc
,
enb
);
spin_lock_irqsave
(
&
host
->
lock
,
flags
);
__msdc_enable_sdio_irq
(
host
,
enb
);
spin_unlock_irqrestore
(
&
host
->
lock
,
flags
);
if
(
enb
)
pm_runtime_get_noresume
(
host
->
dev
);
...
...
@@ -1414,6 +1417,8 @@ static irqreturn_t msdc_irq(int irq, void *dev_id)
spin_lock_irqsave
(
&
host
->
lock
,
flags
);
events
=
readl
(
host
->
base
+
MSDC_INT
);
event_mask
=
readl
(
host
->
base
+
MSDC_INTEN
);
if
((
events
&
event_mask
)
&
MSDC_INT_SDIOIRQ
)
__msdc_enable_sdio_irq
(
host
,
0
);
/* clear interrupts */
writel
(
events
&
event_mask
,
host
->
base
+
MSDC_INT
);
...
...
@@ -1422,10 +1427,8 @@ static irqreturn_t msdc_irq(int irq, void *dev_id)
data
=
host
->
data
;
spin_unlock_irqrestore
(
&
host
->
lock
,
flags
);
if
((
events
&
event_mask
)
&
MSDC_INT_SDIOIRQ
)
{
__msdc_enable_sdio_irq
(
host
->
mmc
,
0
);
if
((
events
&
event_mask
)
&
MSDC_INT_SDIOIRQ
)
sdio_signal_irq
(
host
->
mmc
);
}
if
((
events
&
event_mask
)
&
MSDC_INT_CDSC
)
{
if
(
host
->
internal_cd
)
...
...
@@ -1564,10 +1567,7 @@ static void msdc_init_hw(struct msdc_host *host)
sdr_set_bits
(
host
->
base
+
SDC_CFG
,
SDC_CFG_SDIO
);
/* Config SDIO device detect interrupt function */
if
(
host
->
mmc
->
caps
&
MMC_CAP_SDIO_IRQ
)
sdr_set_bits
(
host
->
base
+
SDC_CFG
,
SDC_CFG_SDIOIDE
);
else
sdr_clr_bits
(
host
->
base
+
SDC_CFG
,
SDC_CFG_SDIOIDE
);
sdr_clr_bits
(
host
->
base
+
SDC_CFG
,
SDC_CFG_SDIOIDE
);
/* Configure to default data timeout */
sdr_set_field
(
host
->
base
+
SDC_CFG
,
SDC_CFG_DTOC
,
3
);
...
...
@@ -2095,7 +2095,12 @@ static void msdc_hw_reset(struct mmc_host *mmc)
static
void
msdc_ack_sdio_irq
(
struct
mmc_host
*
mmc
)
{
__msdc_enable_sdio_irq
(
mmc
,
1
);
unsigned
long
flags
;
struct
msdc_host
*
host
=
mmc_priv
(
mmc
);
spin_lock_irqsave
(
&
host
->
lock
,
flags
);
__msdc_enable_sdio_irq
(
host
,
1
);
spin_unlock_irqrestore
(
&
host
->
lock
,
flags
);
}
static
int
msdc_get_cd
(
struct
mmc_host
*
mmc
)
...
...
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