Lines Matching +full:irqs +full:- +full:map +full:- +full:range

1 // SPDX-License-Identifier: GPL-2.0
8 * Copyright (c) 2000 Peter Denison <peterd@pnd-pc.demon.co.uk>
9 * Copyright (C) 2008 Hewlett-Packard Development Company, L.P.
34 dev_err(&dev->dev, "couldn't add ioport region to option set " in quirk_awe32_add_ports()
40 new_option->u.port.min += offset; in quirk_awe32_add_ports()
41 new_option->u.port.max += offset; in quirk_awe32_add_ports()
42 list_add(&new_option->list, &option->list); in quirk_awe32_add_ports()
44 dev_info(&dev->dev, "added ioport region %#llx-%#llx to set %d\n", in quirk_awe32_add_ports()
45 (unsigned long long) new_option->u.port.min, in quirk_awe32_add_ports()
46 (unsigned long long) new_option->u.port.max, in quirk_awe32_add_ports()
59 list_for_each_entry(option, &dev->options, list) { in quirk_awe32_resources()
75 list_for_each_entry(option, &dev->options, list) { in quirk_cmi8330_resources()
79 if (option->type == IORESOURCE_IRQ) { in quirk_cmi8330_resources()
80 irq = &option->u.irq; in quirk_cmi8330_resources()
81 bitmap_zero(irq->map.bits, PNP_IRQ_NR); in quirk_cmi8330_resources()
82 __set_bit(5, irq->map.bits); in quirk_cmi8330_resources()
83 __set_bit(7, irq->map.bits); in quirk_cmi8330_resources()
84 __set_bit(10, irq->map.bits); in quirk_cmi8330_resources()
85 dev_info(&dev->dev, "set possible IRQs in " in quirk_cmi8330_resources()
88 } else if (option->type == IORESOURCE_DMA) { in quirk_cmi8330_resources()
89 dma = &option->u.dma; in quirk_cmi8330_resources()
90 if ((dma->flags & IORESOURCE_DMA_TYPE_MASK) == in quirk_cmi8330_resources()
92 dma->map != 0x0A) { in quirk_cmi8330_resources()
93 dev_info(&dev->dev, "changing possible " in quirk_cmi8330_resources()
96 pnp_option_set(option), dma->map); in quirk_cmi8330_resources()
97 dma->map = 0x0A; in quirk_cmi8330_resources()
110 * The default range on the OPL port for these devices is 0x388-0x388. in quirk_sb16audio_resources()
111 * Here we increase that range so that two such cards can be in quirk_sb16audio_resources()
112 * auto-configured. in quirk_sb16audio_resources()
114 list_for_each_entry(option, &dev->options, list) { in quirk_sb16audio_resources()
115 if (prev_option_flags != option->flags) { in quirk_sb16audio_resources()
116 prev_option_flags = option->flags; in quirk_sb16audio_resources()
121 option->type == IORESOURCE_IO) { in quirk_sb16audio_resources()
123 port = &option->u.port; in quirk_sb16audio_resources()
124 if (n == 3 && port->min == port->max) { in quirk_sb16audio_resources()
125 port->max += 0x70; in quirk_sb16audio_resources()
126 dev_info(&dev->dev, "increased option port " in quirk_sb16audio_resources()
127 "range from %#llx-%#llx to " in quirk_sb16audio_resources()
128 "%#llx-%#llx\n", in quirk_sb16audio_resources()
129 (unsigned long long) port->min, in quirk_sb16audio_resources()
130 (unsigned long long) port->min, in quirk_sb16audio_resources()
131 (unsigned long long) port->min, in quirk_sb16audio_resources()
132 (unsigned long long) port->max); in quirk_sb16audio_resources()
145 list_for_each_entry(option, &dev->options, list) { in pnp_clone_dependent_set()
150 dev_err(&dev->dev, "no dependent option sets\n"); in pnp_clone_dependent_set()
155 list_for_each_entry(option, &dev->options, list) { in pnp_clone_dependent_set()
161 dev_err(&dev->dev, "couldn't clone dependent " in pnp_clone_dependent_set()
167 new_option->flags = flags; in pnp_clone_dependent_set()
171 list_add(&new_option->list, &tail->list); in pnp_clone_dependent_set()
186 num_sets = dev->num_dependent_sets; in quirk_add_irq_optional_dependent_sets()
194 if (new_option->type == IORESOURCE_IRQ) { in quirk_add_irq_optional_dependent_sets()
195 irq = &new_option->u.irq; in quirk_add_irq_optional_dependent_sets()
196 irq->flags |= IORESOURCE_IRQ_OPTIONAL; in quirk_add_irq_optional_dependent_sets()
199 new_option = list_entry(new_option->list.next, in quirk_add_irq_optional_dependent_sets()
203 dev_info(&dev->dev, "added dependent option set %d (same as " in quirk_add_irq_optional_dependent_sets()
214 list_for_each_entry(option, &dev->options, list) { in quirk_ad1815_mpu_resources()
215 if (option->type == IORESOURCE_IRQ && in quirk_ad1815_mpu_resources()
218 irq = &option->u.irq; in quirk_ad1815_mpu_resources()
225 irq->flags |= IORESOURCE_IRQ_OPTIONAL; in quirk_ad1815_mpu_resources()
226 dev_info(&dev->dev, "made independent IRQ optional\n"); in quirk_ad1815_mpu_resources()
252 if (r->flags & IORESOURCE_UNSET) in quirk_system_pci_resources()
257 if (res->start == 0 && res->end == 0) in quirk_system_pci_resources()
274 if (res->start <= r->start && res->end >= r->end) in quirk_system_pci_resources()
282 dev_warn(&dev->dev, in quirk_system_pci_resources()
285 res->flags |= IORESOURCE_DISABLED; in quirk_system_pci_resources()
306 list_for_each_entry(pnp_res, &dev->resources, list) { in quirk_amd_mmconfig_area()
307 res = &pnp_res->res; in quirk_amd_mmconfig_area()
308 if (res->end < mmconfig->start || res->start > mmconfig->end || in quirk_amd_mmconfig_area()
309 (res->start == mmconfig->start && res->end == mmconfig->end)) in quirk_amd_mmconfig_area()
312 dev_info(&dev->dev, FW_BUG in quirk_amd_mmconfig_area()
315 if (mmconfig->start < res->start) { in quirk_amd_mmconfig_area()
316 start = mmconfig->start; in quirk_amd_mmconfig_area()
317 end = res->start - 1; in quirk_amd_mmconfig_area()
320 if (mmconfig->end > res->end) { in quirk_amd_mmconfig_area()
321 start = res->end + 1; in quirk_amd_mmconfig_area()
322 end = mmconfig->end; in quirk_amd_mmconfig_area()
334 0x0a04, /* Haswell-ULT */
375 * Read MCHBAR for Host Member Mapped Register Range Base in quirk_intel_mch()
376 …* https://www-ssl.intel.com/content/www/us/en/processors/core/4th-gen-core-family-desktop-vol-2-da… in quirk_intel_mch()
383 region.end = region.start + 32*1024 - 1; in quirk_intel_mch()
387 pcibios_bus_to_resource(host->bus, &mch, &region); in quirk_intel_mch()
389 list_for_each_entry(pnp_res, &dev->resources, list) { in quirk_intel_mch()
390 res = &pnp_res->res; in quirk_intel_mch()
391 if (res->end < mch.start || res->start > mch.end) in quirk_intel_mch()
393 if (res->start == mch.start && res->end == mch.end) in quirk_intel_mch()
396 …dev_info(&dev->dev, FW_BUG "PNP resource %pR covers only part of %s Intel MCH; extending to %pR\n", in quirk_intel_mch()
398 res->start = mch.start; in quirk_intel_mch()
399 res->end = mch.end; in quirk_intel_mch()
419 /* Soundblaster audio device io port range quirk */
427 /* Add IRQ-optional MPU options */
447 for (f = pnp_fixups; *f->id; f++) { in pnp_fixup_device()
448 if (!compare_pnp_id(dev->id, f->id)) in pnp_fixup_device()
450 pnp_dbg(&dev->dev, "%s: calling %pS\n", f->id, in pnp_fixup_device()
451 f->quirk_function); in pnp_fixup_device()
452 f->quirk_function(dev); in pnp_fixup_device()