bt1-axi.c (1ac731c529cd4d6adbce134754b51ff7d822b145) bt1-axi.c (854527e0fb9142fa6aea2ca24741ca25c23a0bec)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2020 BAIKAL ELECTRONICS, JSC
4 *
5 * Authors:
6 * Serge Semin <Sergey.Semin@baikalelectronics.ru>
7 *
8 * Baikal-T1 AXI-bus driver

--- 132 unchanged lines hidden (view full) ---

141
142 ret = reset_control_deassert(axi->arst);
143 if (ret)
144 dev_err(axi->dev, "Failed to deassert the reset line\n");
145
146 return ret;
147}
148
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2020 BAIKAL ELECTRONICS, JSC
4 *
5 * Authors:
6 * Serge Semin <Sergey.Semin@baikalelectronics.ru>
7 *
8 * Baikal-T1 AXI-bus driver

--- 132 unchanged lines hidden (view full) ---

141
142 ret = reset_control_deassert(axi->arst);
143 if (ret)
144 dev_err(axi->dev, "Failed to deassert the reset line\n");
145
146 return ret;
147}
148
149static void bt1_axi_disable_clk(void *data)
150{
151 struct bt1_axi *axi = data;
152
153 clk_disable_unprepare(axi->aclk);
154}
155
156static int bt1_axi_request_clk(struct bt1_axi *axi)
157{
149static int bt1_axi_request_clk(struct bt1_axi *axi)
150{
158 int ret;
159
160 axi->aclk = devm_clk_get(axi->dev, "aclk");
151 axi->aclk = devm_clk_get_enabled(axi->dev, "aclk");
161 if (IS_ERR(axi->aclk))
162 return dev_err_probe(axi->dev, PTR_ERR(axi->aclk),
163 "Couldn't get AXI Interconnect clock\n");
164
152 if (IS_ERR(axi->aclk))
153 return dev_err_probe(axi->dev, PTR_ERR(axi->aclk),
154 "Couldn't get AXI Interconnect clock\n");
155
165 ret = clk_prepare_enable(axi->aclk);
166 if (ret) {
167 dev_err(axi->dev, "Couldn't enable the AXI clock\n");
168 return ret;
169 }
170
171 ret = devm_add_action_or_reset(axi->dev, bt1_axi_disable_clk, axi);
172 if (ret)
173 dev_err(axi->dev, "Can't add AXI clock disable action\n");
174
175 return ret;
156 return 0;
176}
177
178static int bt1_axi_request_irq(struct bt1_axi *axi)
179{
180 struct platform_device *pdev = to_platform_device(axi->dev);
181 int ret;
182
183 axi->irq = platform_get_irq(pdev, 0);

--- 128 unchanged lines hidden ---
157}
158
159static int bt1_axi_request_irq(struct bt1_axi *axi)
160{
161 struct platform_device *pdev = to_platform_device(axi->dev);
162 int ret;
163
164 axi->irq = platform_get_irq(pdev, 0);

--- 128 unchanged lines hidden ---