Thomas Gleixner | af873fc | 2019-05-28 09:57:21 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Ulf Hansson | 3b01f87 | 2012-08-27 15:45:50 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Clocks for ux500 platforms |
| 4 | * |
| 5 | * Copyright (C) 2012 ST-Ericsson SA |
| 6 | * Author: Ulf Hansson <ulf.hansson@linaro.org> |
Ulf Hansson | 3b01f87 | 2012-08-27 15:45:50 +0200 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #ifndef __UX500_CLK_H |
| 10 | #define __UX500_CLK_H |
| 11 | |
Ulf Hansson | 5b82d03 | 2013-04-03 14:26:57 +0200 | [diff] [blame] | 12 | #include <linux/device.h> |
Mike Turquette | c700835 | 2013-04-22 11:46:10 -0700 | [diff] [blame] | 13 | #include <linux/types.h> |
Ulf Hansson | 3b01f87 | 2012-08-27 15:45:50 +0200 | [diff] [blame] | 14 | |
Stephen Boyd | a162ca9 | 2015-06-19 15:00:46 -0700 | [diff] [blame] | 15 | struct clk; |
| 16 | |
Ulf Hansson | 3b01f87 | 2012-08-27 15:45:50 +0200 | [diff] [blame] | 17 | struct clk *clk_reg_prcc_pclk(const char *name, |
| 18 | const char *parent_name, |
Mike Turquette | c700835 | 2013-04-22 11:46:10 -0700 | [diff] [blame] | 19 | resource_size_t phy_base, |
Ulf Hansson | 3b01f87 | 2012-08-27 15:45:50 +0200 | [diff] [blame] | 20 | u32 cg_sel, |
| 21 | unsigned long flags); |
| 22 | |
| 23 | struct clk *clk_reg_prcc_kclk(const char *name, |
| 24 | const char *parent_name, |
Mike Turquette | c700835 | 2013-04-22 11:46:10 -0700 | [diff] [blame] | 25 | resource_size_t phy_base, |
Ulf Hansson | 3b01f87 | 2012-08-27 15:45:50 +0200 | [diff] [blame] | 26 | u32 cg_sel, |
| 27 | unsigned long flags); |
| 28 | |
| 29 | struct clk *clk_reg_prcmu_scalable(const char *name, |
| 30 | const char *parent_name, |
| 31 | u8 cg_sel, |
| 32 | unsigned long rate, |
| 33 | unsigned long flags); |
| 34 | |
| 35 | struct clk *clk_reg_prcmu_gate(const char *name, |
| 36 | const char *parent_name, |
| 37 | u8 cg_sel, |
| 38 | unsigned long flags); |
| 39 | |
Ulf Hansson | a816d25 | 2012-10-10 13:42:27 +0200 | [diff] [blame] | 40 | struct clk *clk_reg_prcmu_scalable_rate(const char *name, |
| 41 | const char *parent_name, |
| 42 | u8 cg_sel, |
| 43 | unsigned long rate, |
| 44 | unsigned long flags); |
| 45 | |
Ulf Hansson | 70b1fce | 2012-08-31 14:21:29 +0200 | [diff] [blame] | 46 | struct clk *clk_reg_prcmu_rate(const char *name, |
| 47 | const char *parent_name, |
| 48 | u8 cg_sel, |
| 49 | unsigned long flags); |
| 50 | |
Ulf Hansson | 3b01f87 | 2012-08-27 15:45:50 +0200 | [diff] [blame] | 51 | struct clk *clk_reg_prcmu_opp_gate(const char *name, |
| 52 | const char *parent_name, |
| 53 | u8 cg_sel, |
| 54 | unsigned long flags); |
| 55 | |
Ulf Hansson | b0ea0fc | 2012-09-24 16:43:18 +0200 | [diff] [blame] | 56 | struct clk *clk_reg_prcmu_opp_volt_scalable(const char *name, |
| 57 | const char *parent_name, |
| 58 | u8 cg_sel, |
| 59 | unsigned long rate, |
| 60 | unsigned long flags); |
| 61 | |
Ulf Hansson | 5b82d03 | 2013-04-03 14:26:57 +0200 | [diff] [blame] | 62 | struct clk *clk_reg_sysctrl_gate(struct device *dev, |
| 63 | const char *name, |
| 64 | const char *parent_name, |
| 65 | u16 reg_sel, |
| 66 | u8 reg_mask, |
| 67 | u8 reg_bits, |
| 68 | unsigned long enable_delay_us, |
| 69 | unsigned long flags); |
| 70 | |
| 71 | struct clk *clk_reg_sysctrl_gate_fixed_rate(struct device *dev, |
| 72 | const char *name, |
| 73 | const char *parent_name, |
| 74 | u16 reg_sel, |
| 75 | u8 reg_mask, |
| 76 | u8 reg_bits, |
| 77 | unsigned long rate, |
| 78 | unsigned long enable_delay_us, |
| 79 | unsigned long flags); |
| 80 | |
| 81 | struct clk *clk_reg_sysctrl_set_parent(struct device *dev, |
| 82 | const char *name, |
| 83 | const char **parent_names, |
| 84 | u8 num_parents, |
| 85 | u16 *reg_sel, |
| 86 | u8 *reg_mask, |
| 87 | u8 *reg_bits, |
| 88 | unsigned long flags); |
| 89 | |
Ulf Hansson | 3b01f87 | 2012-08-27 15:45:50 +0200 | [diff] [blame] | 90 | #endif /* __UX500_CLK_H */ |