shithub: plan9front

Download patch

ref: a2baa8634834b462a613ff6cc74becee2efc9a3c
parent: 2925fb09a6d5c661280fc2bc7a9222144a522235
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Nov 7 12:43:36 EST 2021

bcm/emmc: remove unused cardr wakeup(), use MACHP(0) as tick reference

--- a/sys/src/9/bcm/emmc.c	Sun Nov  7 12:41:57 2021
+++ b/sys/src/9/bcm/emmc.c	Sun Nov  7 12:43:36 2021
@@ -166,7 +166,6 @@
 
 struct Ctlr {
 	Rendez	r;
-	Rendez	cardr;
 	int	fastclock;
 	ulong	extclk;
 	int	appcmd;
@@ -346,9 +345,9 @@
 		WR(Interrupt, i);
 	}
 	WR(Cmdtm, c);
-	now = m->ticks;
+	now = MACHP(0)->ticks;
 	while(((i=r[Interrupt])&(Cmddone|Err)) == 0)
-		if(m->ticks-now > HZ)
+		if(MACHP(0)->ticks - now > HZ)
 			break;
 	if((i&(Cmddone|Err)) != Cmddone){
 		if((i&~(Err|Cardintr)) != Ctoerr)
@@ -495,8 +494,6 @@
 	i = r[Interrupt];
 	if(i&(Datadone|Err))
 		wakeup(&emmc.r);
-	if(i&Cardintr)
-		wakeup(&emmc.cardr);
 	WR(Irpten, r[Irpten] & ~i);
 }