@@ -101,21 +101,6 @@ const u8 clk_alpha_pll_regs[][PLL_OFF_MAX_REGS] = {
101
101
[PLL_OFF_FRAC ] = 0x38 ,
102
102
},
103
103
[CLK_ALPHA_PLL_TYPE_TRION ] = {
104
- [PLL_OFF_L_VAL ] = 0x04 ,
105
- [PLL_OFF_CAL_L_VAL ] = 0x08 ,
106
- [PLL_OFF_USER_CTL ] = 0x0c ,
107
- [PLL_OFF_USER_CTL_U ] = 0x10 ,
108
- [PLL_OFF_USER_CTL_U1 ] = 0x14 ,
109
- [PLL_OFF_CONFIG_CTL ] = 0x18 ,
110
- [PLL_OFF_CONFIG_CTL_U ] = 0x1c ,
111
- [PLL_OFF_CONFIG_CTL_U1 ] = 0x20 ,
112
- [PLL_OFF_TEST_CTL ] = 0x24 ,
113
- [PLL_OFF_TEST_CTL_U ] = 0x28 ,
114
- [PLL_OFF_STATUS ] = 0x30 ,
115
- [PLL_OFF_OPMODE ] = 0x38 ,
116
- [PLL_OFF_ALPHA_VAL ] = 0x40 ,
117
- },
118
- [CLK_ALPHA_PLL_TYPE_LUCID ] = {
119
104
[PLL_OFF_L_VAL ] = 0x04 ,
120
105
[PLL_OFF_CAL_L_VAL ] = 0x08 ,
121
106
[PLL_OFF_USER_CTL ] = 0x0c ,
@@ -154,9 +139,9 @@ EXPORT_SYMBOL_GPL(clk_alpha_pll_regs);
154
139
#define PLL_OUT_MASK 0x7
155
140
#define PLL_RATE_MARGIN 500
156
141
157
- /* LUCID PLL specific settings and offsets */
158
- #define LUCID_PLL_CAL_VAL 0x44
159
- #define LUCID_PCAL_DONE BIT(26)
142
+ /* TRION PLL specific settings and offsets */
143
+ #define TRION_PLL_CAL_VAL 0x44
144
+ #define TRION_PCAL_DONE BIT(26)
160
145
161
146
#define pll_alpha_width (p ) \
162
147
((PLL_ALPHA_VAL_U(p) - PLL_ALPHA_VAL(p) == 4) ? \
@@ -910,14 +895,14 @@ const struct clk_ops clk_alpha_pll_hwfsm_ops = {
910
895
};
911
896
EXPORT_SYMBOL_GPL (clk_alpha_pll_hwfsm_ops );
912
897
913
- const struct clk_ops clk_trion_fixed_pll_ops = {
898
+ const struct clk_ops clk_alpha_pll_fixed_trion_ops = {
914
899
.enable = clk_trion_pll_enable ,
915
900
.disable = clk_trion_pll_disable ,
916
901
.is_enabled = clk_trion_pll_is_enabled ,
917
902
.recalc_rate = clk_trion_pll_recalc_rate ,
918
903
.round_rate = clk_alpha_pll_round_rate ,
919
904
};
920
- EXPORT_SYMBOL_GPL (clk_trion_fixed_pll_ops );
905
+ EXPORT_SYMBOL_GPL (clk_alpha_pll_fixed_trion_ops );
921
906
922
907
static unsigned long
923
908
clk_alpha_pll_postdiv_recalc_rate (struct clk_hw * hw , unsigned long parent_rate )
@@ -1337,12 +1322,12 @@ clk_trion_pll_postdiv_set_rate(struct clk_hw *hw, unsigned long rate,
1337
1322
val << PLL_POST_DIV_SHIFT );
1338
1323
}
1339
1324
1340
- const struct clk_ops clk_trion_pll_postdiv_ops = {
1325
+ const struct clk_ops clk_alpha_pll_postdiv_trion_ops = {
1341
1326
.recalc_rate = clk_trion_pll_postdiv_recalc_rate ,
1342
1327
.round_rate = clk_trion_pll_postdiv_round_rate ,
1343
1328
.set_rate = clk_trion_pll_postdiv_set_rate ,
1344
1329
};
1345
- EXPORT_SYMBOL_GPL (clk_trion_pll_postdiv_ops );
1330
+ EXPORT_SYMBOL_GPL (clk_alpha_pll_postdiv_trion_ops );
1346
1331
1347
1332
static long clk_alpha_pll_postdiv_fabia_round_rate (struct clk_hw * hw ,
1348
1333
unsigned long rate , unsigned long * prate )
@@ -1397,13 +1382,13 @@ EXPORT_SYMBOL_GPL(clk_alpha_pll_postdiv_fabia_ops);
1397
1382
* @regmap: register map
1398
1383
* @config: configuration to apply for pll
1399
1384
*/
1400
- void clk_lucid_pll_configure (struct clk_alpha_pll * pll , struct regmap * regmap ,
1385
+ void clk_trion_pll_configure (struct clk_alpha_pll * pll , struct regmap * regmap ,
1401
1386
const struct alpha_pll_config * config )
1402
1387
{
1403
1388
if (config -> l )
1404
1389
regmap_write (regmap , PLL_L_VAL (pll ), config -> l );
1405
1390
1406
- regmap_write (regmap , PLL_CAL_L_VAL (pll ), LUCID_PLL_CAL_VAL );
1391
+ regmap_write (regmap , PLL_CAL_L_VAL (pll ), TRION_PLL_CAL_VAL );
1407
1392
1408
1393
if (config -> alpha )
1409
1394
regmap_write (regmap , PLL_ALPHA_VAL (pll ), config -> alpha );
@@ -1456,21 +1441,21 @@ void clk_lucid_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap,
1456
1441
/* Place the PLL in STANDBY mode */
1457
1442
regmap_update_bits (regmap , PLL_MODE (pll ), PLL_RESET_N , PLL_RESET_N );
1458
1443
}
1459
- EXPORT_SYMBOL_GPL (clk_lucid_pll_configure );
1444
+ EXPORT_SYMBOL_GPL (clk_trion_pll_configure );
1460
1445
1461
1446
/*
1462
- * The Lucid PLL requires a power-on self-calibration which happens when the
1447
+ * The TRION PLL requires a power-on self-calibration which happens when the
1463
1448
* PLL comes out of reset. Calibrate in case it is not completed.
1464
1449
*/
1465
- static int alpha_pll_lucid_prepare (struct clk_hw * hw )
1450
+ static int alpha_pll_trion_prepare (struct clk_hw * hw )
1466
1451
{
1467
1452
struct clk_alpha_pll * pll = to_clk_alpha_pll (hw );
1468
1453
u32 regval ;
1469
1454
int ret ;
1470
1455
1471
1456
/* Return early if calibration is not needed. */
1472
1457
regmap_read (pll -> clkr .regmap , PLL_STATUS (pll ), & regval );
1473
- if (regval & LUCID_PCAL_DONE )
1458
+ if (regval & TRION_PCAL_DONE )
1474
1459
return 0 ;
1475
1460
1476
1461
/* On/off to calibrate */
@@ -1481,7 +1466,7 @@ static int alpha_pll_lucid_prepare(struct clk_hw *hw)
1481
1466
return ret ;
1482
1467
}
1483
1468
1484
- static int alpha_pll_lucid_set_rate (struct clk_hw * hw , unsigned long rate ,
1469
+ static int alpha_pll_trion_set_rate (struct clk_hw * hw , unsigned long rate ,
1485
1470
unsigned long prate )
1486
1471
{
1487
1472
struct clk_alpha_pll * pll = to_clk_alpha_pll (hw );
@@ -1535,26 +1520,17 @@ static int alpha_pll_lucid_set_rate(struct clk_hw *hw, unsigned long rate,
1535
1520
return 0 ;
1536
1521
}
1537
1522
1538
- const struct clk_ops clk_alpha_pll_lucid_ops = {
1539
- .prepare = alpha_pll_lucid_prepare ,
1523
+ const struct clk_ops clk_alpha_pll_trion_ops = {
1524
+ .prepare = alpha_pll_trion_prepare ,
1540
1525
.enable = clk_trion_pll_enable ,
1541
1526
.disable = clk_trion_pll_disable ,
1542
1527
.is_enabled = clk_trion_pll_is_enabled ,
1543
1528
.recalc_rate = clk_trion_pll_recalc_rate ,
1544
1529
.round_rate = clk_alpha_pll_round_rate ,
1545
- .set_rate = alpha_pll_lucid_set_rate ,
1530
+ .set_rate = alpha_pll_trion_set_rate ,
1546
1531
};
1547
1532
EXPORT_SYMBOL_GPL (clk_alpha_pll_lucid_ops );
1548
1533
1549
- const struct clk_ops clk_alpha_pll_fixed_lucid_ops = {
1550
- .enable = clk_trion_pll_enable ,
1551
- .disable = clk_trion_pll_disable ,
1552
- .is_enabled = clk_trion_pll_is_enabled ,
1553
- .recalc_rate = clk_trion_pll_recalc_rate ,
1554
- .round_rate = clk_alpha_pll_round_rate ,
1555
- };
1556
- EXPORT_SYMBOL_GPL (clk_alpha_pll_fixed_lucid_ops );
1557
-
1558
1534
const struct clk_ops clk_alpha_pll_postdiv_lucid_ops = {
1559
1535
.recalc_rate = clk_alpha_pll_postdiv_fabia_recalc_rate ,
1560
1536
.round_rate = clk_alpha_pll_postdiv_fabia_round_rate ,
0 commit comments