Loading arch/arm/mach-imx/include/mach/irqs.h +5 −0 Original line number Original line Diff line number Diff line Loading @@ -111,6 +111,11 @@ /* decode irq number to use with IMR(x), ISR(x) and friends */ /* decode irq number to use with IMR(x), ISR(x) and friends */ #define IRQ_TO_REG(irq) ((irq - IMX_IRQS) >> 5) #define IRQ_TO_REG(irq) ((irq - IMX_IRQS) >> 5) /* all normal IRQs can be FIQs */ #define FIQ_START 0 /* switch betwean IRQ and FIQ */ extern int imx_set_irq_fiq(unsigned int irq, unsigned int type); #define NR_IRQS (IRQ_GPIOD(32) + 1) #define NR_IRQS (IRQ_GPIOD(32) + 1) #define IRQ_GPIO(x) #define IRQ_GPIO(x) #endif #endif arch/arm/mach-imx/irq.c +28 −4 Original line number Original line Diff line number Diff line Loading @@ -36,10 +36,7 @@ /* /* * * * We simply use the ENABLE DISABLE registers inside of the IMX * We simply use the ENABLE DISABLE registers inside of the IMX * to turn on/off specific interrupts. FIXME- We should * to turn on/off specific interrupts. * also add support for the accelerated interrupt controller * by putting offets to irq jump code in the appropriate * places. * * */ */ Loading Loading @@ -102,6 +99,28 @@ imx_unmask_irq(unsigned int irq) __raw_writel(irq, IMX_AITC_INTENNUM); __raw_writel(irq, IMX_AITC_INTENNUM); } } #ifdef CONFIG_FIQ int imx_set_irq_fiq(unsigned int irq, unsigned int type) { unsigned int irqt; if (irq >= IMX_IRQS) return -EINVAL; if (irq < IMX_IRQS / 2) { irqt = __raw_readl(IMX_AITC_INTTYPEL) & ~(1 << irq); __raw_writel(irqt | (!!type << irq), IMX_AITC_INTTYPEL); } else { irq -= IMX_IRQS / 2; irqt = __raw_readl(IMX_AITC_INTTYPEH) & ~(1 << irq); __raw_writel(irqt | (!!type << irq), IMX_AITC_INTTYPEH); } return 0; } EXPORT_SYMBOL(imx_set_irq_fiq); #endif /* CONFIG_FIQ */ static int static int imx_gpio_irq_type(unsigned int _irq, unsigned int type) imx_gpio_irq_type(unsigned int _irq, unsigned int type) { { Loading Loading @@ -284,4 +303,9 @@ imx_init_irq(void) /* Release masking of interrupts according to priority */ /* Release masking of interrupts according to priority */ __raw_writel(-1, IMX_AITC_NIMASK); __raw_writel(-1, IMX_AITC_NIMASK); #ifdef CONFIG_FIQ /* Initialize FIQ */ init_FIQ(); #endif } } arch/arm/mach-mx2/devices.h 0 → 100644 +15 −0 Original line number Original line Diff line number Diff line extern struct platform_device mxc_gpt1; extern struct platform_device mxc_gpt2; extern struct platform_device mxc_gpt3; extern struct platform_device mxc_gpt4; extern struct platform_device mxc_gpt5; extern struct platform_device mxc_wdt; extern struct platform_device mxc_irda_device; extern struct platform_device mxc_uart_device0; extern struct platform_device mxc_uart_device1; extern struct platform_device mxc_uart_device2; extern struct platform_device mxc_uart_device3; extern struct platform_device mxc_uart_device4; extern struct platform_device mxc_uart_device5; arch/arm/mach-mx2/mx27ads.c +8 −4 Original line number Original line Diff line number Diff line Loading @@ -34,6 +34,8 @@ #include <mach/iomux-mx1-mx2.h> #include <mach/iomux-mx1-mx2.h> #include <mach/board-mx27ads.h> #include <mach/board-mx27ads.h> #include "devices.h" /* ADS's NOR flash */ /* ADS's NOR flash */ static struct physmap_flash_data mx27ads_flash_data = { static struct physmap_flash_data mx27ads_flash_data = { .width = 2, .width = 2, Loading Loading @@ -251,12 +253,14 @@ static struct imxuart_platform_data uart_pdata[] = { static void __init mx27ads_board_init(void) static void __init mx27ads_board_init(void) { { int i; gpio_fec_active(); gpio_fec_active(); for (i = 0; i < 6; i++) mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); imx_init_uart(i, &uart_pdata[i]); mxc_register_device(&mxc_uart_device1, &uart_pdata[1]); mxc_register_device(&mxc_uart_device2, &uart_pdata[2]); mxc_register_device(&mxc_uart_device3, &uart_pdata[3]); mxc_register_device(&mxc_uart_device4, &uart_pdata[4]); mxc_register_device(&mxc_uart_device5, &uart_pdata[5]); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); } } Loading arch/arm/mach-mx2/pcm038.c +5 −3 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,8 @@ #include <mach/imx-uart.h> #include <mach/imx-uart.h> #include <mach/board-pcm038.h> #include <mach/board-pcm038.h> #include "devices.h" /* /* * Phytec's phyCORE-i.MX27 comes with 32MiB flash, * Phytec's phyCORE-i.MX27 comes with 32MiB flash, * 16 bit width * 16 bit width Loading Loading @@ -170,11 +172,11 @@ static struct platform_device *platform_devices[] __initdata = { static void __init pcm038_init(void) static void __init pcm038_init(void) { { int i; gpio_fec_active(); gpio_fec_active(); for (i = 0; i < 3; i++) mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); imx_init_uart(i, &uart_pdata[i]); mxc_register_device(&mxc_uart_device1, &uart_pdata[1]); mxc_register_device(&mxc_uart_device2, &uart_pdata[2]); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); Loading Loading
arch/arm/mach-imx/include/mach/irqs.h +5 −0 Original line number Original line Diff line number Diff line Loading @@ -111,6 +111,11 @@ /* decode irq number to use with IMR(x), ISR(x) and friends */ /* decode irq number to use with IMR(x), ISR(x) and friends */ #define IRQ_TO_REG(irq) ((irq - IMX_IRQS) >> 5) #define IRQ_TO_REG(irq) ((irq - IMX_IRQS) >> 5) /* all normal IRQs can be FIQs */ #define FIQ_START 0 /* switch betwean IRQ and FIQ */ extern int imx_set_irq_fiq(unsigned int irq, unsigned int type); #define NR_IRQS (IRQ_GPIOD(32) + 1) #define NR_IRQS (IRQ_GPIOD(32) + 1) #define IRQ_GPIO(x) #define IRQ_GPIO(x) #endif #endif
arch/arm/mach-imx/irq.c +28 −4 Original line number Original line Diff line number Diff line Loading @@ -36,10 +36,7 @@ /* /* * * * We simply use the ENABLE DISABLE registers inside of the IMX * We simply use the ENABLE DISABLE registers inside of the IMX * to turn on/off specific interrupts. FIXME- We should * to turn on/off specific interrupts. * also add support for the accelerated interrupt controller * by putting offets to irq jump code in the appropriate * places. * * */ */ Loading Loading @@ -102,6 +99,28 @@ imx_unmask_irq(unsigned int irq) __raw_writel(irq, IMX_AITC_INTENNUM); __raw_writel(irq, IMX_AITC_INTENNUM); } } #ifdef CONFIG_FIQ int imx_set_irq_fiq(unsigned int irq, unsigned int type) { unsigned int irqt; if (irq >= IMX_IRQS) return -EINVAL; if (irq < IMX_IRQS / 2) { irqt = __raw_readl(IMX_AITC_INTTYPEL) & ~(1 << irq); __raw_writel(irqt | (!!type << irq), IMX_AITC_INTTYPEL); } else { irq -= IMX_IRQS / 2; irqt = __raw_readl(IMX_AITC_INTTYPEH) & ~(1 << irq); __raw_writel(irqt | (!!type << irq), IMX_AITC_INTTYPEH); } return 0; } EXPORT_SYMBOL(imx_set_irq_fiq); #endif /* CONFIG_FIQ */ static int static int imx_gpio_irq_type(unsigned int _irq, unsigned int type) imx_gpio_irq_type(unsigned int _irq, unsigned int type) { { Loading Loading @@ -284,4 +303,9 @@ imx_init_irq(void) /* Release masking of interrupts according to priority */ /* Release masking of interrupts according to priority */ __raw_writel(-1, IMX_AITC_NIMASK); __raw_writel(-1, IMX_AITC_NIMASK); #ifdef CONFIG_FIQ /* Initialize FIQ */ init_FIQ(); #endif } }
arch/arm/mach-mx2/devices.h 0 → 100644 +15 −0 Original line number Original line Diff line number Diff line extern struct platform_device mxc_gpt1; extern struct platform_device mxc_gpt2; extern struct platform_device mxc_gpt3; extern struct platform_device mxc_gpt4; extern struct platform_device mxc_gpt5; extern struct platform_device mxc_wdt; extern struct platform_device mxc_irda_device; extern struct platform_device mxc_uart_device0; extern struct platform_device mxc_uart_device1; extern struct platform_device mxc_uart_device2; extern struct platform_device mxc_uart_device3; extern struct platform_device mxc_uart_device4; extern struct platform_device mxc_uart_device5;
arch/arm/mach-mx2/mx27ads.c +8 −4 Original line number Original line Diff line number Diff line Loading @@ -34,6 +34,8 @@ #include <mach/iomux-mx1-mx2.h> #include <mach/iomux-mx1-mx2.h> #include <mach/board-mx27ads.h> #include <mach/board-mx27ads.h> #include "devices.h" /* ADS's NOR flash */ /* ADS's NOR flash */ static struct physmap_flash_data mx27ads_flash_data = { static struct physmap_flash_data mx27ads_flash_data = { .width = 2, .width = 2, Loading Loading @@ -251,12 +253,14 @@ static struct imxuart_platform_data uart_pdata[] = { static void __init mx27ads_board_init(void) static void __init mx27ads_board_init(void) { { int i; gpio_fec_active(); gpio_fec_active(); for (i = 0; i < 6; i++) mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); imx_init_uart(i, &uart_pdata[i]); mxc_register_device(&mxc_uart_device1, &uart_pdata[1]); mxc_register_device(&mxc_uart_device2, &uart_pdata[2]); mxc_register_device(&mxc_uart_device3, &uart_pdata[3]); mxc_register_device(&mxc_uart_device4, &uart_pdata[4]); mxc_register_device(&mxc_uart_device5, &uart_pdata[5]); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); } } Loading
arch/arm/mach-mx2/pcm038.c +5 −3 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,8 @@ #include <mach/imx-uart.h> #include <mach/imx-uart.h> #include <mach/board-pcm038.h> #include <mach/board-pcm038.h> #include "devices.h" /* /* * Phytec's phyCORE-i.MX27 comes with 32MiB flash, * Phytec's phyCORE-i.MX27 comes with 32MiB flash, * 16 bit width * 16 bit width Loading Loading @@ -170,11 +172,11 @@ static struct platform_device *platform_devices[] __initdata = { static void __init pcm038_init(void) static void __init pcm038_init(void) { { int i; gpio_fec_active(); gpio_fec_active(); for (i = 0; i < 3; i++) mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); imx_init_uart(i, &uart_pdata[i]); mxc_register_device(&mxc_uart_device1, &uart_pdata[1]); mxc_register_device(&mxc_uart_device2, &uart_pdata[2]); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); Loading