From: Alessandro Rubini <rubini@gnudd.com>
To: linuxppc-embedded@ozlabs.org
Subject: Re: ioremap and outb
Date: Fri, 4 Jan 2008 11:20:37 +0100 [thread overview]
Message-ID: <20080104102037.GA31627@mail.gnudd.com> (raw)
In-Reply-To: <14612559.post@talk.nabble.com>
Please don't change subject matter without changing subject line, and please
open a new thread when asking a new question.
> I am writing a driver in which device port is mapped to CPLD and 8 bit data
> bus is directly connected from processor to CPLD. Read write on CPLD memory
> mapped (buffer/register) is required to control the device. This is now IO
> mapped to processor.
This is typical. You'll find quite a lot of examples.
> addr=ioremap(base_addr,size); // Remap to Mem mapped
Yes.
> out_8(addr) and in_8(addr);
It should be right, although __raw_readb() and __raw_writeb() may
suffice for you. Please check the comments in <asm/io.h>.
It may also happen that you need to read/write 32 bits instead of 8,
but this depends on your specific hardware.
/alessandro
next prev parent reply other threads:[~2008-01-04 10:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-03 16:57 Drivers' probe function calling order DI BACCO ANTONIO - technolabs
2008-01-03 18:04 ` Jeff Mock
2008-01-03 21:54 ` Alessandro Rubini
2008-01-04 8:41 ` Misbah khan
2008-01-04 10:20 ` Alessandro Rubini [this message]
2008-01-04 10:45 ` ioremap and outb Arnd Bergmann
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=20080104102037.GA31627@mail.gnudd.com \
--to=rubini@gnudd.com \
--cc=linuxppc-embedded@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.