clk: msm: osm: add debugfs interface to write to ACD registers
Make the debugfs node acd_debug_reg writeable to allow writes to master and local copies of the ACD block. Change-Id: I59aa3a6eb3ce3908e2814b5d45920cbc76ee8eee CRs-Fixed: 1053383 Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
This commit is contained in:
parent
d329766ce2
commit
18e1eb265e
1 changed files with 15 additions and 2 deletions
|
@ -2679,10 +2679,23 @@ static int debugfs_get_debug_reg(void *data, u64 *val)
|
|||
*val = clk_osm_acd_local_read_reg(c, c->acd_debugfs_addr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int debugfs_set_debug_reg(void *data, u64 val)
|
||||
{
|
||||
struct clk_osm *c = data;
|
||||
|
||||
if (c->acd_debugfs_addr >= ACD_MASTER_ONLY_REG_ADDR)
|
||||
clk_osm_acd_master_write_reg(c, val, c->acd_debugfs_addr);
|
||||
else
|
||||
clk_osm_acd_master_write_through_reg(c, val,
|
||||
c->acd_debugfs_addr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
DEFINE_SIMPLE_ATTRIBUTE(debugfs_acd_debug_reg_fops,
|
||||
debugfs_get_debug_reg,
|
||||
NULL,
|
||||
"%llu\n");
|
||||
debugfs_set_debug_reg,
|
||||
"0x%llx\n");
|
||||
|
||||
static int debugfs_get_debug_reg_addr(void *data, u64 *val)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue