Lines Matching +full:blocking +full:- +full:io

1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (c) 2013-2017 Hisilicon Limited.
13 #include <linux/clk-provider.h>
17 #include <linux/io.h>
22 #include <dt-bindings/clock/hi3660-clock.h>
66 stub_clk->rate = readl(freq_reg + (stub_clk->id << 2)) * MHZ; in hi3660_stub_clk_recalc_rate()
67 return stub_clk->rate; in hi3660_stub_clk_recalc_rate()
85 stub_clk->msg[0] = stub_clk->cmd; in hi3660_stub_clk_set_rate()
86 stub_clk->msg[1] = rate / MHZ; in hi3660_stub_clk_set_rate()
89 stub_clk->msg[0], stub_clk->msg[1]); in hi3660_stub_clk_set_rate()
91 mbox_send_message(stub_clk_chan.mbox, stub_clk->msg); in hi3660_stub_clk_set_rate()
94 stub_clk->rate = rate; in hi3660_stub_clk_set_rate()
105 DEFINE_CLK_STUB(HI3660_CLK_STUB_CLUSTER0, 0x0001030A, "cpu-cluster.0")
106 DEFINE_CLK_STUB(HI3660_CLK_STUB_CLUSTER1, 0x0002030A, "cpu-cluster.1")
107 DEFINE_CLK_STUB(HI3660_CLK_STUB_GPU, 0x0003030A, "clk-g3d")
108 DEFINE_CLK_STUB(HI3660_CLK_STUB_DDR, 0x00040309, "clk-ddrc")
114 unsigned int idx = clkspec->args[0]; in hi3660_stub_clk_hw_get()
118 return ERR_PTR(-EINVAL); in hi3660_stub_clk_hw_get()
126 struct device *dev = &pdev->dev; in hi3660_stub_clk_probe()
131 /* Use mailbox client without blocking */ in hi3660_stub_clk_probe()
144 return -EINVAL; in hi3660_stub_clk_probe()
145 freq_reg = devm_ioremap(dev, res->start, resource_size(res)); in hi3660_stub_clk_probe()
147 return -ENOMEM; in hi3660_stub_clk_probe()
152 ret = devm_clk_hw_register(&pdev->dev, &hi3660_stub_clks[i].hw); in hi3660_stub_clk_probe()
157 return devm_of_clk_add_hw_provider(&pdev->dev, hi3660_stub_clk_hw_get, in hi3660_stub_clk_probe()
162 { .compatible = "hisilicon,hi3660-stub-clk", },
169 .name = "hi3660-stub-clk",