imx8/usdhc: work around broken multi-write for now
for unknown reasons, multiwrite is busted in usdhc: sdhc: write error intr 10 stat ff88858e usdhccmd: need to reset Datinhibit intr 10 stat ff88858e usdhc: cmd 193a0027 arg 1e5b6b error intr 18010 stat ff88858f i'm disabling it for now, adding a flag to the SDio struct.
This commit is contained in:
parent
7bae48c452
commit
2b1ecbe87d
3 changed files with 7 additions and 6 deletions
|
@ -219,16 +219,15 @@ dmaalloc(void *addr, int len)
|
||||||
uintptr a;
|
uintptr a;
|
||||||
Adma *adma, *p;
|
Adma *adma, *p;
|
||||||
|
|
||||||
a = (uintptr)addr;
|
a = PADDR(addr);
|
||||||
n = (len + Maxdma-1) / Maxdma;
|
n = (len + Maxdma-1) / Maxdma;
|
||||||
adma = sdmalloc(n * sizeof(Adma));
|
adma = sdmalloc(n * sizeof(Adma));
|
||||||
for(p = adma; len > 0; p++){
|
for(p = adma; len > 0; p++){
|
||||||
p->desc = Valid | Tran;
|
|
||||||
if(n == 1)
|
if(n == 1)
|
||||||
p->desc |= len<<OLength | End | Int;
|
p->desc = len<<OLength | End | Int | Valid | Tran;
|
||||||
else
|
else
|
||||||
p->desc |= Maxdma<<OLength;
|
p->desc = Maxdma<<OLength | Valid | Tran;
|
||||||
p->addr = PADDR(a);
|
p->addr = a;
|
||||||
a += Maxdma;
|
a += Maxdma;
|
||||||
len -= Maxdma;
|
len -= Maxdma;
|
||||||
n--;
|
n--;
|
||||||
|
@ -529,4 +528,5 @@ SDio sdio = {
|
||||||
usdhciosetup,
|
usdhciosetup,
|
||||||
usdhcio,
|
usdhcio,
|
||||||
.highspeed = 1,
|
.highspeed = 1,
|
||||||
|
.nomultiwrite = 1,
|
||||||
};
|
};
|
||||||
|
|
|
@ -162,6 +162,7 @@ struct SDio {
|
||||||
void (*iosetup)(int, void*, int, int);
|
void (*iosetup)(int, void*, int, int);
|
||||||
void (*io)(int, uchar*, int);
|
void (*io)(int, uchar*, int);
|
||||||
char highspeed;
|
char highspeed;
|
||||||
|
char nomultiwrite; /* quirk for usdhc */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern SDio sdio;
|
extern SDio sdio;
|
||||||
|
|
|
@ -332,7 +332,7 @@ mmcbio(SDunit *unit, int lun, int write, void *data, long nb, uvlong bno)
|
||||||
error(Echange);
|
error(Echange);
|
||||||
buf = data;
|
buf = data;
|
||||||
len = unit->secsize;
|
len = unit->secsize;
|
||||||
if(Multiblock){
|
if(Multiblock && (!write || !io->nomultiwrite)){
|
||||||
b = bno;
|
b = bno;
|
||||||
tries = 0;
|
tries = 0;
|
||||||
while(waserror())
|
while(waserror())
|
||||||
|
|
Loading…
Reference in a new issue