clk-slow.c 732 B

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