]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sunxi_nand_spl: Make sure the DMA controller is enabled
authorHans de Goede <hdegoede@redhat.com>
Sat, 15 Aug 2015 09:58:03 +0000 (11:58 +0200)
committerHans de Goede <hdegoede@redhat.com>
Mon, 31 Aug 2015 06:43:41 +0000 (08:43 +0200)
We use DMA for nand data transfers in the SPL, so make sure the DMA
controller is enabled.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
board/sunxi/board.c

index b76bb832511e193fbacc06d3dc05381fdb0c279d..1ebd0a423d1e15692b16954eb26d17428c93668b 100644 (file)
@@ -125,7 +125,13 @@ static void nand_clock_setup(void)
 {
        struct sunxi_ccm_reg *const ccm =
                (struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
+
        setbits_le32(&ccm->ahb_gate0, (CLK_GATE_OPEN << AHB_GATE_OFFSET_NAND0));
+#ifdef CONFIG_MACH_SUN9I
+       setbits_le32(&ccm->ahb_gate1, (1 << AHB_GATE_OFFSET_DMA));
+#else
+       setbits_le32(&ccm->ahb_gate0, (1 << AHB_GATE_OFFSET_DMA));
+#endif
        setbits_le32(&ccm->nand0_clk_cfg, CCM_NAND_CTRL_ENABLE | AHB_DIV_1);
 }