9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: presotto@plan9.bell-labs.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] devi82365.c fix
Date: Tue, 28 May 2002 16:55:14 -0400	[thread overview]
Message-ID: <e935b201805e96b9089c52e81ebecfb0@plan9.bell-labs.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 117 bytes --]

I've installed nemo's changes on sources.  Nemo, make sure I got the diffs merged right
and try it out on your card.

[-- Attachment #2: Type: message/rfc822, Size: 2884 bytes --]

From: Fco.J.Ballesteros <nemo@plan9.escet.urjc.es>
To: 9fans@cse.psu.edu
Subject: [9fans] devi82365.c fix
Date: Tue, 28 May 2002 19:04:50 +0200
Message-ID: <1890f95b5b25fd97004929ac451ceae0@plan9.escet.urjc.es>

Following nigel advice I changed i82365 to set the 3v bit
only for my card type and let my disk work.

I tested it and it seems to work right.

diff /n/dump/2002/0528/sys/src/9/pc/devi82365.c /sys/src/9/pc/devi82365.c
19a20
> 	 Fcard3v=	 (1<<3),
48c50,52
<
---
> 	Rcdgcr=		0x16,		/* Card detect general control register*/
> 	 Fslot1v=	 (1<<6),	/* voltage for slot 1 (0 == 3.3v) */
> 	 Fslot2v=	 (1<<7),	/* voltage for slot 2 (0 == 3.3v) */
95a100
> 	Ti82365SLDF,
173a179,182
> 	uchar   enaval;
> 	I82365* ctlr;
> 	uchar	cdgcr;
>
178c187,196
< 	wrreg(pp, Rpc, Fautopower|Foutena|Fcardena);
---
> 	enaval = Fautopower|Foutena|Fcardena;
> 	ctlr = pp->cp;
> 	if (ctlr->type == Ti82365SLDF){
> 		cdgcr = rdreg(pp, Rcdgcr);
> 		if (pp - slot == 0 && (cdgcr&Fslot1v) == 0)
> 			enaval |= Fcard3v;
> 		if (pp - slot == 1 && (cdgcr&Fslot2v) == 0)
> 			enaval |= Fcard3v;
> 	}
> 	wrreg(pp, Rpc, enaval);
459a478
> [Ti82365SLDF]	"Intel 82365SL-DF",
487a507,509
> 	case 0x84:
> 		cp->type = Ti82365SLDF;
> 		/* has the 3v power bit and is like Ti82365 otherwise */
490d511
< 	case 0x84:
515c536
< 	if(cp->type == Ti82365){
---
> 	if(cp->type == Ti82365 || cp->type == Ti82365SLDF){
901a923,925
> 	uchar cdgcr;
> 	uchar enaval;
> 	I82365* ctlr;
971c995,1006
< 	wrreg(pp, Rpc, x|Fautopower|Foutena|Fcardena);
---
>
> 	enaval = x|Fautopower|Foutena|Fcardena;
> 	ctlr = pp->cp;
> 	if (ctlr->type == Ti82365SLDF){
> 		cdgcr = rdreg(pp, Rcdgcr);
> 		if (slotno == 0 && (cdgcr&Fslot1v) == 0)
> 			enaval |= Fcard3v;
> 		if (slotno == 1 && (cdgcr&Fslot2v) == 0)
> 			enaval |= Fcard3v;
> 	}
>
> 	wrreg(pp, Rpc, enaval);

             reply	other threads:[~2002-05-28 20:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-28 20:55 presotto [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-05-28 20:41 presotto
2002-05-28 17:04 Fco.J.Ballesteros

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=e935b201805e96b9089c52e81ebecfb0@plan9.bell-labs.com \
    --to=presotto@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /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).