Commit a99a281c authored by Russell King's avatar Russell King

[PCMCIA] 03-memwin

Eliminate win->base and win->size elements from window_t.
window_t contains struct pccard_mem_map, which contains a
copy of these (sys_start, sys_stop) in a slightly different
form.
parent 153fef7f
...@@ -1549,7 +1549,7 @@ int pcmcia_release_window(window_handle_t win) ...@@ -1549,7 +1549,7 @@ int pcmcia_release_window(window_handle_t win)
/* Release system memory */ /* Release system memory */
if(!(s->features & SS_CAP_STATIC_MAP)) if(!(s->features & SS_CAP_STATIC_MAP))
release_mem_region(win->base, win->size); release_mem_region(win->ctl.sys_start, win->ctl.sys_stop - win->ctl.sys_start + 1);
win->handle->state &= ~CLIENT_WIN_REQ(win->index); win->handle->state &= ~CLIENT_WIN_REQ(win->index);
win->magic = 0; win->magic = 0;
...@@ -1871,14 +1871,14 @@ int pcmcia_request_window(client_handle_t *handle, win_req_t *req, window_handle ...@@ -1871,14 +1871,14 @@ int pcmcia_request_window(client_handle_t *handle, win_req_t *req, window_handle
win->index = w; win->index = w;
win->handle = *handle; win->handle = *handle;
win->sock = s; win->sock = s;
win->base = req->Base; win->ctl.sys_start = req->Base;
win->size = req->Size;
if (!(s->features & SS_CAP_STATIC_MAP) && if (!(s->features & SS_CAP_STATIC_MAP) &&
find_mem_region(&win->base, win->size, align, find_mem_region(&win->ctl.sys_start, req->Size, align,
(req->Attributes & WIN_MAP_BELOW_1MB), (req->Attributes & WIN_MAP_BELOW_1MB),
(*handle)->dev_info, s)) (*handle)->dev_info, s))
return CS_IN_USE; return CS_IN_USE;
win->ctl.sys_stop = win->ctl.sys_start + req->Size - 1;
(*handle)->state |= CLIENT_WIN_REQ(w); (*handle)->state |= CLIENT_WIN_REQ(w);
/* Configure the socket controller */ /* Configure the socket controller */
...@@ -1893,8 +1893,6 @@ int pcmcia_request_window(client_handle_t *handle, win_req_t *req, window_handle ...@@ -1893,8 +1893,6 @@ int pcmcia_request_window(client_handle_t *handle, win_req_t *req, window_handle
win->ctl.flags |= MAP_16BIT; win->ctl.flags |= MAP_16BIT;
if (req->Attributes & WIN_USE_WAIT) if (req->Attributes & WIN_USE_WAIT)
win->ctl.flags |= MAP_USE_WAIT; win->ctl.flags |= MAP_USE_WAIT;
win->ctl.sys_start = win->base;
win->ctl.sys_stop = win->base + win->size-1;
win->ctl.card_start = 0; win->ctl.card_start = 0;
if (s->ops->set_mem_map(s, &win->ctl) != 0) if (s->ops->set_mem_map(s, &win->ctl) != 0)
return CS_BAD_ARGS; return CS_BAD_ARGS;
......
...@@ -154,8 +154,6 @@ typedef struct window_t { ...@@ -154,8 +154,6 @@ typedef struct window_t {
u_short index; u_short index;
client_handle_t handle; client_handle_t handle;
struct pcmcia_socket *sock; struct pcmcia_socket *sock;
u_long base;
u_long size;
pccard_mem_map ctl; pccard_mem_map ctl;
} window_t; } window_t;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment