| 1 |
/* SPDX-License-Identifier: GPL-2.0 */ |
| 2 |
/* |
| 3 |
* R-Car Gen3 Clock Pulse Generator Library |
| 4 |
* |
| 5 |
* Copyright (C) 2015-2018 Glider bvba |
| 6 |
* Copyright (C) 2019 Renesas Electronics Corp. |
| 7 |
* |
| 8 |
* Based on clk-rcar-gen3.c |
| 9 |
* |
| 10 |
* Copyright (C) 2015 Renesas Electronics Corp. |
| 11 |
*/ |
| 12 |
|
| 13 |
#ifndef __CLK_RENESAS_RCAR_CPG_LIB_H__ |
| 14 |
#define __CLK_RENESAS_RCAR_CPG_LIB_H__ |
| 15 |
|
| 16 |
extern spinlock_t cpg_lock; |
| 17 |
|
| 18 |
struct cpg_simple_notifier { |
| 19 |
struct notifier_block nb; |
| 20 |
void __iomem *reg; |
| 21 |
u32 saved; |
| 22 |
}; |
| 23 |
|
| 24 |
void cpg_simple_notifier_register(struct raw_notifier_head *notifiers, |
| 25 |
struct cpg_simple_notifier *csn); |
| 26 |
|
| 27 |
void cpg_reg_modify(void __iomem *reg, u32 clear, u32 set); |
| 28 |
|
| 29 |
struct clk * __init cpg_sdh_clk_register(const char *name, |
| 30 |
void __iomem *sdnckcr, const char *parent_name, |
| 31 |
struct raw_notifier_head *notifiers); |
| 32 |
|
| 33 |
struct clk * __init cpg_sd_clk_register(const char *name, |
| 34 |
void __iomem *sdnckcr, const char *parent_name); |
| 35 |
|
| 36 |
struct clk * __init cpg_rpc_clk_register(const char *name, |
| 37 |
void __iomem *rpcckcr, const char *parent_name, |
| 38 |
struct raw_notifier_head *notifiers); |
| 39 |
|
| 40 |
struct clk * __init cpg_rpcd2_clk_register(const char *name, |
| 41 |
void __iomem *rpcckcr, |
| 42 |
const char *parent_name); |
| 43 |
#endif |