2007-07-09 15:06:53 -06:00
|
|
|
/*
|
|
|
|
* Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ASM_ARCH_MXC_IRQS_H__
|
|
|
|
#define __ASM_ARCH_MXC_IRQS_H__
|
|
|
|
|
2008-12-18 03:08:55 -07:00
|
|
|
/*
|
2009-12-03 13:36:41 -07:00
|
|
|
* SoCs with TZIC interrupt controller have 128 IRQs, those with AVIC have 64
|
2008-12-18 03:08:55 -07:00
|
|
|
*/
|
2009-12-03 13:36:41 -07:00
|
|
|
#ifdef CONFIG_MXC_TZIC
|
|
|
|
#define MXC_INTERNAL_IRQS 128
|
|
|
|
#else
|
2008-12-18 03:08:55 -07:00
|
|
|
#define MXC_INTERNAL_IRQS 64
|
2009-12-03 13:36:41 -07:00
|
|
|
#endif
|
2008-12-18 03:08:55 -07:00
|
|
|
|
|
|
|
#define MXC_GPIO_IRQ_START MXC_INTERNAL_IRQS
|
|
|
|
|
2010-02-17 13:08:00 -07:00
|
|
|
/* these are ordered by size to support multi-SoC kernels */
|
|
|
|
#if defined CONFIG_ARCH_MX2
|
2008-12-18 03:08:55 -07:00
|
|
|
#define MXC_GPIO_IRQS (32 * 6)
|
2010-02-17 13:08:00 -07:00
|
|
|
#elif defined CONFIG_ARCH_MX1
|
|
|
|
#define MXC_GPIO_IRQS (32 * 4)
|
2009-06-04 03:32:12 -06:00
|
|
|
#elif defined CONFIG_ARCH_MX25
|
|
|
|
#define MXC_GPIO_IRQS (32 * 4)
|
2010-02-04 13:09:40 -07:00
|
|
|
#elif defined CONFIG_ARCH_MX5
|
|
|
|
#define MXC_GPIO_IRQS (32 * 4)
|
2009-07-31 05:29:22 -06:00
|
|
|
#elif defined CONFIG_ARCH_MXC91231
|
|
|
|
#define MXC_GPIO_IRQS (32 * 4)
|
2010-02-17 13:08:00 -07:00
|
|
|
#elif defined CONFIG_ARCH_MX3
|
|
|
|
#define MXC_GPIO_IRQS (32 * 3)
|
2008-12-18 03:08:55 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The next 16 interrupts are for board specific purposes. Since
|
|
|
|
* the kernel can only run on one machine at a time, we can re-use
|
|
|
|
* these. If you need more, increase MXC_BOARD_IRQS, but keep it
|
|
|
|
* within sensible limits.
|
|
|
|
*/
|
|
|
|
#define MXC_BOARD_IRQ_START (MXC_INTERNAL_IRQS + MXC_GPIO_IRQS)
|
2010-01-05 09:05:16 -07:00
|
|
|
|
|
|
|
#ifdef CONFIG_MACH_MX31ADS_WM1133_EV1
|
|
|
|
#define MXC_BOARD_IRQS 80
|
|
|
|
#else
|
2008-12-18 03:08:55 -07:00
|
|
|
#define MXC_BOARD_IRQS 16
|
2010-01-05 09:05:16 -07:00
|
|
|
#endif
|
2008-12-18 03:08:55 -07:00
|
|
|
|
i.MX31: Image Processing Unit DMA and IRQ drivers
i.MX3x SoCs contain an Image Processing Unit, consisting of a Control
Module (CM), Display Interface (DI), Synchronous Display Controller (SDC),
Asynchronous Display Controller (ADC), Image Converter (IC), Post-Filter
(PF), Camera Sensor Interface (CSI), and an Image DMA Controller (IDMAC).
CM contains, among other blocks, an Interrupt Generator (IG) and a Clock
and Reset Control Unit (CRCU). This driver serves IDMAC and IG. They are
supported over dmaengine and irq-chip APIs respectively.
IDMAC is a specialised DMA controller, its DMA channels cannot be used for
general-purpose operations, even though it might be possible to configure
a memory-to-memory channel for memcpy operation. This driver will not work
with generic dmaengine clients, clients, wishing to use it must use
respective wrapper structures, they also must specify which channels they
require, as channels are hard-wired to specific IPU functions.
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2009-01-19 15:36:21 -07:00
|
|
|
#define MXC_IPU_IRQ_START (MXC_BOARD_IRQ_START + MXC_BOARD_IRQS)
|
|
|
|
|
|
|
|
#ifdef CONFIG_MX3_IPU_IRQS
|
|
|
|
#define MX3_IPU_IRQS CONFIG_MX3_IPU_IRQS
|
|
|
|
#else
|
|
|
|
#define MX3_IPU_IRQS 0
|
|
|
|
#endif
|
2010-02-04 13:09:40 -07:00
|
|
|
/* REVISIT: Add IPU irqs on IMX51 */
|
i.MX31: Image Processing Unit DMA and IRQ drivers
i.MX3x SoCs contain an Image Processing Unit, consisting of a Control
Module (CM), Display Interface (DI), Synchronous Display Controller (SDC),
Asynchronous Display Controller (ADC), Image Converter (IC), Post-Filter
(PF), Camera Sensor Interface (CSI), and an Image DMA Controller (IDMAC).
CM contains, among other blocks, an Interrupt Generator (IG) and a Clock
and Reset Control Unit (CRCU). This driver serves IDMAC and IG. They are
supported over dmaengine and irq-chip APIs respectively.
IDMAC is a specialised DMA controller, its DMA channels cannot be used for
general-purpose operations, even though it might be possible to configure
a memory-to-memory channel for memcpy operation. This driver will not work
with generic dmaengine clients, clients, wishing to use it must use
respective wrapper structures, they also must specify which channels they
require, as channels are hard-wired to specific IPU functions.
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2009-01-19 15:36:21 -07:00
|
|
|
|
|
|
|
#define NR_IRQS (MXC_IPU_IRQ_START + MX3_IPU_IRQS)
|
2008-12-18 03:08:55 -07:00
|
|
|
|
2009-04-08 07:17:50 -06:00
|
|
|
extern int imx_irq_set_priority(unsigned char irq, unsigned char prio);
|
2007-07-09 15:06:53 -06:00
|
|
|
|
2008-11-14 03:01:39 -07:00
|
|
|
/* all normal IRQs can be FIQs */
|
|
|
|
#define FIQ_START 0
|
|
|
|
/* switch betwean IRQ and FIQ */
|
|
|
|
extern int mxc_set_irq_fiq(unsigned int irq, unsigned int type);
|
|
|
|
|
2008-03-28 03:59:08 -06:00
|
|
|
#endif /* __ASM_ARCH_MXC_IRQS_H__ */
|