clk-ld11.c 510 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (C) 2016 Socionext Inc.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include <linux/bitops.h>
  8. #include <linux/io.h>
  9. #include "../init.h"
  10. #include "../sg-regs.h"
  11. void uniphier_ld11_clk_init(void)
  12. {
  13. if (readl(SG_PINMON0) & BIT(27)) {
  14. /* if booted without stand-by MPU */
  15. writel(1, SG_ETPHYPSHUT);
  16. writel(1, SG_ETPHYCNT);
  17. udelay(1); /* wait for regulator level 1.1V -> 2.5V */
  18. writel(3, SG_ETPHYCNT);
  19. writel(3, SG_ETPHYPSHUT);
  20. writel(7, SG_ETPHYCNT);
  21. }
  22. }