clk-slow.c 742 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (C) 2016 Atmel Corporation
  3. * Wenyou.Yang <wenyou.yang@atmel.com>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #include <common.h>
  8. #include <clk-uclass.h>
  9. #include <dm/device.h>
  10. static int at91_slow_clk_enable(struct clk *clk)
  11. {
  12. return 0;
  13. }
  14. static ulong at91_slow_clk_get_rate(struct clk *clk)
  15. {
  16. return CONFIG_SYS_AT91_SLOW_CLOCK;
  17. }
  18. static struct clk_ops at91_slow_clk_ops = {
  19. .enable = at91_slow_clk_enable,
  20. .get_rate = at91_slow_clk_get_rate,
  21. };
  22. static const struct udevice_id at91_slow_clk_match[] = {
  23. { .compatible = "atmel,at91sam9x5-clk-slow" },
  24. {}
  25. };
  26. U_BOOT_DRIVER(at91_slow_clk) = {
  27. .name = "at91-slow-clk",
  28. .id = UCLASS_CLK,
  29. .of_match = at91_slow_clk_match,
  30. .ops = &at91_slow_clk_ops,
  31. };