diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-02-23 12:41:29 -0500 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-02-23 17:00:11 -0500 |
commit | dc54c23bb0e29de1bcaa40dbeffbc6cac641fb22 (patch) | |
tree | e5393d0a018601d080254a3531e0b000819753ec /arch/arm | |
parent | 48e5114d6f4cade466b127c6aad09769a574b557 (diff) |
ARM: Tegra: Make tegra_dma_init a postcore_initcall
The following commit makes the Tegra APB DMA engine fail to initialize
correctly: 0cf6230af909a86f81907455eca2a5c9b8f68fe6
ARM: tegra: Move tegra_common_init to tegra_init_early
The reason is that tegra_init_early_ calls tegra_dma_init which calls
request_threaded_irq, which fails since the IRQ hasn't yet been marked
valid; that only happens in tegra_init_irq, which gets called after
tegra_init_early.
This used to work OK, since tegra_init_early was tegra_common_init, which
got called after tegra_init_irq, basically from the beginning of
tegra_harmony_init.
Solve this by converting tegra_dma_init to a postcore_initcall. This makes
it execute late enough that IRQs are marked valid, and avoids having to
add it back to every machine's init function.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-tegra/common.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-tegra/dma.c | 1 |
2 files changed, 1 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c index 516e1000ebb4..d5e3f89b05af 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <asm/hardware/cache-l2x0.h> | 25 | #include <asm/hardware/cache-l2x0.h> |
26 | 26 | ||
27 | #include <mach/iomap.h> | 27 | #include <mach/iomap.h> |
28 | #include <mach/dma.h> | ||
29 | #include <mach/system.h> | 28 | #include <mach/system.h> |
30 | 29 | ||
31 | #include "board.h" | 30 | #include "board.h" |
@@ -81,7 +80,4 @@ void __init tegra_init_early(void) | |||
81 | tegra_init_clock(); | 80 | tegra_init_clock(); |
82 | tegra_clk_init_from_table(common_clk_init_table); | 81 | tegra_clk_init_from_table(common_clk_init_table); |
83 | tegra_init_cache(); | 82 | tegra_init_cache(); |
84 | #ifdef CONFIG_TEGRA_SYSTEM_DMA | ||
85 | tegra_dma_init(); | ||
86 | #endif | ||
87 | } | 83 | } |
diff --git a/arch/arm/mach-tegra/dma.c b/arch/arm/mach-tegra/dma.c index 2d720f2b6c75..bd4f62a613aa 100644 --- a/arch/arm/mach-tegra/dma.c +++ b/arch/arm/mach-tegra/dma.c | |||
@@ -743,6 +743,7 @@ fail: | |||
743 | } | 743 | } |
744 | return ret; | 744 | return ret; |
745 | } | 745 | } |
746 | postcore_initcall(tegra_dma_init); | ||
746 | 747 | ||
747 | #ifdef CONFIG_PM | 748 | #ifdef CONFIG_PM |
748 | static u32 apb_dma[5*TEGRA_SYSTEM_DMA_CH_NR + 3]; | 749 | static u32 apb_dma[5*TEGRA_SYSTEM_DMA_CH_NR + 3]; |