Mika Westerberg | 701190f | 2013-01-18 13:46:00 +0000 | [diff] [blame] | 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 | |
Mika Westerberg | 701190f | 2013-01-18 13:46:00 +0000 | [diff] [blame] | 13 | #include <linux/clk.h> |
| 14 | #include <linux/clkdev.h> |
| 15 | #include <linux/clk-provider.h> |
| 16 | #include <linux/err.h> |
| 17 | #include <linux/module.h> |
| 18 | #include <linux/platform_device.h> |
| 19 | |
Mika Westerberg | 701190f | 2013-01-18 13:46:00 +0000 | [diff] [blame] | 20 | #define PRV_CLOCK_PARAMS 0x800 |
| 21 | |
| 22 | static int lpt_clk_probe(struct platform_device *pdev) |
| 23 | { |
| 24 | struct clk *clk; |
| 25 | |
| 26 | /* LPSS free running clock */ |
| 27 | clk = clk_register_fixed_rate(&pdev->dev, "lpss_clk", NULL, CLK_IS_ROOT, |
| 28 | 100000000); |
| 29 | if (IS_ERR(clk)) |
| 30 | return PTR_ERR(clk); |
| 31 | |
| 32 | /* Shared DMA clock */ |
| 33 | clk_register_clkdev(clk, "hclk", "INTL9C60.0.auto"); |
Mika Westerberg | 701190f | 2013-01-18 13:46:00 +0000 | [diff] [blame] | 34 | return 0; |
| 35 | } |
| 36 | |
| 37 | static struct platform_driver lpt_clk_driver = { |
| 38 | .driver = { |
| 39 | .name = "clk-lpt", |
| 40 | .owner = THIS_MODULE, |
| 41 | }, |
| 42 | .probe = lpt_clk_probe, |
| 43 | }; |
| 44 | |
Rafael J. Wysocki | f58b082 | 2013-03-06 23:46:20 +0100 | [diff] [blame^] | 45 | int __init lpt_clk_init(void) |
Mika Westerberg | 701190f | 2013-01-18 13:46:00 +0000 | [diff] [blame] | 46 | { |
| 47 | return platform_driver_register(&lpt_clk_driver); |
| 48 | } |