From: Pawan Deepika <pawan_deepika@yahoo.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [linux 2.4.18] via-rhine.c
Date: Mon, 19 May 2003 12:43:17 -0700 (PDT) [thread overview]
Message-ID: <20030519194317.20999.qmail@web41606.mail.yahoo.com> (raw)
Hi,
I am learning device driver only now. I was going
through the source code in via-rhine.c. What I
understand till now is that in Memory-mapped devices,
I/O operation is performed using
read(b/w/l)/write(b/w/l) functions while in IO mapped
devices it is done using in/out(b/w/l). Am I right?
But in via-rhine.c I notice use of inb and outb even
in memory mapped case(code is shown below)
------------------------------------------------------
#ifdef USE_MEM
530 static void __devinit enable_mmio(long ioaddr, int
chip_id)
531 {
532 int n;
533 if (chip_id == VT3043 || chip_id ==
VT86C100A) {
534 /* More recent docs say that this
bit is reserved ... */
535 n = inb(ioaddr + ConfigA) | 0x20;
536 outb(n, ioaddr + ConfigA);
537 } else if (chip_id == VT6102) {
538 n = inb(ioaddr + ConfigD) | 0x80;
539 outb(n, ioaddr + ConfigD);
540 }
541 }
542 #endif
-----------------------------------------------------
Can anyone tell me how does it work here? Also, don't
we need to allocate I/O ports(using request_region() )
before performing any inb/outb operations?
Please advise.
Thanks & regards,
Deepika
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
next reply other threads:[~2003-05-19 19:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-19 19:43 Pawan Deepika [this message]
2003-05-20 13:44 ` Roger Luethi
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=20030519194317.20999.qmail@web41606.mail.yahoo.com \
--to=pawan_deepika@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®