Lines Matching +full:ave +full:- +full:ctrl
2 * Copyright 2001, 2007-2008 MontaVista Software Inc.
5 * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)
25 * 675 Mass Ave, Cambridge, MA 02139, USA.
35 #include <asm/mach-au1x00/au1000.h>
36 #include <asm/mach-au1x00/gpio-au1300.h>
68 /* per-processor fixed function irqs */
83 * the USB devices-side packet complete interrupt (USB_DEV_REQ_INT)
118 { -1, },
151 { -1, },
186 { -1, },
218 { -1, },
245 { -1, },
283 { -1, }, /* terminator */
290 unsigned int bit = d->irq - AU1000_INTC0_INT_BASE; in au1x_ic0_unmask()
300 unsigned int bit = d->irq - AU1000_INTC1_INT_BASE; in au1x_ic1_unmask()
310 unsigned int bit = d->irq - AU1000_INTC0_INT_BASE; in au1x_ic0_mask()
320 unsigned int bit = d->irq - AU1000_INTC1_INT_BASE; in au1x_ic1_mask()
330 unsigned int bit = d->irq - AU1000_INTC0_INT_BASE; in au1x_ic0_ack()
344 unsigned int bit = d->irq - AU1000_INTC1_INT_BASE; in au1x_ic1_ack()
358 unsigned int bit = d->irq - AU1000_INTC0_INT_BASE; in au1x_ic0_maskack()
370 unsigned int bit = d->irq - AU1000_INTC1_INT_BASE; in au1x_ic1_maskack()
382 int bit = d->irq - AU1000_INTC1_INT_BASE; in au1x_ic1_setwake()
385 /* only GPIO 0-7 can act as wakeup source. Fortunately these in au1x_ic1_setwake()
389 return -EINVAL; in au1x_ic1_setwake()
408 .name = "Alchemy-IC0",
417 .name = "Alchemy-IC1",
429 unsigned int bit, irq = d->irq; in au1x_ic_settype()
436 bit = irq - AU1000_INTC1_INT_BASE; in au1x_ic_settype()
440 bit = irq - AU1000_INTC0_INT_BASE; in au1x_ic_settype()
446 return -EINVAL; in au1x_ic_settype()
492 ret = -EINVAL; in au1x_ic_settype()
504 * au1300_gpic_chgcfg - change PIN configuration.
505 * @gpio: pin to change (0-based GPIO number from datasheet).
528 * au1300_pinfunc_to_gpio - assign a pin as GPIO input (GPIO ctrl).
529 * @pin: pin (0-based GPIO number from datasheet).
543 * au1300_pinfunc_to_dev - assign a pin to the device function.
544 * @pin: pin (0-based GPIO number from datasheet).
562 * au1300_set_irq_priority - set internal priority of IRQ.
568 irq -= ALCHEMY_GPIC_INT_BASE; in au1300_set_irq_priority()
574 * au1300_set_dbdma_gpio - assign a gpio to one of the DBDMA triggers.
603 unsigned long bit, irq = d->irq; in au1300_gpic_mask()
605 irq -= ALCHEMY_GPIC_INT_BASE; in au1300_gpic_mask()
617 unsigned long bit, irq = d->irq; in au1300_gpic_unmask()
619 irq -= ALCHEMY_GPIC_INT_BASE; in au1300_gpic_unmask()
632 unsigned long bit, irq = d->irq; in au1300_gpic_maskack()
634 irq -= ALCHEMY_GPIC_INT_BASE; in au1300_gpic_maskack()
647 unsigned long bit, irq = d->irq; in au1300_gpic_ack()
649 irq -= ALCHEMY_GPIC_INT_BASE; in au1300_gpic_ack()
703 return -EINVAL; in au1300_gpic_settype()
708 au1300_gpic_chgcfg(d->irq - ALCHEMY_GPIC_INT_BASE, GPIC_CFG_IC_MASK, s); in au1300_gpic_settype()
799 /* save pin/int-type configuration */ in alchemy_gpic_suspend()
821 /* restore pin/int-type configurations */ in alchemy_gpic_resume()
852 /* create chained handlers for the 4 IC requests to the MIPS IRQ ctrl */
900 while (map->irq != -1) { in au1000_init_irq()
901 irq_nr = map->irq; in au1000_init_irq()
904 bit = irq_nr - AU1000_INTC1_INT_BASE; in au1000_init_irq()
907 bit = irq_nr - AU1000_INTC0_INT_BASE; in au1000_init_irq()
910 if (map->prio == 0) in au1000_init_irq()
913 au1x_ic_settype(irq_get_irq_data(irq_nr), map->type); in au1000_init_irq()
946 /* setup known on-chip sources */ in alchemy_gpic_init_irq()
947 while ((i = dints->irq) != -1) { in alchemy_gpic_init_irq()
948 au1300_gpic_settype(irq_get_irq_data(i), dints->type); in alchemy_gpic_init_irq()
949 au1300_set_irq_priority(i, dints->prio); in alchemy_gpic_init_irq()
951 if (dints->internal) in alchemy_gpic_init_irq()
952 au1300_pinfunc_to_dev(i - ALCHEMY_GPIC_INT_BASE); in alchemy_gpic_init_irq()