Lines Matching refs:io7
73 io7_get_irq_ctl(unsigned int irq, struct io7 **pio7) in io7_get_irq_ctl()
77 struct io7 *io7; in io7_get_irq_ctl() local
81 if (!(io7 = marvel_find_io7(pid))) { in io7_get_irq_ctl()
98 ctl = &io7->csrs->PO7_LSI_CTL[irq & 0xff].csr; /* assume LSI */ in io7_get_irq_ctl()
100 ctl = &io7->csrs->PO7_MSI_CTL[((irq - 0x80) >> 5) & 0x0f].csr; in io7_get_irq_ctl()
102 if (pio7) *pio7 = io7; in io7_get_irq_ctl()
111 struct io7 *io7; in io7_enable_irq() local
113 ctl = io7_get_irq_ctl(irq, &io7); in io7_enable_irq()
114 if (!ctl || !io7) { in io7_enable_irq()
120 spin_lock(&io7->irq_lock); in io7_enable_irq()
124 spin_unlock(&io7->irq_lock); in io7_enable_irq()
132 struct io7 *io7; in io7_disable_irq() local
134 ctl = io7_get_irq_ctl(irq, &io7); in io7_disable_irq()
135 if (!ctl || !io7) { in io7_disable_irq()
141 spin_lock(&io7->irq_lock); in io7_disable_irq()
145 spin_unlock(&io7->irq_lock); in io7_disable_irq()
175 io7_redirect_irq(struct io7 *io7, in io7_redirect_irq() argument
191 io7_redirect_one_lsi(struct io7 *io7, unsigned int which, unsigned int where) in io7_redirect_one_lsi() argument
198 val = io7->csrs->PO7_LSI_CTL[which].csr; in io7_redirect_one_lsi()
202 io7->csrs->PO7_LSI_CTL[which].csr = val; in io7_redirect_one_lsi()
204 io7->csrs->PO7_LSI_CTL[which].csr; in io7_redirect_one_lsi()
208 io7_redirect_one_msi(struct io7 *io7, unsigned int which, unsigned int where) in io7_redirect_one_msi() argument
215 val = io7->csrs->PO7_MSI_CTL[which].csr; in io7_redirect_one_msi()
219 io7->csrs->PO7_MSI_CTL[which].csr = val; in io7_redirect_one_msi()
221 io7->csrs->PO7_MSI_CTL[which].csr; in io7_redirect_one_msi()
225 init_one_io7_lsi(struct io7 *io7, unsigned int which, unsigned int where) in init_one_io7_lsi() argument
230 io7->csrs->PO7_LSI_CTL[which].csr = ((unsigned long)where << 14); in init_one_io7_lsi()
232 io7->csrs->PO7_LSI_CTL[which].csr; in init_one_io7_lsi()
236 init_one_io7_msi(struct io7 *io7, unsigned int which, unsigned int where) in init_one_io7_msi() argument
241 io7->csrs->PO7_MSI_CTL[which].csr = ((unsigned long)where << 14); in init_one_io7_msi()
243 io7->csrs->PO7_MSI_CTL[which].csr; in init_one_io7_msi()
247 init_io7_irqs(struct io7 *io7, in init_io7_irqs() argument
251 long base = (io7->pe << MARVEL_IRQ_VEC_PE_SHIFT) + 16; in init_io7_irqs()
255 io7->pe, base); in init_io7_irqs()
268 spin_lock(&io7->irq_lock); in init_io7_irqs()
271 io7_redirect_irq(io7, &io7->csrs->HLT_CTL.csr, boot_cpuid); in init_io7_irqs()
272 io7_redirect_irq(io7, &io7->csrs->HPI_CTL.csr, boot_cpuid); in init_io7_irqs()
273 io7_redirect_irq(io7, &io7->csrs->CRD_CTL.csr, boot_cpuid); in init_io7_irqs()
274 io7_redirect_irq(io7, &io7->csrs->STV_CTL.csr, boot_cpuid); in init_io7_irqs()
275 io7_redirect_irq(io7, &io7->csrs->HEI_CTL.csr, boot_cpuid); in init_io7_irqs()
285 init_one_io7_lsi(io7, i, boot_cpuid); in init_io7_irqs()
287 init_one_io7_lsi(io7, 0x74, boot_cpuid); in init_io7_irqs()
288 init_one_io7_lsi(io7, 0x75, boot_cpuid); in init_io7_irqs()
298 init_one_io7_msi(io7, i, boot_cpuid); in init_io7_irqs()
300 spin_unlock(&io7->irq_lock); in init_io7_irqs()
307 struct io7 *io7 = NULL; in marvel_init_irq() local
316 for (io7 = NULL; (io7 = marvel_next_io7(io7)) != NULL; ) in marvel_init_irq()
317 init_io7_irqs(io7, &io7_lsi_irq_type, &io7_msi_irq_type); in marvel_init_irq()
325 struct io7 *io7 = io7_port->io7; in marvel_map_irq() local
360 (irq + 16) | (io7->pe << MARVEL_IRQ_VEC_PE_SHIFT), in marvel_map_irq()
361 (irq + 16) | (io7->pe << MARVEL_IRQ_VEC_PE_SHIFT)); in marvel_map_irq()
375 irq |= io7->pe << MARVEL_IRQ_VEC_PE_SHIFT; /* merge the pid */ in marvel_map_irq()
383 struct io7 *io7; in marvel_init_pci() local
392 for (io7 = NULL; (io7 = marvel_next_io7(io7)) != NULL; ) in marvel_init_pci()
393 io7_clear_errors(io7); in marvel_init_pci()
457 struct io7 *io7 = marvel_find_io7(cpuid); in marvel_smp_callin() local
460 if (!io7) in marvel_smp_callin()
469 io7_redirect_irq(io7, &io7->csrs->HLT_CTL.csr, cpuid); in marvel_smp_callin()
470 io7_redirect_irq(io7, &io7->csrs->HPI_CTL.csr, cpuid); in marvel_smp_callin()
471 io7_redirect_irq(io7, &io7->csrs->CRD_CTL.csr, cpuid); in marvel_smp_callin()
472 io7_redirect_irq(io7, &io7->csrs->STV_CTL.csr, cpuid); in marvel_smp_callin()
473 io7_redirect_irq(io7, &io7->csrs->HEI_CTL.csr, cpuid); in marvel_smp_callin()
477 io7_redirect_one_lsi(io7, i, cpuid); in marvel_smp_callin()
479 io7_redirect_one_lsi(io7, 0x74, cpuid); in marvel_smp_callin()
480 io7_redirect_one_lsi(io7, 0x75, cpuid); in marvel_smp_callin()
484 io7_redirect_one_msi(io7, i, cpuid); in marvel_smp_callin()