From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: [9fans] rpi emmc
Date: Sat, 2 Jan 2016 18:28:13 -0800 [thread overview]
Message-ID: <ab98a6ce086002af76809331300969cc@mule> (raw)
in diffing bls' version and sources, i see some significant differences, but
it's not clear which one is more up-to-date.
anyone?
- erik
----
; 9diff emmc.c
/n/sources/plan9/sys/src/9/bcm/emmc.c:178,184 - emmc.c:178,188
static int
datadone(void*)
{
- return emmc.datadone;
+ int i;
+
+ u32int *r = (u32int*)EMMCREGS;
+ i = r[Interrupt];
+ return i & (Datadone|Err);
}
static int
/n/sources/plan9/sys/src/9/bcm/emmc.c:310,318 - emmc.c:314,322
if((c & Respmask) == Resp48busy){
WR(Irpten, Datadone|Err);
tsleep(&emmc.r, datadone, 0, 3000);
- i = emmc.datadone;
- emmc.datadone = 0;
WR(Irpten, 0);
+ emmc.datadone = 0;
+ i = r[Interrupt];
if((i & Datadone) == 0)
print("emmcio: no Datadone after CMD%d\n", cmd);
if(i & Err)
/n/sources/plan9/sys/src/9/bcm/emmc.c:380,390 - emmc.c:384,396
&r[Data], buf, len);
if(dmawait(DmaChanEmmc) < 0)
error(Eio);
+ if(!write)
+ cachedinvse(buf, len);
WR(Irpten, Datadone|Err);
tsleep(&emmc.r, datadone, 0, 3000);
- i = emmc.datadone;
- emmc.datadone = 0;
WR(Irpten, 0);
+ emmc.datadone = 0;
+ i = r[Interrupt];
if((i & Datadone) == 0){
print("emmcio: %d timeout intr %ux stat %ux\n",
write, i, r[Status]);
/n/sources/plan9/sys/src/9/bcm/emmc.c:407,419 - emmc.c:413,423
mmcinterrupt(Ureg*, void*)
{
u32int *r;
- int i;
-
r = (u32int*)EMMCREGS;
- i = r[Interrupt];
- r[Interrupt] = i & (Datadone|Err);
- emmc.datadone = i;
- wakeup(&emmc.r);
+ if(r[Interrupt]&(Datadone|Err)){
+ WR(Irpten, 0);
+ wakeup(&emmc.r);
+ }
}
SDio sdio = {
next reply other threads:[~2016-01-03 2:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-03 2:28 erik quanstrom [this message]
2016-01-03 4:53 ` David du Colombier
[not found] <1064208925.81416.1451798293880.JavaMail.yahoo.ref@mail.yahoo.com>
2016-01-03 5:18 ` Brian L. Stuart
2016-01-03 5:27 ` erik quanstrom
2016-01-03 5:29 ` David du Colombier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ab98a6ce086002af76809331300969cc@mule \
--to=quanstro@quanstro.net \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).