diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-01-05 16:32:20 -0500 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-02-20 23:04:15 -0500 |
commit | 1ca00347c579f15b0eea1a6d4bab84e2cf56e745 (patch) | |
tree | 4a80bfc4c1a849398f33a74ef45f038f38549e2b | |
parent | 499ef7a5c48ea9fe8034b61de304ce9f6b753fe7 (diff) |
ARM: tegra: APB DMA: Enable clock and remove reset.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Colin Cross <ccross@android.com>
-rw-r--r-- | arch/arm/mach-tegra/dma.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-tegra/tegra2_clocks.c | 6 |
2 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/dma.c b/arch/arm/mach-tegra/dma.c index 4625e3ae766e..2d720f2b6c75 100644 --- a/arch/arm/mach-tegra/dma.c +++ b/arch/arm/mach-tegra/dma.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/err.h> | 27 | #include <linux/err.h> |
28 | #include <linux/irq.h> | 28 | #include <linux/irq.h> |
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/clk.h> | ||
30 | #include <mach/dma.h> | 31 | #include <mach/dma.h> |
31 | #include <mach/irqs.h> | 32 | #include <mach/irqs.h> |
32 | #include <mach/iomap.h> | 33 | #include <mach/iomap.h> |
@@ -675,6 +676,19 @@ int __init tegra_dma_init(void) | |||
675 | int i; | 676 | int i; |
676 | unsigned int irq; | 677 | unsigned int irq; |
677 | void __iomem *addr; | 678 | void __iomem *addr; |
679 | struct clk *c; | ||
680 | |||
681 | c = clk_get_sys("tegra-dma", NULL); | ||
682 | if (IS_ERR(c)) { | ||
683 | pr_err("Unable to get clock for APB DMA\n"); | ||
684 | ret = PTR_ERR(c); | ||
685 | goto fail; | ||
686 | } | ||
687 | ret = clk_enable(c); | ||
688 | if (ret != 0) { | ||
689 | pr_err("Unable to enable clock for APB DMA\n"); | ||
690 | goto fail; | ||
691 | } | ||
678 | 692 | ||
679 | addr = IO_ADDRESS(TEGRA_APB_DMA_BASE); | 693 | addr = IO_ADDRESS(TEGRA_APB_DMA_BASE); |
680 | writel(GEN_ENABLE, addr + APB_DMA_GEN); | 694 | writel(GEN_ENABLE, addr + APB_DMA_GEN); |
diff --git a/arch/arm/mach-tegra/tegra2_clocks.c b/arch/arm/mach-tegra/tegra2_clocks.c index 7a2926ae2fd4..49b3edaca496 100644 --- a/arch/arm/mach-tegra/tegra2_clocks.c +++ b/arch/arm/mach-tegra/tegra2_clocks.c | |||
@@ -1759,6 +1759,11 @@ static struct clk_mux_sel mux_clk_32k[] = { | |||
1759 | { 0, 0}, | 1759 | { 0, 0}, |
1760 | }; | 1760 | }; |
1761 | 1761 | ||
1762 | static struct clk_mux_sel mux_pclk[] = { | ||
1763 | { .input = &tegra_clk_pclk, .value = 0}, | ||
1764 | { 0, 0}, | ||
1765 | }; | ||
1766 | |||
1762 | #define PERIPH_CLK(_name, _dev, _con, _clk_num, _reg, _max, _inputs, _flags) \ | 1767 | #define PERIPH_CLK(_name, _dev, _con, _clk_num, _reg, _max, _inputs, _flags) \ |
1763 | { \ | 1768 | { \ |
1764 | .name = _name, \ | 1769 | .name = _name, \ |
@@ -1775,6 +1780,7 @@ static struct clk_mux_sel mux_clk_32k[] = { | |||
1775 | } | 1780 | } |
1776 | 1781 | ||
1777 | struct clk tegra_periph_clks[] = { | 1782 | struct clk tegra_periph_clks[] = { |
1783 | PERIPH_CLK("apbdma", "tegra-dma", NULL, 34, 0, 108000000, mux_pclk, 0), | ||
1778 | PERIPH_CLK("rtc", "rtc-tegra", NULL, 4, 0, 32768, mux_clk_32k, PERIPH_NO_RESET), | 1784 | PERIPH_CLK("rtc", "rtc-tegra", NULL, 4, 0, 32768, mux_clk_32k, PERIPH_NO_RESET), |
1779 | PERIPH_CLK("timer", "timer", NULL, 5, 0, 26000000, mux_clk_m, 0), | 1785 | PERIPH_CLK("timer", "timer", NULL, 5, 0, 26000000, mux_clk_m, 0), |
1780 | PERIPH_CLK("i2s1", "i2s.0", NULL, 11, 0x100, 26000000, mux_pllaout0_audio2x_pllp_clkm, MUX | DIV_U71), | 1786 | PERIPH_CLK("i2s1", "i2s.0", NULL, 11, 0x100, 26000000, mux_pllaout0_audio2x_pllp_clkm, MUX | DIV_U71), |