SmartAudio/lichee/linux-4.9/drivers/clk/sunxi/clk-debugfs.h

76 lines
1.8 KiB
C
Raw Normal View History

2018-07-13 01:31:50 +00:00
/*
* Copyright (C) 2016-2020 Allwinnertech
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __MACH_CLK_DEBUGFS_H
#define __MACH_CLK_DEBUGFS_H
struct clk_core {
const char *name;
const struct clk_ops *ops;
struct clk_hw *hw;
struct module *owner;
struct clk_core *parent;
const char **parent_names;
struct clk_core **parents;
u8 num_parents;
u8 new_parent_index;
unsigned long rate;
unsigned long req_rate;
unsigned long new_rate;
struct clk_core *new_parent;
struct clk_core *new_child;
unsigned long flags;
bool orphan;
unsigned int enable_count;
unsigned int prepare_count;
unsigned long min_rate;
unsigned long max_rate;
unsigned long accuracy;
int phase;
struct hlist_head children;
struct hlist_node child_node;
struct hlist_head clks;
unsigned int notifier_count;
#ifdef CONFIG_DEBUG_FS
struct dentry *dentry;
struct hlist_node debug_node;
#endif
struct kref ref;
};
struct clk {
struct clk_core *core;
const char *dev_id;
const char *con_id;
unsigned long min_rate;
unsigned long max_rate;
struct hlist_node clks_node;
};
static struct dentry *my_ccudbg_root;
static int __init debugfs_test_init(void);
struct testclk_data {
char command[32];
char name[32];
char start[32];
char param[32];
char info[128];
char tmpbuf[256];
};
extern void __iomem *sunxi_clk_base;
extern void __iomem *sunxi_clk_cpus_base;
extern int sunxi_clk_maxreg;
extern int cpus_clk_maxreg;
#endif /* __MACH_CLK_DEBUGFS_H */