forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/drivers/clk/versatile/clk-icst.c
....@@ -1,13 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Driver for the ICST307 VCO clock found in the ARM Reference designs.
34 * We wrap the custom interface from <asm/hardware/icst.h> into the generic
45 * clock framework.
56 *
67 * Copyright (C) 2012-2015 Linus Walleij
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 version 2 as
10
- * published by the Free Software Foundation.
118 *
129 * TODO: when all ARM reference designs are migrated to generic clocks, the
1310 * ICST clock code from the ARM tree should probably be merged into this
....@@ -35,18 +32,6 @@
3532 #define INTEGRATOR_CP_CM_MEM_BITS 0x7FF000
3633
3734 #define INTEGRATOR_AP_PCI_25_33_MHZ BIT(8)
38
-
39
-/**
40
- * enum icst_control_type - the type of ICST control register
41
- */
42
-enum icst_control_type {
43
- ICST_VERSATILE, /* The standard type, all control bits available */
44
- ICST_INTEGRATOR_AP_CM, /* Only 8 bits of VDW available */
45
- ICST_INTEGRATOR_AP_SYS, /* Only 8 bits of VDW available */
46
- ICST_INTEGRATOR_AP_PCI, /* Odd bit pattern storage */
47
- ICST_INTEGRATOR_CP_CM_CORE, /* Only 8 bits of VDW and 3 bits of OD */
48
- ICST_INTEGRATOR_CP_CM_MEM, /* Only 8 bits of VDW and 3 bits of OD */
49
-};
5035
5136 /**
5237 * struct clk_icst - ICST VCO clock wrapper
....@@ -347,16 +332,16 @@
347332 .set_rate = icst_set_rate,
348333 };
349334
350
-static struct clk *icst_clk_setup(struct device *dev,
351
- const struct clk_icst_desc *desc,
352
- const char *name,
353
- const char *parent_name,
354
- struct regmap *map,
355
- enum icst_control_type ctype)
335
+struct clk *icst_clk_setup(struct device *dev,
336
+ const struct clk_icst_desc *desc,
337
+ const char *name,
338
+ const char *parent_name,
339
+ struct regmap *map,
340
+ enum icst_control_type ctype)
356341 {
357342 struct clk *clk;
358343 struct clk_icst *icst;
359
- struct clk_init_data init = {};
344
+ struct clk_init_data init;
360345 struct icst_params *pclone;
361346
362347 icst = kzalloc(sizeof(*icst), GFP_KERNEL);
....@@ -389,6 +374,7 @@
389374
390375 return clk;
391376 }
377
+EXPORT_SYMBOL_GPL(icst_clk_setup);
392378
393379 struct clk *icst_clk_register(struct device *dev,
394380 const struct clk_icst_desc *desc,