summaryrefslogtreecommitdiffstats
path: root/board/st/stm32mp1/spl.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/st/stm32mp1/spl.c')
-rw-r--r--board/st/stm32mp1/spl.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/board/st/stm32mp1/spl.c b/board/st/stm32mp1/spl.c
new file mode 100644
index 0000000000..b7e5f247e7
--- /dev/null
+++ b/board/st/stm32mp1/spl.c
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2018, STMicroelectronics - All Rights Reserved
+ *
+ * SPDX-License-Identifier: GPL-2.0+ BSD-3-Clause
+ */
+
+#include <config.h>
+#include <common.h>
+#include <spl.h>
+#include <dm.h>
+#include <ram.h>
+#include <asm/io.h>
+#include <post.h>
+#include <power/pmic.h>
+#include <power/stpmu1.h>
+#include <asm/arch/ddr.h>
+
+void spl_board_init(void)
+{
+ /* Keep vdd on during the reset cycle */
+#if defined(CONFIG_PMIC_STPMU1) && defined(CONFIG_SPL_POWER_SUPPORT)
+ struct udevice *dev;
+ int ret;
+
+ ret = uclass_get_device_by_driver(UCLASS_PMIC,
+ DM_GET_DRIVER(pmic_stpmu1), &dev);
+ if (!ret)
+ pmic_clrsetbits(dev,
+ STPMU1_MASK_RESET_BUCK,
+ STPMU1_MASK_RESET_BUCK3,
+ STPMU1_MASK_RESET_BUCK3);
+#endif
+}