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
92f07e5c
Commit
92f07e5c
authored
Jan 16, 2020
by
Ulf Hansson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixes' into next
parents
1b21a701
27f4e1e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
19 deletions
+35
-19
drivers/mmc/host/sdhci_am654.c
drivers/mmc/host/sdhci_am654.c
+35
-19
No files found.
drivers/mmc/host/sdhci_am654.c
View file @
92f07e5c
...
...
@@ -240,6 +240,35 @@ static void sdhci_am654_write_b(struct sdhci_host *host, u8 val, int reg)
writeb
(
val
,
host
->
ioaddr
+
reg
);
}
static
int
sdhci_am654_execute_tuning
(
struct
mmc_host
*
mmc
,
u32
opcode
)
{
struct
sdhci_host
*
host
=
mmc_priv
(
mmc
);
int
err
=
sdhci_execute_tuning
(
mmc
,
opcode
);
if
(
err
)
return
err
;
/*
* Tuning data remains in the buffer after tuning.
* Do a command and data reset to get rid of it
*/
sdhci_reset
(
host
,
SDHCI_RESET_CMD
|
SDHCI_RESET_DATA
);
return
0
;
}
static
u32
sdhci_am654_cqhci_irq
(
struct
sdhci_host
*
host
,
u32
intmask
)
{
int
cmd_error
=
0
;
int
data_error
=
0
;
if
(
!
sdhci_cqe_irq
(
host
,
intmask
,
&
cmd_error
,
&
data_error
))
return
intmask
;
cqhci_irq
(
host
->
mmc
,
intmask
,
cmd_error
,
data_error
);
return
0
;
}
static
struct
sdhci_ops
sdhci_am654_ops
=
{
.
get_max_clock
=
sdhci_pltfm_clk_get_max_clock
,
.
get_timeout_clock
=
sdhci_pltfm_clk_get_max_clock
,
...
...
@@ -248,13 +277,13 @@ static struct sdhci_ops sdhci_am654_ops = {
.
set_power
=
sdhci_am654_set_power
,
.
set_clock
=
sdhci_am654_set_clock
,
.
write_b
=
sdhci_am654_write_b
,
.
irq
=
sdhci_am654_cqhci_irq
,
.
reset
=
sdhci_reset
,
};
static
const
struct
sdhci_pltfm_data
sdhci_am654_pdata
=
{
.
ops
=
&
sdhci_am654_ops
,
.
quirks
=
SDHCI_QUIRK_INVERTED_WRITE_PROTECT
|
SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12
,
.
quirks
=
SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12
,
.
quirks2
=
SDHCI_QUIRK2_PRESET_VALUE_BROKEN
,
};
...
...
@@ -263,19 +292,6 @@ static const struct sdhci_am654_driver_data sdhci_am654_drvdata = {
.
flags
=
IOMUX_PRESENT
|
FREQSEL_2_BIT
|
STRBSEL_4_BIT
|
DLL_PRESENT
,
};
static
u32
sdhci_am654_cqhci_irq
(
struct
sdhci_host
*
host
,
u32
intmask
)
{
int
cmd_error
=
0
;
int
data_error
=
0
;
if
(
!
sdhci_cqe_irq
(
host
,
intmask
,
&
cmd_error
,
&
data_error
))
return
intmask
;
cqhci_irq
(
host
->
mmc
,
intmask
,
cmd_error
,
data_error
);
return
0
;
}
static
struct
sdhci_ops
sdhci_j721e_8bit_ops
=
{
.
get_max_clock
=
sdhci_pltfm_clk_get_max_clock
,
.
get_timeout_clock
=
sdhci_pltfm_clk_get_max_clock
,
...
...
@@ -290,8 +306,7 @@ static struct sdhci_ops sdhci_j721e_8bit_ops = {
static
const
struct
sdhci_pltfm_data
sdhci_j721e_8bit_pdata
=
{
.
ops
=
&
sdhci_j721e_8bit_ops
,
.
quirks
=
SDHCI_QUIRK_INVERTED_WRITE_PROTECT
|
SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12
,
.
quirks
=
SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12
,
.
quirks2
=
SDHCI_QUIRK2_PRESET_VALUE_BROKEN
,
};
...
...
@@ -314,8 +329,7 @@ static struct sdhci_ops sdhci_j721e_4bit_ops = {
static
const
struct
sdhci_pltfm_data
sdhci_j721e_4bit_pdata
=
{
.
ops
=
&
sdhci_j721e_4bit_ops
,
.
quirks
=
SDHCI_QUIRK_INVERTED_WRITE_PROTECT
|
SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12
,
.
quirks
=
SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12
,
.
quirks2
=
SDHCI_QUIRK2_PRESET_VALUE_BROKEN
,
};
...
...
@@ -547,6 +561,8 @@ static int sdhci_am654_probe(struct platform_device *pdev)
goto
pm_runtime_put
;
}
host
->
mmc_host_ops
.
execute_tuning
=
sdhci_am654_execute_tuning
;
ret
=
sdhci_am654_init
(
host
);
if
(
ret
)
goto
pm_runtime_put
;
...
...
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