Lines Matching refs:io7
72 io7_get_irq_ctl(unsigned int irq, struct io7 **pio7) in io7_get_irq_ctl()
76 struct io7 *io7; in io7_get_irq_ctl() local
80 if (!(io7 = marvel_find_io7(pid))) { in io7_get_irq_ctl()
97 ctl = &io7->csrs->PO7_LSI_CTL[irq & 0xff].csr; /* assume LSI */ in io7_get_irq_ctl()
99 ctl = &io7->csrs->PO7_MSI_CTL[((irq - 0x80) >> 5) & 0x0f].csr; in io7_get_irq_ctl()
101 if (pio7) *pio7 = io7; in io7_get_irq_ctl()
110 struct io7 *io7; in io7_enable_irq() local
112 ctl = io7_get_irq_ctl(irq, &io7); in io7_enable_irq()
113 if (!ctl || !io7) { in io7_enable_irq()
119 raw_spin_lock(&io7->irq_lock); in io7_enable_irq()
123 raw_spin_unlock(&io7->irq_lock); in io7_enable_irq()
131 struct io7 *io7; in io7_disable_irq() local
133 ctl = io7_get_irq_ctl(irq, &io7); in io7_disable_irq()
134 if (!ctl || !io7) { in io7_disable_irq()
140 raw_spin_lock(&io7->irq_lock); in io7_disable_irq()
144 raw_spin_unlock(&io7->irq_lock); in io7_disable_irq()
174 io7_redirect_irq(struct io7 *io7, in io7_redirect_irq() argument
190 io7_redirect_one_lsi(struct io7 *io7, unsigned int which, unsigned int where) in io7_redirect_one_lsi() argument
197 val = io7->csrs->PO7_LSI_CTL[which].csr; in io7_redirect_one_lsi()
201 io7->csrs->PO7_LSI_CTL[which].csr = val; in io7_redirect_one_lsi()
203 io7->csrs->PO7_LSI_CTL[which].csr; in io7_redirect_one_lsi()
207 io7_redirect_one_msi(struct io7 *io7, unsigned int which, unsigned int where) in io7_redirect_one_msi() argument
214 val = io7->csrs->PO7_MSI_CTL[which].csr; in io7_redirect_one_msi()
218 io7->csrs->PO7_MSI_CTL[which].csr = val; in io7_redirect_one_msi()
220 io7->csrs->PO7_MSI_CTL[which].csr; in io7_redirect_one_msi()
224 init_one_io7_lsi(struct io7 *io7, unsigned int which, unsigned int where) in init_one_io7_lsi() argument
229 io7->csrs->PO7_LSI_CTL[which].csr = ((unsigned long)where << 14); in init_one_io7_lsi()
231 io7->csrs->PO7_LSI_CTL[which].csr; in init_one_io7_lsi()
235 init_one_io7_msi(struct io7 *io7, unsigned int which, unsigned int where) in init_one_io7_msi() argument
240 io7->csrs->PO7_MSI_CTL[which].csr = ((unsigned long)where << 14); in init_one_io7_msi()
242 io7->csrs->PO7_MSI_CTL[which].csr; in init_one_io7_msi()
246 init_io7_irqs(struct io7 *io7, in init_io7_irqs() argument
250 long base = (io7->pe << MARVEL_IRQ_VEC_PE_SHIFT) + 16; in init_io7_irqs()
254 io7->pe, base); in init_io7_irqs()
267 raw_spin_lock(&io7->irq_lock); in init_io7_irqs()
270 io7_redirect_irq(io7, &io7->csrs->HLT_CTL.csr, boot_cpuid); in init_io7_irqs()
271 io7_redirect_irq(io7, &io7->csrs->HPI_CTL.csr, boot_cpuid); in init_io7_irqs()
272 io7_redirect_irq(io7, &io7->csrs->CRD_CTL.csr, boot_cpuid); in init_io7_irqs()
273 io7_redirect_irq(io7, &io7->csrs->STV_CTL.csr, boot_cpuid); in init_io7_irqs()
274 io7_redirect_irq(io7, &io7->csrs->HEI_CTL.csr, boot_cpuid); in init_io7_irqs()
284 init_one_io7_lsi(io7, i, boot_cpuid); in init_io7_irqs()
286 init_one_io7_lsi(io7, 0x74, boot_cpuid); in init_io7_irqs()
287 init_one_io7_lsi(io7, 0x75, boot_cpuid); in init_io7_irqs()
297 init_one_io7_msi(io7, i, boot_cpuid); in init_io7_irqs()
299 raw_spin_unlock(&io7->irq_lock); in init_io7_irqs()
306 struct io7 *io7 = NULL; in marvel_init_irq() local
315 for (io7 = NULL; (io7 = marvel_next_io7(io7)) != NULL; ) in marvel_init_irq()
316 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
393 for (io7 = NULL; (io7 = marvel_next_io7(io7)) != NULL; ) in marvel_init_pci()
394 io7_clear_errors(io7); in marvel_init_pci()
407 struct io7 *io7 = marvel_find_io7(cpuid); in marvel_smp_callin() local
410 if (!io7) in marvel_smp_callin()
419 io7_redirect_irq(io7, &io7->csrs->HLT_CTL.csr, cpuid); in marvel_smp_callin()
420 io7_redirect_irq(io7, &io7->csrs->HPI_CTL.csr, cpuid); in marvel_smp_callin()
421 io7_redirect_irq(io7, &io7->csrs->CRD_CTL.csr, cpuid); in marvel_smp_callin()
422 io7_redirect_irq(io7, &io7->csrs->STV_CTL.csr, cpuid); in marvel_smp_callin()
423 io7_redirect_irq(io7, &io7->csrs->HEI_CTL.csr, cpuid); in marvel_smp_callin()
427 io7_redirect_one_lsi(io7, i, cpuid); in marvel_smp_callin()
429 io7_redirect_one_lsi(io7, 0x74, cpuid); in marvel_smp_callin()
430 io7_redirect_one_lsi(io7, 0x75, cpuid); in marvel_smp_callin()
434 io7_redirect_one_msi(io7, i, cpuid); in marvel_smp_callin()