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
4a3cba32
Commit
4a3cba32
authored
Jul 29, 2008
by
Pierre Ossman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sdhci: handle bug in JMB38x for sizes < 4 bytes
Signed-off-by:
Pierre Ossman
<
drzeus@drzeus.cx
>
parent
94ad374a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
drivers/mmc/host/sdhci-pci.c
drivers/mmc/host/sdhci-pci.c
+2
-1
drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.c
+9
-0
drivers/mmc/host/sdhci.h
drivers/mmc/host/sdhci.h
+2
-0
No files found.
drivers/mmc/host/sdhci-pci.c
View file @
4a3cba32
...
...
@@ -143,7 +143,8 @@ static int jmicron_probe(struct sdhci_pci_chip *chip)
chip
->
quirks
|=
SDHCI_QUIRK_32BIT_DMA_ADDR
|
SDHCI_QUIRK_32BIT_DMA_SIZE
|
SDHCI_QUIRK_32BIT_ADMA_SIZE
|
SDHCI_QUIRK_RESET_AFTER_REQUEST
;
SDHCI_QUIRK_RESET_AFTER_REQUEST
|
SDHCI_QUIRK_BROKEN_SMALL_PIO
;
}
/*
...
...
drivers/mmc/host/sdhci.c
View file @
4a3cba32
...
...
@@ -278,6 +278,15 @@ static void sdhci_transfer_pio(struct sdhci_host *host)
else
mask
=
SDHCI_SPACE_AVAILABLE
;
/*
* Some controllers (JMicron JMB38x) mess up the buffer bits
* for transfers < 4 bytes. As long as it is just one block,
* we can ignore the bits.
*/
if
((
host
->
quirks
&
SDHCI_QUIRK_BROKEN_SMALL_PIO
)
&&
(
host
->
data
->
blocks
==
1
))
mask
=
~
0
;
while
(
readl
(
host
->
ioaddr
+
SDHCI_PRESENT_STATE
)
&
mask
)
{
if
(
host
->
data
->
flags
&
MMC_DATA_READ
)
sdhci_read_block_pio
(
host
);
...
...
drivers/mmc/host/sdhci.h
View file @
4a3cba32
...
...
@@ -206,6 +206,8 @@ struct sdhci_host {
#define SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER (1<<11)
/* Controller provides an incorrect timeout value for transfers */
#define SDHCI_QUIRK_BROKEN_TIMEOUT_VAL (1<<12)
/* Controller has an issue with buffer bits for small transfers */
#define SDHCI_QUIRK_BROKEN_SMALL_PIO (1<<13)
int
irq
;
/* Device IRQ */
void
__iomem
*
ioaddr
;
/* Mapped address */
...
...
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