summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r--arch/arm/mach-tegra/apbio.c8
-rw-r--r--arch/arm/mach-tegra/apbio.h1
-rw-r--r--arch/arm/mach-tegra/common.c1
3 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/apbio.c b/arch/arm/mach-tegra/apbio.c
index d6e08c966e72..b5e6caf20104 100644
--- a/arch/arm/mach-tegra/apbio.c
+++ b/arch/arm/mach-tegra/apbio.c
@@ -129,14 +129,14 @@ void tegra_apb_writel(u32 value, unsigned long offset)
apb_writel(value, offset);
}
-void tegra_init_apb_dma(void)
+static int tegra_init_apb_dma(void)
{
#ifdef CONFIG_TEGRA_SYSTEM_DMA
tegra_apb_dma = tegra_dma_allocate_channel(TEGRA_DMA_MODE_ONESHOT |
TEGRA_DMA_SHARED);
if (!tegra_apb_dma) {
pr_err("%s: can not allocate dma channel\n", __func__);
- return;
+ return -ENODEV;
}
tegra_apb_bb = dma_alloc_coherent(NULL, sizeof(u32),
@@ -145,7 +145,9 @@ void tegra_init_apb_dma(void)
pr_err("%s: can not allocate bounce buffer\n", __func__);
tegra_dma_free_channel(tegra_apb_dma);
tegra_apb_dma = NULL;
- return;
+ return -ENOMEM;
}
#endif
+ return 0;
}
+arch_initcall(tegra_init_apb_dma);
diff --git a/arch/arm/mach-tegra/apbio.h b/arch/arm/mach-tegra/apbio.h
index a8b8250c891a..f0c87f06a209 100644
--- a/arch/arm/mach-tegra/apbio.h
+++ b/arch/arm/mach-tegra/apbio.h
@@ -17,4 +17,3 @@
u32 tegra_apb_readl(unsigned long offset);
void tegra_apb_writel(u32 value, unsigned long offset);
-void tegra_init_apb_dma(void);
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index 6ad3629827bf..b62b8a6e0850 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -151,7 +151,6 @@ void __init tegra_init_early(void)
tegra_clk_init_from_table(common_clk_init_table);
tegra_init_power();
tegra_init_cache();
- tegra_init_apb_dma();
}
static int __init tegra_lp0_vec_arg(char *options)