Lines Matching refs:base
49 u_long base, num;
73 claim_region(struct pcmcia_socket *s, resource_size_t base,
79 res = pcmcia_make_resource(base, size, type | IORESOURCE_BUSY, name);
108 static int add_interval(struct resource_map *map, u_long base, u_long num)
113 if ((p != map) && (p->base+p->num >= base)) {
114 p->num = max(num + base - p->base, p->num);
117 if ((p->next == map) || (p->next->base > base+num-1))
125 q->base = base; q->num = num;
132 static int sub_interval(struct resource_map *map, u_long base, u_long num)
140 if ((q->base+q->num > base) && (base+num > q->base)) {
141 if (q->base >= base) {
142 if (q->base+q->num <= base+num) {
150 q->num = q->base + q->num - base - num;
151 q->base = base + num;
153 } else if (q->base+q->num <= base+num) {
155 q->num = base - q->base;
164 p->base = base+num;
165 p->num = q->base+q->num - p->base;
166 q->num = base - q->base;
182 static void do_io_probe(struct pcmcia_socket *s, unsigned int base,
191 dev_info(&s->dev, "cs: IO port probe %#x-%#x:", base, base+num-1);
200 for (i = base, most = 0; i < base+num; i += 8) {
217 for (i = base; i < base+num; i += 8) {
244 if ((num > 16) && (bad == base) && (i == base+num)) {
334 * @base: start address of resource to check
345 unsigned long base, unsigned long size,
355 res1 = claim_region(s, base, size/2, IORESOURCE_MEM, "PCMCIA memprobe");
356 res2 = claim_region(s, base + size/2, size/2, IORESOURCE_MEM,
368 base, base+size-1, res1, res2, ret, info1, info2);
378 add_interval(&s_data->mem_db_valid, base, size);
379 sub_interval(&s_data->mem_db, base, size);
389 * @base: start address of resource to check
400 static int do_mem_probe(struct pcmcia_socket *s, u_long base, u_long num,
412 base, base+num-1);
421 for (i = j = base; i < base+num; i = j + step) {
423 for (j = i; j < base+num; j += step) {
427 fail = ((i == base) && (j == base+num));
430 for (j = i; j < base+num; j += step)
462 if (m->base >= 0x100000)
463 sub_interval(&s_data->mem_db, m->base, m->num);
466 if (m->base < 0x100000)
468 return do_mem_probe(s, m->base, m->num, readable, checksum);
501 if (mm.base >= 0x100000)
503 if ((mm.base | mm.num) & 0xffff) {
504 ok += do_mem_probe(s, mm.base, mm.num, readable,
511 if ((b >= mm.base) && (b+0x10000 <= mm.base+mm.num)) {
544 ok += do_mem_probe(s, mm.base, mm.num, readable, checksum);
613 unsigned long map_start = m->base;
614 unsigned long map_end = m->base + m->num - 1;
657 unsigned long start = m->base;
658 unsigned long end = m->base + m->num - 1;
675 that need to be preserved from the initial value of *base. It
677 of 0 means that all bits of *base are significant. *base should
683 unsigned long base, int num,
690 unsigned long min = base;
697 data.offset = base & data.mask;
717 unsigned int *base, unsigned int num,
730 if (!*base)
733 if ((s->io[i].res->start & (align-1)) == *base)
750 *base, num,
755 *base = res->start;
766 if ((*base == 0) || (*base == try)) {
774 *base = try;
783 if ((*base == 0) || (*base == try)) {
793 *base = try;
805 static struct resource *nonstatic_find_mem_region(u_long base, u_long num,
821 data.offset = base & data.mask;
827 min = base < max ? base : 0;
830 min = 0x100000UL + base;
1089 ((unsigned long) p->base),
1090 ((unsigned long) p->base + p->num - 1));
1146 ((unsigned long) p->base),
1147 ((unsigned long) p->base + p->num - 1));
1155 ((unsigned long) p->base),
1156 ((unsigned long) p->base + p->num - 1));