Skip to content

Commit 3645f0c

Browse files
committed
Merge tag 'irq' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull arm-soc sparse IRQ conversion from Arnd Bergmann: "The I.MX platform is getting converted to use sparse IRQs. We are doing this for all platforms over time, because this is one of the requirements for building a multiplatform kernel, and generally a good idea." * tag 'irq' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: imx: select USE_OF ARM: imx: Fix build error due to missing irqs.h include ARM: imx: enable SPARSE_IRQ for imx platform ARM: fiq: change FIQ_START to a variable tty: serial: imx: remove the use of MXC_INTERNAL_IRQS ARM: imx: remove unneeded mach/irq.h inclusion i2c: imx: remove unneeded mach/irqs.h inclusion ARM: imx: add a legacy irqdomain for mx31ads ARM: imx: add a legacy irqdomain for 3ds_debugboard ARM: imx: pass gpio than irq number into mxc_expio_init ARM: imx: leave irq_base of wm8350_platform_data uninitialized dma: ipu: remove the use of ipu_platform_data ARM: imx: move irq_domain_add_legacy call into avic driver ARM: imx: move irq_domain_add_legacy call into tzic driver gpio/mxc: move irq_domain_add_legacy call into gpio driver ARM: imx: eliminate macro IRQ_GPIOx() ARM: imx: eliminate macro IOMUX_TO_IRQ() ARM: imx: eliminate macro IMX_GPIO_TO_IRQ()
2 parents f1d2c07 + c7b0807 commit 3645f0c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1052
-1131
lines changed

arch/arm/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,8 @@ config ARCH_MXC
470470
select CLKSRC_MMIO
471471
select GENERIC_IRQ_CHIP
472472
select MULTI_IRQ_HANDLER
473+
select SPARSE_IRQ
474+
select USE_OF
473475
help
474476
Support for Freescale MXC/iMX-based family of processors
475477

arch/arm/include/asm/mach/irq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ struct seq_file;
1717
/*
1818
* This is internal. Do not use it.
1919
*/
20-
extern void init_FIQ(void);
20+
extern void init_FIQ(int);
2121
extern int show_fiq_list(struct seq_file *, int);
2222

2323
#ifdef CONFIG_MULTI_IRQ_HANDLER

arch/arm/kernel/fiq.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,16 @@ void release_fiq(struct fiq_handler *f)
122122
while (current_fiq->fiq_op(current_fiq->dev_id, 0));
123123
}
124124

125+
static int fiq_start;
126+
125127
void enable_fiq(int fiq)
126128
{
127-
enable_irq(fiq + FIQ_START);
129+
enable_irq(fiq + fiq_start);
128130
}
129131

130132
void disable_fiq(int fiq)
131133
{
132-
disable_irq(fiq + FIQ_START);
134+
disable_irq(fiq + fiq_start);
133135
}
134136

135137
EXPORT_SYMBOL(set_fiq_handler);
@@ -140,7 +142,8 @@ EXPORT_SYMBOL(release_fiq);
140142
EXPORT_SYMBOL(enable_fiq);
141143
EXPORT_SYMBOL(disable_fiq);
142144

143-
void __init init_FIQ(void)
145+
void __init init_FIQ(int start)
144146
{
145147
no_fiq_insn = *(unsigned long *)0xffff001c;
148+
fiq_start = start;
146149
}

arch/arm/mach-imx/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,6 @@ config MACH_IMX27IPCAM
382382
config MACH_IMX27_DT
383383
bool "Support i.MX27 platforms from device tree"
384384
select SOC_IMX27
385-
select USE_OF
386385
help
387386
Include support for Freescale i.MX27 based platforms
388387
using the device tree for discovery
@@ -674,7 +673,6 @@ comment "i.MX51 machines:"
674673
config MACH_IMX51_DT
675674
bool "Support i.MX51 platforms from device tree"
676675
select SOC_IMX51
677-
select USE_OF
678676
select MACH_MX51_BABBAGE
679677
help
680678
Include support for Freescale i.MX51 based platforms
@@ -770,7 +768,6 @@ comment "i.MX53 machines:"
770768
config MACH_IMX53_DT
771769
bool "Support i.MX53 platforms from device tree"
772770
select SOC_IMX53
773-
select USE_OF
774771
select MACH_MX53_ARD
775772
select MACH_MX53_EVK
776773
select MACH_MX53_LOCO
@@ -845,7 +842,6 @@ config SOC_IMX6Q
845842
select MFD_ANATOP
846843
select PINCTRL
847844
select PINCTRL_IMX6Q
848-
select USE_OF
849845

