stub_clk 60 drivers/clk/hisilicon/clk-hi3660-stub.c struct hi3660_stub_clk *stub_clk = to_stub_clk(hw); stub_clk 66 drivers/clk/hisilicon/clk-hi3660-stub.c stub_clk->rate = readl(freq_reg + (stub_clk->id << 2)) * MHZ; stub_clk 67 drivers/clk/hisilicon/clk-hi3660-stub.c return stub_clk->rate; stub_clk 83 drivers/clk/hisilicon/clk-hi3660-stub.c struct hi3660_stub_clk *stub_clk = to_stub_clk(hw); stub_clk 85 drivers/clk/hisilicon/clk-hi3660-stub.c stub_clk->msg[0] = stub_clk->cmd; stub_clk 86 drivers/clk/hisilicon/clk-hi3660-stub.c stub_clk->msg[1] = rate / MHZ; stub_clk 89 drivers/clk/hisilicon/clk-hi3660-stub.c stub_clk->msg[0], stub_clk->msg[1]); stub_clk 91 drivers/clk/hisilicon/clk-hi3660-stub.c mbox_send_message(stub_clk_chan.mbox, stub_clk->msg); stub_clk 94 drivers/clk/hisilicon/clk-hi3660-stub.c stub_clk->rate = rate; stub_clk 67 drivers/clk/hisilicon/clk-hi6220-stub.c static unsigned int hi6220_acpu_get_freq(struct hi6220_stub_clk *stub_clk) stub_clk 71 drivers/clk/hisilicon/clk-hi6220-stub.c regmap_read(stub_clk->dfs_map, ACPU_DFS_CUR_FREQ, &freq); stub_clk 75 drivers/clk/hisilicon/clk-hi6220-stub.c static int hi6220_acpu_set_freq(struct hi6220_stub_clk *stub_clk, stub_clk 81 drivers/clk/hisilicon/clk-hi6220-stub.c regmap_write(stub_clk->dfs_map, ACPU_DFS_FREQ_REQ, freq); stub_clk 89 drivers/clk/hisilicon/clk-hi6220-stub.c mbox_send_message(stub_clk->mbox, &data); stub_clk 93 drivers/clk/hisilicon/clk-hi6220-stub.c static int hi6220_acpu_round_freq(struct hi6220_stub_clk *stub_clk, stub_clk 100 drivers/clk/hisilicon/clk-hi6220-stub.c regmap_read(stub_clk->dfs_map, ACPU_DFS_FLAG, &limit_flag); stub_clk 102 drivers/clk/hisilicon/clk-hi6220-stub.c regmap_read(stub_clk->dfs_map, ACPU_DFS_FREQ_LMT, &limit_freq); stub_clk 105 drivers/clk/hisilicon/clk-hi6220-stub.c regmap_read(stub_clk->dfs_map, ACPU_DFS_FREQ_MAX, &max_freq); stub_clk 120 drivers/clk/hisilicon/clk-hi6220-stub.c struct hi6220_stub_clk *stub_clk = to_stub_clk(hw); stub_clk 122 drivers/clk/hisilicon/clk-hi6220-stub.c switch (stub_clk->id) { stub_clk 124 drivers/clk/hisilicon/clk-hi6220-stub.c rate = hi6220_acpu_get_freq(stub_clk); stub_clk 131 drivers/clk/hisilicon/clk-hi6220-stub.c dev_err(stub_clk->dev, "%s: un-supported clock id %d\n", stub_clk 132 drivers/clk/hisilicon/clk-hi6220-stub.c __func__, stub_clk->id); stub_clk 142 drivers/clk/hisilicon/clk-hi6220-stub.c struct hi6220_stub_clk *stub_clk = to_stub_clk(hw); stub_clk 146 drivers/clk/hisilicon/clk-hi6220-stub.c switch (stub_clk->id) { stub_clk 148 drivers/clk/hisilicon/clk-hi6220-stub.c ret = hi6220_acpu_set_freq(stub_clk, new_rate); stub_clk 155 drivers/clk/hisilicon/clk-hi6220-stub.c dev_err(stub_clk->dev, "%s: un-supported clock id %d\n", stub_clk 156 drivers/clk/hisilicon/clk-hi6220-stub.c __func__, stub_clk->id); stub_clk 167 drivers/clk/hisilicon/clk-hi6220-stub.c struct hi6220_stub_clk *stub_clk = to_stub_clk(hw); stub_clk 170 drivers/clk/hisilicon/clk-hi6220-stub.c switch (stub_clk->id) { stub_clk 172 drivers/clk/hisilicon/clk-hi6220-stub.c new_rate = hi6220_acpu_round_freq(stub_clk, new_rate); stub_clk 179 drivers/clk/hisilicon/clk-hi6220-stub.c dev_err(stub_clk->dev, "%s: un-supported clock id %d\n", stub_clk 180 drivers/clk/hisilicon/clk-hi6220-stub.c __func__, stub_clk->id); stub_clk 197 drivers/clk/hisilicon/clk-hi6220-stub.c struct hi6220_stub_clk *stub_clk; stub_clk 202 drivers/clk/hisilicon/clk-hi6220-stub.c stub_clk = devm_kzalloc(dev, sizeof(*stub_clk), GFP_KERNEL); stub_clk 203 drivers/clk/hisilicon/clk-hi6220-stub.c if (!stub_clk) stub_clk 206 drivers/clk/hisilicon/clk-hi6220-stub.c stub_clk->dfs_map = syscon_regmap_lookup_by_phandle(np, stub_clk 208 drivers/clk/hisilicon/clk-hi6220-stub.c if (IS_ERR(stub_clk->dfs_map)) { stub_clk 210 drivers/clk/hisilicon/clk-hi6220-stub.c return PTR_ERR(stub_clk->dfs_map); stub_clk 213 drivers/clk/hisilicon/clk-hi6220-stub.c stub_clk->hw.init = &init; stub_clk 214 drivers/clk/hisilicon/clk-hi6220-stub.c stub_clk->dev = dev; stub_clk 215 drivers/clk/hisilicon/clk-hi6220-stub.c stub_clk->id = HI6220_STUB_ACPU0; stub_clk 218 drivers/clk/hisilicon/clk-hi6220-stub.c stub_clk->cl.dev = dev; stub_clk 219 drivers/clk/hisilicon/clk-hi6220-stub.c stub_clk->cl.tx_done = NULL; stub_clk 220 drivers/clk/hisilicon/clk-hi6220-stub.c stub_clk->cl.tx_block = true; stub_clk 221 drivers/clk/hisilicon/clk-hi6220-stub.c stub_clk->cl.tx_tout = 500; stub_clk 222 drivers/clk/hisilicon/clk-hi6220-stub.c stub_clk->cl.knows_txdone = false; stub_clk 225 drivers/clk/hisilicon/clk-hi6220-stub.c stub_clk->mbox = mbox_request_channel(&stub_clk->cl, 0); stub_clk 226 drivers/clk/hisilicon/clk-hi6220-stub.c if (IS_ERR(stub_clk->mbox)) { stub_clk 228 drivers/clk/hisilicon/clk-hi6220-stub.c return PTR_ERR(stub_clk->mbox); stub_clk 236 drivers/clk/hisilicon/clk-hi6220-stub.c clk = devm_clk_register(dev, &stub_clk->hw); stub_clk 247 drivers/clk/hisilicon/clk-hi6220-stub.c regmap_write(stub_clk->dfs_map, ACPU_DFS_FLAG, 0x0); stub_clk 248 drivers/clk/hisilicon/clk-hi6220-stub.c regmap_write(stub_clk->dfs_map, ACPU_DFS_FREQ_REQ, 0x0); stub_clk 249 drivers/clk/hisilicon/clk-hi6220-stub.c regmap_write(stub_clk->dfs_map, ACPU_DFS_FREQ_LMT, 0x0);