{
pccard_mem_map *mem = &s->cis_mem;
if (!(s->features & SS_CAP_STATIC_MAP) && mem->res == NULL) {
- mem->res = find_mem_region(0, s->map_size, s->map_size, 0, s);
+ mem->res = pcmcia_find_mem_region(0, s->map_size, s->map_size, 0, s);
if (mem->res == NULL) {
printk(KERN_NOTICE "cs: unable to map card memory!\n");
return NULL;
#define IS_ATTR 1
#define IS_INDIRECT 8
-int read_cis_mem(struct pcmcia_socket *s, int attr, u_int addr,
+int pcmcia_read_cis_mem(struct pcmcia_socket *s, int attr, u_int addr,
u_int len, void *ptr)
{
void __iomem *sys, *end;
unsigned char *buf = ptr;
- cs_dbg(s, 3, "read_cis_mem(%d, %#x, %u)\n", attr, addr, len);
+ cs_dbg(s, 3, "pcmcia_read_cis_mem(%d, %#x, %u)\n", attr, addr, len);
if (attr & IS_INDIRECT) {
/* Indirect accesses use a bunch of special registers at fixed
return 0;
}
-void write_cis_mem(struct pcmcia_socket *s, int attr, u_int addr,
+void pcmcia_write_cis_mem(struct pcmcia_socket *s, int attr, u_int addr,
u_int len, void *ptr)
{
void __iomem *sys, *end;
unsigned char *buf = ptr;
- cs_dbg(s, 3, "write_cis_mem(%d, %#x, %u)\n", attr, addr, len);
+ cs_dbg(s, 3, "pcmcia_write_cis_mem(%d, %#x, %u)\n", attr, addr, len);
if (attr & IS_INDIRECT) {
/* Indirect accesses use a bunch of special registers at fixed
ret = read_cb_mem(s, attr, addr, len, ptr);
else
#endif
- ret = read_cis_mem(s, attr, addr, len, ptr);
+ ret = pcmcia_read_cis_mem(s, attr, addr, len, ptr);
if (ret == 0) {
/* Copy data into the cache */
read_cb_mem(s, cis->attr, cis->addr, len, buf);
else
#endif
- read_cis_mem(s, cis->attr, cis->addr, len, buf);
+ pcmcia_read_cis_mem(s, cis->attr, cis->addr, len, buf);
if (memcmp(buf, cis->cache, len) != 0) {
kfree(buf);
return 1;
for (i = 0; i < MAX_IO_WIN; i++) {
if (s->io[i].NumPorts == 0) {
- s->io[i].res = find_io_region(*base, num, align, s);
+ s->io[i].res = pcmcia_find_io_region(*base, num, align, s);
if (s->io[i].res) {
s->io[i].Attributes = attr;
s->io[i].BasePort = *base = s->io[i].res->start;
/* Try to extend top of window */
try = s->io[i].BasePort + s->io[i].NumPorts;
if ((*base == 0) || (*base == try))
- if (adjust_io_region(s->io[i].res, s->io[i].res->start,
+ if (pcmcia_adjust_io_region(s->io[i].res, s->io[i].res->start,
s->io[i].res->end + num, s) == 0) {
*base = try;
s->io[i].NumPorts += num;
/* Try to extend bottom of window */
try = s->io[i].BasePort - num;
if ((*base == 0) || (*base == try))
- if (adjust_io_region(s->io[i].res, s->io[i].res->start - num,
+ if (pcmcia_adjust_io_region(s->io[i].res, s->io[i].res->start - num,
s->io[i].res->end, s) == 0) {
s->io[i].BasePort = *base = try;
s->io[i].NumPorts += num;
switch (reg->Action) {
case CS_READ:
- read_cis_mem(s, 1, addr, 1, &val);
+ pcmcia_read_cis_mem(s, 1, addr, 1, &val);
reg->Value = val;
break;
case CS_WRITE:
val = reg->Value;
- write_cis_mem(s, 1, addr, 1, &val);
+ pcmcia_write_cis_mem(s, 1, addr, 1, &val);
break;
default:
return CS_BAD_ARGS;
(c->IntType & (INT_MEMORY_AND_IO | INT_ZOOMED_VIDEO))) {
u_char reg;
if (c->Present & PRESENT_PIN_REPLACE) {
- read_cis_mem(s, 1, (c->ConfigBase+CISREG_PRR)>>1, 1, ®);
+ pcmcia_read_cis_mem(s, 1, (c->ConfigBase+CISREG_PRR)>>1, 1, ®);
status->CardState |=
(reg & PRR_WP_STATUS) ? CS_EVENT_WRITE_PROTECT : 0;
status->CardState |=
status->CardState |= CS_EVENT_READY_CHANGE;
}
if (c->Present & PRESENT_EXT_STATUS) {
- read_cis_mem(s, 1, (c->ConfigBase+CISREG_ESR)>>1, 1, ®);
+ pcmcia_read_cis_mem(s, 1, (c->ConfigBase+CISREG_ESR)>>1, 1, ®);
status->CardState |=
(reg & ESR_REQ_ATTN) ? CS_EVENT_REQUEST_ATTENTION : 0;
}
c->Present = c->CardValues = req->Present;
if (req->Present & PRESENT_COPY) {
c->Copy = req->Copy;
- write_cis_mem(s, 1, (base + CISREG_SCR)>>1, 1, &c->Copy);
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_SCR)>>1, 1, &c->Copy);
}
if (req->Present & PRESENT_OPTION) {
if (s->functions == 1) {
if (c->state & CONFIG_IRQ_REQ)
if (!(c->irq.Attributes & IRQ_FORCED_PULSE))
c->Option |= COR_LEVEL_REQ;
- write_cis_mem(s, 1, (base + CISREG_COR)>>1, 1, &c->Option);
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_COR)>>1, 1, &c->Option);
mdelay(40);
}
if (req->Present & PRESENT_STATUS) {
c->Status = req->Status;
- write_cis_mem(s, 1, (base + CISREG_CCSR)>>1, 1, &c->Status);
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_CCSR)>>1, 1, &c->Status);
}
if (req->Present & PRESENT_PIN_REPLACE) {
c->Pin = req->Pin;
- write_cis_mem(s, 1, (base + CISREG_PRR)>>1, 1, &c->Pin);
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_PRR)>>1, 1, &c->Pin);
}
if (req->Present & PRESENT_EXT_STATUS) {
c->ExtStatus = req->ExtStatus;
- write_cis_mem(s, 1, (base + CISREG_ESR)>>1, 1, &c->ExtStatus);
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_ESR)>>1, 1, &c->ExtStatus);
}
if (req->Present & PRESENT_IOBASE_0) {
u_char b = c->io.BasePort1 & 0xff;
- write_cis_mem(s, 1, (base + CISREG_IOBASE_0)>>1, 1, &b);
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_IOBASE_0)>>1, 1, &b);
b = (c->io.BasePort1 >> 8) & 0xff;
- write_cis_mem(s, 1, (base + CISREG_IOBASE_1)>>1, 1, &b);
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_IOBASE_1)>>1, 1, &b);
}
if (req->Present & PRESENT_IOSIZE) {
u_char b = c->io.NumPorts1 + c->io.NumPorts2 - 1;
- write_cis_mem(s, 1, (base + CISREG_IOSIZE)>>1, 1, &b);
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_IOSIZE)>>1, 1, &b);
}
/* Configure I/O windows */
win->sock = s;
if (!(s->features & SS_CAP_STATIC_MAP)) {
- win->ctl.res = find_mem_region(req->Base, req->Size, align,
+ win->ctl.res = pcmcia_find_mem_region(req->Base, req->Size, align,
(req->Attributes & WIN_MAP_BELOW_1MB), s);
if (!win->ctl.res)
return CS_IN_USE;
int read_cb_mem(struct pcmcia_socket *s, int space, u_int addr, u_int len, void *ptr);
/* In cistpl.c */
-int read_cis_mem(struct pcmcia_socket *s, int attr,
+int pcmcia_read_cis_mem(struct pcmcia_socket *s, int attr,
u_int addr, u_int len, void *ptr);
-void write_cis_mem(struct pcmcia_socket *s, int attr,
+void pcmcia_write_cis_mem(struct pcmcia_socket *s, int attr,
u_int addr, u_int len, void *ptr);
void release_cis_mem(struct pcmcia_socket *s);
void destroy_cis_cache(struct pcmcia_socket *s);
/* In rsrc_mgr */
void pcmcia_validate_mem(struct pcmcia_socket *s);
-struct resource *find_io_region(unsigned long base, int num, unsigned long align,
+struct resource *pcmcia_find_io_region(unsigned long base, int num, unsigned long align,
struct pcmcia_socket *s);
-int adjust_io_region(struct resource *res, unsigned long r_start,
+int pcmcia_adjust_io_region(struct resource *res, unsigned long r_start,
unsigned long r_end, struct pcmcia_socket *s);
-struct resource *find_mem_region(u_long base, u_long num, u_long align,
+struct resource *pcmcia_find_mem_region(u_long base, u_long num, u_long align,
int low, struct pcmcia_socket *s);
-int adjust_resource_info(client_handle_t handle, adjust_t *adj);
void release_resource_db(struct pcmcia_socket *s);
/* In socket_sysfs.c */