.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Atmel (Multi-port DDR-)SDRAM Controller driver |
---|
3 | 4 | * |
---|
4 | 5 | * Author: Alexandre Belloni <alexandre.belloni@free-electrons.com> |
---|
5 | 6 | * |
---|
6 | 7 | * Copyright (C) 2014 Atmel |
---|
7 | | - * |
---|
8 | | - * This program is free software: you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License as published by |
---|
10 | | - * the Free Software Foundation version 2 of the License. |
---|
11 | | - * |
---|
12 | | - * This program is distributed in the hope that it will be useful, |
---|
13 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
15 | | - * GNU General Public License for more details. |
---|
16 | | - * |
---|
17 | | - * You should have received a copy of the GNU General Public License |
---|
18 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
19 | | - * |
---|
20 | 8 | */ |
---|
21 | 9 | |
---|
22 | 10 | #include <linux/clk.h> |
---|
.. | .. |
---|
59 | 47 | caps = of_device_get_match_data(&pdev->dev); |
---|
60 | 48 | |
---|
61 | 49 | if (caps->has_ddrck) { |
---|
62 | | - clk = devm_clk_get(&pdev->dev, "ddrck"); |
---|
| 50 | + clk = devm_clk_get_enabled(&pdev->dev, "ddrck"); |
---|
63 | 51 | if (IS_ERR(clk)) |
---|
64 | 52 | return PTR_ERR(clk); |
---|
65 | | - clk_prepare_enable(clk); |
---|
66 | 53 | } |
---|
67 | 54 | |
---|
68 | 55 | if (caps->has_mpddr_clk) { |
---|
69 | | - clk = devm_clk_get(&pdev->dev, "mpddr"); |
---|
| 56 | + clk = devm_clk_get_enabled(&pdev->dev, "mpddr"); |
---|
70 | 57 | if (IS_ERR(clk)) { |
---|
71 | 58 | pr_err("AT91 RAMC: couldn't get mpddr clock\n"); |
---|
72 | 59 | return PTR_ERR(clk); |
---|
73 | 60 | } |
---|
74 | | - clk_prepare_enable(clk); |
---|
75 | 61 | } |
---|
76 | 62 | |
---|
77 | 63 | return 0; |
---|