850846
help
851847
This enables support for Freescale i.MX6 Quad processor.

arch/arm/mach-imx/devices-imx31.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ extern const struct imx_imx_uart_1irq_data imx31_imx_uart_data[];
4242
#define imx31_add_imx_uart4(pdata) imx31_add_imx_uart(4, pdata)
4343

4444
extern const struct imx_ipu_core_data imx31_ipu_core_data;
45-
#define imx31_add_ipu_core(pdata) \
46-
imx_add_ipu_core(&imx31_ipu_core_data, pdata)
45+
#define imx31_add_ipu_core() \
46+
imx_add_ipu_core(&imx31_ipu_core_data)
4747
#define imx31_alloc_mx3_camera(pdata) \
4848
imx_alloc_mx3_camera(&imx31_ipu_core_data, pdata)
4949
#define imx31_add_mx3_sdc_fb(pdata) \

arch/arm/mach-imx/devices-imx35.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ extern const struct imx_imx_uart_1irq_data imx35_imx_uart_data[];
5050
#define imx35_add_imx_uart2(pdata) imx35_add_imx_uart(2, pdata)
5151

5252
extern const struct imx_ipu_core_data imx35_ipu_core_data;
53-
#define imx35_add_ipu_core(pdata) \
54-
imx_add_ipu_core(&imx35_ipu_core_data, pdata)
53+
#define imx35_add_ipu_core() \
54+
imx_add_ipu_core(&imx35_ipu_core_data)
5555
#define imx35_alloc_mx3_camera(pdata) \
5656
imx_alloc_mx3_camera(&imx35_ipu_core_data, pdata)
5757
#define imx35_add_mx3_sdc_fb(pdata) \

arch/arm/mach-imx/eukrea_mbimx27-baseboard.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ static struct spi_board_info __maybe_unused
266266
.bus_num = 0,
267267
.chip_select = 0,
268268
.max_speed_hz = 1500000,
269-
.irq = IRQ_GPIOD(25),
269+
/* irq number is run-time assigned */
270270
.platform_data = &ads7846_config,
271271
.mode = SPI_MODE_2,
272272
},
@@ -329,6 +329,7 @@ void __init eukrea_mbimx27_baseboard_init(void)
329329
/* SPI_CS0 init */
330330
mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT);
331331
imx27_add_spi_imx0(&eukrea_mbimx27_spi0_data);
332+
eukrea_mbimx27_spi_board_info[0].irq = gpio_to_irq(IMX_GPIO_NR(4, 25));
332333
spi_register_board_info(eukrea_mbimx27_spi_board_info,
333334
ARRAY_SIZE(eukrea_mbimx27_spi_board_info));
334335

arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ static const struct fb_videomode fb_modedb[] = {
9595
},
9696
};
9797

98-
static const struct ipu_platform_data mx3_ipu_data __initconst = {
99-
.irq_base = MXC_IPU_IRQ_START,
100-
};
101-
10298
static struct mx3fb_platform_data mx3fb_pdata __initdata = {
10399
.name = "CMO-QVGA",
104100
.mode = fb_modedb,
@@ -287,7 +283,7 @@ void __init eukrea_mbimxsd35_baseboard_init(void)
287283
printk(KERN_ERR "error setting mbimxsd pads !\n");
288284

289285
imx35_add_imx_uart1(&uart_pdata);
290-
imx35_add_ipu_core(&mx3_ipu_data);
286+
imx35_add_ipu_core();
291287
imx35_add_mx3_sdc_fb(&mx3fb_pdata);
292288

293289
imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata);

