hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/clk/mediatek/clk-mt2712.c
....@@ -1,15 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2017 MediaTek Inc.
34 * Author: Weiyi Lu <weiyi.lu@mediatek.com>
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License version 2 as
7
- * published by the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
135 */
146
157 #include <linux/clk.h>
....@@ -222,6 +214,8 @@
222214 FACTOR(CLK_TOP_D2A_ULCLK_6P5M, "d2a_ulclk_6p5m", "clk26m", 1,
223215 4),
224216 FACTOR(CLK_TOP_APLL1_D3, "apll1_d3", "apll1_ck", 1,
217
+ 3),
218
+ FACTOR(CLK_TOP_APLL2_D3, "apll2_d3", "apll2_ck", 1,
225219 3),
226220 };
227221
....@@ -594,7 +588,8 @@
594588 "apll1_ck",
595589 "apll1_d2",
596590 "apll1_d4",
597
- "apll1_d8"
591
+ "apll1_d8",
592
+ "apll1_d3"
598593 };
599594
600595 static const char * const a2sys_hp_parents[] = {
....@@ -602,7 +597,8 @@
602597 "apll2_ck",
603598 "apll2_d2",
604599 "apll2_d4",
605
- "apll2_d8"
600
+ "apll2_d8",
601
+ "apll2_d3"
606602 };
607603
608604 static const char * const asm_l_parents[] = {
....@@ -1310,9 +1306,8 @@
13101306 int r, i;
13111307 struct device_node *node = pdev->dev.of_node;
13121308 void __iomem *base;
1313
- struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
13141309
1315
- base = devm_ioremap_resource(&pdev->dev, res);
1310
+ base = devm_platform_ioremap_resource(pdev, 0);
13161311 if (IS_ERR(base)) {
13171312 pr_err("%s(): ioremap failed\n", __func__);
13181313 return PTR_ERR(base);
....@@ -1398,9 +1393,8 @@
13981393 int r;
13991394 struct device_node *node = pdev->dev.of_node;
14001395 void __iomem *base;
1401
- struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
14021396
1403
- base = devm_ioremap_resource(&pdev->dev, res);
1397
+ base = devm_platform_ioremap_resource(pdev, 0);
14041398 if (IS_ERR(base)) {
14051399 pr_err("%s(): ioremap failed\n", __func__);
14061400 return PTR_ERR(base);
....@@ -1463,7 +1457,6 @@
14631457 .probe = clk_mt2712_probe,
14641458 .driver = {
14651459 .name = "clk-mt2712",
1466
- .owner = THIS_MODULE,
14671460 .of_match_table = of_match_clk_mt2712,
14681461 },
14691462 };