Skip to content

Commit

Permalink
ARM: Tegra: Make tegra_dma_init a postcore_initcall
Browse files Browse the repository at this point in the history
The following commit makes the Tegra APB DMA engine fail to initialize
correctly: 0cf6230
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>
  • Loading branch information
Stephen Warren authored and Colin Cross committed Feb 23, 2011
1 parent 48e5114 commit dc54c23
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 0 additions & 4 deletions arch/arm/mach-tegra/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <asm/hardware/cache-l2x0.h>

#include <mach/iomap.h>
#include <mach/dma.h>
#include <mach/system.h>

#include "board.h"
Expand Down Expand Up @@ -81,7 +80,4 @@ void __init tegra_init_early(void)
tegra_init_clock();
tegra_clk_init_from_table(common_clk_init_table);
tegra_init_cache();
#ifdef CONFIG_TEGRA_SYSTEM_DMA
tegra_dma_init();
#endif
}
1 change: 1 addition & 0 deletions arch/arm/mach-tegra/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,7 @@ int __init tegra_dma_init(void)
}
return ret;
}
postcore_initcall(tegra_dma_init);

#ifdef CONFIG_PM
static u32 apb_dma[5*TEGRA_SYSTEM_DMA_CH_NR + 3];
Expand Down

0 comments on commit dc54c23

Please sign in to comment.