aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/sunxi_nand_spl.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-08-15 11:55:26 +0200
committerHans de Goede <hdegoede@redhat.com>2015-08-31 08:43:41 +0200
commitf62bfa56daf17e3e8fac85795196c0ffad42e444 (patch)
treea91ef11f810c5361252433fc588eada6087d4a3e /drivers/mtd/nand/sunxi_nand_spl.c
parent9da5fca55cbf9465052256346f6e61968acedf2f (diff)
sunxi_nand_spl: Use SYS_NAND_SELF_INIT and only do nand init when necessary
Use SYS_NAND_SELF_INIT and only setup the pinmux and clocks when we are actually using the nand. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
Diffstat (limited to 'drivers/mtd/nand/sunxi_nand_spl.c')
-rw-r--r--drivers/mtd/nand/sunxi_nand_spl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/nand/sunxi_nand_spl.c b/drivers/mtd/nand/sunxi_nand_spl.c
index f6f49289f8..9efe904cc7 100644
--- a/drivers/mtd/nand/sunxi_nand_spl.c
+++ b/drivers/mtd/nand/sunxi_nand_spl.c
@@ -153,6 +153,8 @@ void nand_init(void)
{
uint32_t val;
+ board_nand_init();
+
val = readl(SUNXI_NFC_BASE + NFC_CTL);
/* enable and reset CTL */
writel(val | NFC_CTL_EN | NFC_CTL_RESET,