From: Yasushi SHOJI <yashi@atmark-techno.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: request_region for no dynamic bus sizing
Date: Tue, 29 Jul 2003 10:53:06 +0900 [thread overview]
Message-ID: <20030729015306.D4B613E610@dns1.atmark-techno.com> (raw)
In-Reply-To: <1059439949.1870.6.camel@dhcp22.swansea.linux.org.uk>
At 29 Jul 2003 01:52:29 +0100,
Alan Cox wrote:
>
> On Maw, 2003-07-29 at 00:55, Yasushi SHOJI wrote:
> > the problem is, however, that because there is two memory region for
> > one bus address, I have to call two request_region()s to avoid misuse.
> >
> > what i'd like to ask is that "is anyone using such kind of board to
> > run linux? if so, how do you do?"
>
> Is there any reason you cannot fix request_region for your platform to
> request both itself ?
no, there is not.
Actualy, I was looking at __request_region after I sent the previous
message.
What'd be the proper way to fix request_region for no dynamic bus
sizing platform? use #ifdef in linux/ioport.h and call
__request_region twice or fix __request_region?
how about something like this? (haven't even compile)
#define ADDR_OFFSET(x) WHATEVER(x)
#define request_region(start,n,name) \
({ struct resource * __r, __s; \
__r = __request_region(&ioport_resource, (start), (n), (name)); \
if (__r) { \
__s = __request_region(&ioport_resource, (ADDR_OFFSET(start)), (n), (name)); \
if (!__s) { \
__release_region(&ioport_resource, (start), (n), (name)); \
__r = NULL; \
} \
} \
__r; })
best regards,
--
yashi
prev parent reply other threads:[~2003-07-29 1:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-28 23:55 request_region for no dynamic bus sizing Yasushi SHOJI
2003-07-29 0:52 ` Alan Cox
2003-07-29 1:53 ` Yasushi SHOJI [this message]
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=20030729015306.D4B613E610@dns1.atmark-techno.com \
--to=yashi@atmark-techno.com \
--cc=alan@lxorguk.ukuu.org.uk \
--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;
as well as URLs for NNTP newsgroup(s).