spl.c 722 B

1234567891011121314151617181920212223242526272829303132
  1. // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
  2. /*
  3. * Copyright (C) 2018, STMicroelectronics - All Rights Reserved
  4. */
  5. #include <config.h>
  6. #include <common.h>
  7. #include <spl.h>
  8. #include <dm.h>
  9. #include <ram.h>
  10. #include <asm/io.h>
  11. #include <post.h>
  12. #include <power/pmic.h>
  13. #include <power/stpmu1.h>
  14. #include <asm/arch/ddr.h>
  15. void spl_board_init(void)
  16. {
  17. /* Keep vdd on during the reset cycle */
  18. #if defined(CONFIG_PMIC_STPMU1) && defined(CONFIG_SPL_POWER_SUPPORT)
  19. struct udevice *dev;
  20. int ret;
  21. ret = uclass_get_device_by_driver(UCLASS_PMIC,
  22. DM_GET_DRIVER(pmic_stpmu1), &dev);
  23. if (!ret)
  24. pmic_clrsetbits(dev,
  25. STPMU1_MASK_RESET_BUCK,
  26. STPMU1_MASK_RESET_BUCK3,
  27. STPMU1_MASK_RESET_BUCK3);
  28. #endif
  29. }