Lines Matching refs:num

49 	u_long			base, num;  member
108 static int add_interval(struct resource_map *map, u_long base, u_long num) in add_interval() argument
113 if ((p != map) && (p->base+p->num >= base)) { in add_interval()
114 p->num = max(num + base - p->base, p->num); in add_interval()
117 if ((p->next == map) || (p->next->base > base+num-1)) in add_interval()
125 q->base = base; q->num = num; in add_interval()
132 static int sub_interval(struct resource_map *map, u_long base, u_long num) in sub_interval() argument
140 if ((q->base+q->num > base) && (base+num > q->base)) { in sub_interval()
142 if (q->base+q->num <= base+num) { in sub_interval()
150 q->num = q->base + q->num - base - num; in sub_interval()
151 q->base = base + num; in sub_interval()
153 } else if (q->base+q->num <= base+num) { in sub_interval()
155 q->num = base - q->base; in sub_interval()
164 p->base = base+num; in sub_interval()
165 p->num = q->base+q->num - p->base; in sub_interval()
166 q->num = base - q->base; in sub_interval()
183 unsigned int num) in do_io_probe() argument
191 dev_info(&s->dev, "cs: IO port probe %#x-%#x:", base, base+num-1); in do_io_probe()
200 for (i = base, most = 0; i < base+num; i += 8) { in do_io_probe()
217 for (i = base; i < base+num; i += 8) { in do_io_probe()
244 if ((num > 16) && (bad == base) && (i == base+num)) { in do_io_probe()
400 static int do_mem_probe(struct pcmcia_socket *s, u_long base, u_long num, in do_mem_probe() argument
412 base, base+num-1); in do_mem_probe()
414 step = (num < 0x20000) ? 0x2000 : ((num>>4) & ~0x1fff); in do_mem_probe()
421 for (i = j = base; i < base+num; i = j + step) { in do_mem_probe()
423 for (j = i; j < base+num; j += step) { in do_mem_probe()
427 fail = ((i == base) && (j == base+num)); in do_mem_probe()
430 for (j = i; j < base+num; j += step) in do_mem_probe()
443 return num - bad; in do_mem_probe()
463 sub_interval(&s_data->mem_db, m->base, m->num); in inv_probe()
468 return do_mem_probe(s, m->base, m->num, readable, checksum); in inv_probe()
503 if ((mm.base | mm.num) & 0xffff) { in validate_mem()
504 ok += do_mem_probe(s, mm.base, mm.num, readable, in validate_mem()
511 if ((b >= mm.base) && (b+0x10000 <= mm.base+mm.num)) { in validate_mem()
544 ok += do_mem_probe(s, mm.base, mm.num, readable, checksum); in validate_mem()
614 unsigned long map_end = m->base + m->num - 1; in pcmcia_align()
658 unsigned long end = m->base + m->num - 1; in __nonstatic_adjust_io_region()
683 unsigned long base, int num, in __nonstatic_find_io_region() argument
686 struct resource *res = pcmcia_make_resource(0, num, IORESOURCE_IO, in __nonstatic_find_io_region()
702 ret = pci_bus_alloc_resource(s->cb_dev->bus, res, num, 1, in __nonstatic_find_io_region()
706 ret = allocate_resource(&ioport_resource, res, num, min, ~0UL, in __nonstatic_find_io_region()
717 unsigned int *base, unsigned int num, in nonstatic_find_io() argument
750 *base, num, in nonstatic_find_io()
759 s->io[i].InUse = num; in nonstatic_find_io()
768 res->end + num); in nonstatic_find_io()
771 resource_size(res) + num); in nonstatic_find_io()
775 s->io[i].InUse += num; in nonstatic_find_io()
782 try = res->start - num; in nonstatic_find_io()
785 res->start - num, in nonstatic_find_io()
789 res->start - num, in nonstatic_find_io()
790 resource_size(res) + num); in nonstatic_find_io()
794 s->io[i].InUse += num; in nonstatic_find_io()
805 static struct resource *nonstatic_find_mem_region(u_long base, u_long num, in nonstatic_find_mem_region() argument
808 struct resource *res = pcmcia_make_resource(0, num, IORESOURCE_MEM, in nonstatic_find_mem_region()
837 res, num, 1, min, 0, in nonstatic_find_mem_region()
843 res, num, min, max, 1, in nonstatic_find_mem_region()
1088 ((unsigned long) p->base + p->num - 1));
1145 ((unsigned long) p->base + p->num - 1));
1154 ((unsigned long) p->base + p->num - 1));