.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2016 Free Electrons |
---|
3 | 4 | * |
---|
4 | 5 | * Maxime Ripard <maxime.ripard@free-electrons.com> |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or |
---|
7 | | - * modify it under the terms of the GNU General Public License as |
---|
8 | | - * published by the Free Software Foundation; either version 2 of |
---|
9 | | - * the License, or (at your option) any later version. |
---|
10 | 6 | */ |
---|
11 | 7 | |
---|
12 | 8 | #include <linux/clk.h> |
---|
.. | .. |
---|
60 | 56 | ret = PTR_ERR(drc->mod_clk); |
---|
61 | 57 | goto err_disable_bus_clk; |
---|
62 | 58 | } |
---|
| 59 | + |
---|
| 60 | + ret = clk_set_rate_exclusive(drc->mod_clk, 300000000); |
---|
| 61 | + if (ret) { |
---|
| 62 | + dev_err(dev, "Couldn't set the module clock frequency\n"); |
---|
| 63 | + goto err_disable_bus_clk; |
---|
| 64 | + } |
---|
| 65 | + |
---|
63 | 66 | clk_prepare_enable(drc->mod_clk); |
---|
64 | 67 | |
---|
65 | 68 | return 0; |
---|
.. | .. |
---|
76 | 79 | { |
---|
77 | 80 | struct sun6i_drc *drc = dev_get_drvdata(dev); |
---|
78 | 81 | |
---|
| 82 | + clk_rate_exclusive_put(drc->mod_clk); |
---|
79 | 83 | clk_disable_unprepare(drc->mod_clk); |
---|
80 | 84 | clk_disable_unprepare(drc->bus_clk); |
---|
81 | 85 | reset_control_assert(drc->reset); |
---|
.. | .. |
---|
101 | 105 | static const struct of_device_id sun6i_drc_of_table[] = { |
---|
102 | 106 | { .compatible = "allwinner,sun6i-a31-drc" }, |
---|
103 | 107 | { .compatible = "allwinner,sun6i-a31s-drc" }, |
---|
| 108 | + { .compatible = "allwinner,sun8i-a23-drc" }, |
---|
104 | 109 | { .compatible = "allwinner,sun8i-a33-drc" }, |
---|
105 | 110 | { .compatible = "allwinner,sun9i-a80-drc" }, |
---|
106 | 111 | { } |
---|