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] various bitsy questions
Date: Tue, 22 Oct 2002 19:42:20 -0400	[thread overview]
Message-ID: <807ca75a36824f80b754f9e70a50e738@plan9.bell-labs.com> (raw)

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

The way to port pcmciamodem.c it is to get rid of it completely.  On the bitsy,
a user level program open's /dev/pcm0ctl and writes a string like:

	configure #xspec arg [ index ]

into it.  The '#xspec' is a device specifier like you'ld use in bind, e.g.,
#l0.  'x's configure routine is called as:

	devtab[].config(int on, char *spec, DevConf *cp)

where 'on' == 1 means to configure and enable the card and == 0 means disable and unconfigure it.
      'spec' is the same as for bind's, for example, 0 or 1 to indicate ether 0
			or ether 1,
      'cp->mem' is where the pcmcia chip has configured the memory to be
      'cp->port' is where the pcmcia chip has mapped the io ports
      'cp->irq' is where the pcmcia chip has mapped the interrupt
      'cp->type' is the 'arg' that the user wrote

This allows us to flavor the card after the fact rather than at boot time
or to disable it so that we can pull it out.

Look at the config routine in devether.c.  The equivalent to pcmciamodem.c
is adding a config routine in port/devuart.c.

I did this model after I did the PC and like it a lot more.  It means that the
drivers don't have to know about all the different names a card can be called by
and allows us to pull cards out and insert new ones without rebooting.  Its
what I should have done in the first place.  I'm currently rewriting pc/devpccard.c
and pc/devi82365.c to be a single driver with exactly that interface.  All the
pcmciaxxxx.c files will disappear.  boot/bootip.c will configure in the card if
it needs to.

If you rewrite devuart.c to do this, I'll be happy to pick it up as soon as I
finish the pc conversion.  If not, I'll do it anyways since I want to try
our gprs card on the bitsies.  Might make them a bit more useful than the
802.11 card does or at least useful in different situations.  Of course, until
we can put the suckers to sleep and wake them up successfully, they're only
useful for a few hours at most.

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

From: Axel Belinfante <Axel.Belinfante@cs.utwente.nl>
To: 9fans@cse.psu.edu
Subject: [9fans] various bitsy questions
Date: Tue, 22 Oct 2002 22:36:57 +0200
Message-ID: <200210222036.g9MKawZ12108@zamenhof.cs.utwente.nl>

Just a few questions (pointers welcome)...

What would be needed to `port' pcmciamodem.c to bitsy?
It's probably obvious, but I'm confused by irq and ioports
on the bitsy -- is there an equivalent to '#P/'*alloc to see
what's in use?

Bitsy source gives me the impression that both portrait and landscape
mode is supported. Is there a way to choose between them,
other than setting landscape in screen.c?

What do the Scrib and Menu buttons in the scribble keyboard?
Do they add `missing' window parts if scriblle started keyboard-only?

Thanks,
Axel.

             reply	other threads:[~2002-10-22 23:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-22 23:42 presotto [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-10-22 23:45 presotto
2002-10-22 22:02 Russ Cox
2002-10-22 20:36 Axel Belinfante

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=807ca75a36824f80b754f9e70a50e738@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).