clk-lpt.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Intel Lynxpoint LPSS clocks.
  3. *
  4. * Copyright (C) 2013, Intel Corporation
  5. * Authors: Mika Westerberg <mika.westerberg@linux.intel.com>
  6. * Heikki Krogerus <heikki.krogerus@linux.intel.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #include <linux/clk.h>
  13. #include <linux/clkdev.h>
  14. #include <linux/clk-provider.h>
  15. #include <linux/err.h>
  16. #include <linux/module.h>
  17. #include <linux/platform_device.h>
  18. #define PRV_CLOCK_PARAMS 0x800
  19. static int lpt_clk_probe(struct platform_device *pdev)
  20. {
  21. struct clk *clk;
  22. /* LPSS free running clock */
  23. clk = clk_register_fixed_rate(&pdev->dev, "lpss_clk", NULL, CLK_IS_ROOT,
  24. 100000000);
  25. if (IS_ERR(clk))
  26. return PTR_ERR(clk);
  27. /* Shared DMA clock */
  28. clk_register_clkdev(clk, "hclk", "INTL9C60.0.auto");
  29. return 0;
  30. }
  31. static struct platform_driver lpt_clk_driver = {
  32. .driver = {
  33. .name = "clk-lpt",
  34. .owner = THIS_MODULE,
  35. },
  36. .probe = lpt_clk_probe,
  37. };
  38. int __init lpt_clk_init(void)
  39. {
  40. return platform_driver_register(&lpt_clk_driver);
  41. }