arch/arm/mach-imx/imx27-dt.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
*/
1111

1212
#include <linux/irq.h>
13-
#include <linux/irqdomain.h>
1413
#include <linux/of_irq.h>
1514
#include <linux/of_platform.h>
1615
#include <asm/mach/arch.h>
@@ -33,35 +32,8 @@ static const struct of_dev_auxdata imx27_auxdata_lookup[] __initconst = {
3332
{ /* sentinel */ }
3433
};
3534

36-
static int __init imx27_avic_add_irq_domain(struct device_node *np,
37-
struct device_node *interrupt_parent)
38-
{
39-
irq_domain_add_legacy(np, 64, 0, 0, &irq_domain_simple_ops, NULL);
40-
return 0;
41-
}
42-
43-
static int __init imx27_gpio_add_irq_domain(struct device_node *np,
44-
struct device_node *interrupt_parent)
45-
{
46-
static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS;
47-
48-
gpio_irq_base -= 32;
49-
irq_domain_add_legacy(np, 32, gpio_irq_base, 0, &irq_domain_simple_ops,
50-
NULL);
51-
52-
return 0;
53-
}
54-
55-
static const struct of_device_id imx27_irq_match[] __initconst = {
56-
{ .compatible = "fsl,imx27-avic", .data = imx27_avic_add_irq_domain, },
57-
{ .compatible = "fsl,imx27-gpio", .data = imx27_gpio_add_irq_domain, },
58-
{ /* sentinel */ }
59-
};
60-
6135
static void __init imx27_dt_init(void)
6236
{
63-
of_irq_init(imx27_irq_match);
64-
6537
of_platform_populate(NULL, of_default_bus_match_table,
6638
imx27_auxdata_lookup, NULL);
6739
}

arch/arm/mach-imx/imx51-dt.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
*/
1212

1313
#include <linux/irq.h>
14-
#include <linux/irqdomain.h>
1514
#include <linux/of_irq.h>
1615
#include <linux/of_platform.h>
1716
#include <linux/pinctrl/machine.h>
@@ -45,30 +44,6 @@ static const struct of_dev_auxdata imx51_auxdata_lookup[] __initconst = {
4544
{ /* sentinel */ }
4645
};
4746

48-
static int __init imx51_tzic_add_irq_domain(struct device_node *np,
49-
struct device_node *interrupt_parent)
50-
{
51-
irq_domain_add_legacy(np, 128, 0, 0, &irq_domain_simple_ops, NULL);
52-
return 0;
53-
}
54-
55-
static int __init imx51_gpio_add_irq_domain(struct device_node *np,
56-
struct device_node *interrupt_parent)
57-
{
58-
static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS;
59-
60-
gpio_irq_base -= 32;
61-
irq_domain_add_legacy(np, 32, gpio_irq_base, 0, &irq_domain_simple_ops, NULL);
62-
63-
return 0;
64-
}
65-
66-
static const struct of_device_id imx51_irq_match[] __initconst = {
67-
{ .compatible = "fsl,imx51-tzic", .data = imx51_tzic_add_irq_domain, },
68-
{ .compatible = "fsl,imx51-gpio", .data = imx51_gpio_add_irq_domain, },
69-
{ /* sentinel */ }
70-
};
71-
7247
static const struct of_device_id imx51_iomuxc_of_match[] __initconst = {
7348
{ .compatible = "fsl,imx51-iomuxc-babbage", .data = imx51_babbage_common_init, },
7449
{ /* sentinel */ }
@@ -80,8 +55,6 @@ static void __init imx51_dt_init(void)
8055
const struct of_device_id *of_id;
8156
void (*func)(void);
8257

83-
of_irq_init(imx51_irq_match);
84-
8558
pinctrl_provide_dummies();
8659

8760
node = of_find_matching_node(NULL, imx51_iomuxc_of_match);

0 commit comments

Comments
 (0)