lkml.org 
[lkml]   [2003]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: request_region for no dynamic bus sizing
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.028 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site