Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
Matt Wagantall | 33d01f5 | 2012-02-23 23:27:44 -0800 | [diff] [blame] | 13 | #include <mach/clk-provider.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 14 | |
| 15 | static int dummy_clk_reset(struct clk *clk, enum clk_reset_action action) |
| 16 | { |
| 17 | return 0; |
| 18 | } |
| 19 | |
Matt Wagantall | 9de3bfb | 2011-11-03 20:13:12 -0700 | [diff] [blame] | 20 | static int dummy_clk_set_rate(struct clk *clk, unsigned long rate) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 21 | { |
| 22 | return 0; |
| 23 | } |
| 24 | |
Matt Wagantall | 9de3bfb | 2011-11-03 20:13:12 -0700 | [diff] [blame] | 25 | static int dummy_clk_set_max_rate(struct clk *clk, unsigned long rate) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 26 | { |
| 27 | return 0; |
| 28 | } |
| 29 | |
| 30 | static int dummy_clk_set_flags(struct clk *clk, unsigned flags) |
| 31 | { |
| 32 | return 0; |
| 33 | } |
| 34 | |
Matt Wagantall | 9de3bfb | 2011-11-03 20:13:12 -0700 | [diff] [blame] | 35 | static unsigned long dummy_clk_get_rate(struct clk *clk) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 36 | { |
| 37 | return 0; |
| 38 | } |
| 39 | |
Matt Wagantall | 9de3bfb | 2011-11-03 20:13:12 -0700 | [diff] [blame] | 40 | static long dummy_clk_round_rate(struct clk *clk, unsigned long rate) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 41 | { |
| 42 | return rate; |
| 43 | } |
| 44 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 45 | static struct clk_ops clk_ops_dummy = { |
| 46 | .reset = dummy_clk_reset, |
| 47 | .set_rate = dummy_clk_set_rate, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 48 | .set_max_rate = dummy_clk_set_max_rate, |
| 49 | .set_flags = dummy_clk_set_flags, |
| 50 | .get_rate = dummy_clk_get_rate, |
| 51 | .round_rate = dummy_clk_round_rate, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 52 | }; |
| 53 | |
| 54 | struct clk dummy_clk = { |
| 55 | .dbg_name = "dummy_clk", |
| 56 | .ops = &clk_ops_dummy, |
| 57 | CLK_INIT(dummy_clk), |
| 58 | }; |