diff options
author | Quinn Jensen <quinn.jensen@freescale.com> | 2007-10-24 21:25:29 -0600 |
---|---|---|
committer | Quinn Jensen <quinn.jensen@freescale.com> | 2007-10-24 21:25:29 -0600 |
commit | 4465015d95c5e6b53cd5366597e9a34610641168 (patch) | |
tree | 22c7aa383a6a92d823f39d1d2debb1d5ca65bbf3 | |
parent | 1121e56b08eaa6d9b1363db84560937377911248 (diff) |
CR ENGR00047074 Fix FIR functionality break
Patch for CR ENGR00047074: Fix the FIR functionality break, by moving
the FIR data structures to platform specific file and initialising it
properly. Applies to linux 2.6.22 kernel for MX3 platforms.
http://www.bitshrine.org/gpp/linux-2.6.22-mx-CR-ENGR00047074-Fix-FIR-functionality-brea.patch
-rw-r--r-- | arch/arm/mach-mx3/devices.c | 58 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mx31ads.c | 62 |
2 files changed, 62 insertions, 58 deletions
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index 18dee757dc21..df94ab3172af 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c @@ -280,63 +280,6 @@ static inline void mxc_init_ipu(void) } #endif -#if defined(CONFIG_MXC_FIR) || defined(CONFIG_MXC_FIR_MODULE) -/*! - * Resource definition for the FIR - */ -static struct resource mxcir_resources[] = { - [0] = { - .start = UART2_BASE_ADDR, - .end = UART2_BASE_ADDR + SZ_16K - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = INT_UART2, - .end = INT_UART2, - .flags = IORESOURCE_IRQ, - }, - [2] = { - .start = FIRI_BASE_ADDR, - .end = FIRI_BASE_ADDR + SZ_16K - 1, - .flags = IORESOURCE_MEM, - }, - [3] = { - .start = INT_FIRI, - .end = INT_FIRI, - .flags = IORESOURCE_IRQ, - }, - [4] = { - .start = INT_UART2, - .end = INT_UART2, - .flags = IORESOURCE_IRQ, - } -}; - -static struct mxc_ir_platform_data ir_data; - -/*! Device Definition for MXC FIR */ -static struct platform_device mxcir_device = { - .name = "mxcir", - .id = 0, - .dev = { - .release = mxc_nop_release, - .platform_data = &ir_data, - }, - .num_resources = ARRAY_SIZE(mxcir_resources), - .resource = mxcir_resources, -}; - -static inline void mxc_init_ir(void) -{ - ir_data.uart_ir_mux = 1; - ir_data.uart_clk = clk_get(NULL, "uart_clk.1");; - (void)platform_device_register(&mxcir_device); -} -#else -static inline void mxc_init_ir(void) -{ -} -#endif /*! * This is platform device structure for adding SCC */ @@ -965,7 +908,6 @@ static int __init mxc_init_devices(void) mxc_init_wdt(); mxc_init_ipu(); mxc_init_mmc(); - mxc_init_ir(); mxc_init_spi(); mxc_init_i2c(); mxc_init_rtc(); diff --git a/arch/arm/mach-mx3/mx31ads.c b/arch/arm/mach-mx3/mx31ads.c index 8878133bb55b..0406373ca875 100644 --- a/arch/arm/mach-mx3/mx31ads.c +++ b/arch/arm/mach-mx3/mx31ads.c @@ -390,6 +390,67 @@ static inline void mxc_init_fb(void) } #endif +#if defined(CONFIG_MXC_FIR) || defined(CONFIG_MXC_FIR_MODULE) +/*! + * Resource definition for the FIR + */ +static struct resource mxcir_resources[] = { + [0] = { + .start = UART2_BASE_ADDR, + .end = UART2_BASE_ADDR + SZ_16K - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = INT_UART2, + .end = INT_UART2, + .flags = IORESOURCE_IRQ, + }, + [2] = { + .start = FIRI_BASE_ADDR, + .end = FIRI_BASE_ADDR + SZ_16K - 1, + .flags = IORESOURCE_MEM, + }, + [3] = { + .start = INT_FIRI, + .end = INT_FIRI, + .flags = IORESOURCE_IRQ, + }, + [4] = { + .start = INT_UART2, + .end = INT_UART2, + .flags = IORESOURCE_IRQ, + } +}; + +static struct mxc_ir_platform_data ir_data = { + .uart_ir_mux = 1, + .ir_rx_invert = MXC_IRDA_RX_INV, + .ir_tx_invert = MXC_IRDA_TX_INV, +}; + +/*! Device Definition for MXC FIR */ +static struct platform_device mxcir_device = { + .name = "mxcir", + .id = 0, + .dev = { + .release = mxc_nop_release, + .platform_data = &ir_data, + }, + .num_resources = ARRAY_SIZE(mxcir_resources), + .resource = mxcir_resources, +}; + +static inline void mxc_init_ir(void) +{ + ir_data.uart_clk = clk_get(NULL, "uart_clk.1");; + (void)platform_device_register(&mxcir_device); +} +#else +static inline void mxc_init_ir(void) +{ +} +#endif + static void mxc_expio_irq_handler(u32 irq, struct irq_desc *desc) { u32 imr_val; @@ -610,6 +671,7 @@ static void __init mxc_board_init(void) ARRAY_SIZE(mxc_spi_board_info)); mxc_init_fb(); + mxc_init_ir(); } #define PLL_PCTL_REG(pd, mfd, mfi, mfn) \ |