@@ -361,9 +361,8 @@ static struct clk_hw *en7523_register_pcie_clk(struct device *dev,
361
361
cg -> base = np_base ;
362
362
cg -> hw .init = & init ;
363
363
364
- if (init .ops -> disable )
365
- init .ops -> disable (& cg -> hw );
366
- init .ops -> unprepare (& cg -> hw );
364
+ if (init .ops -> unprepare )
365
+ init .ops -> unprepare (& cg -> hw );
367
366
368
367
if (clk_hw_register (dev , & cg -> hw ))
369
368
return NULL ;
@@ -381,23 +380,6 @@ static int en7581_pci_is_enabled(struct clk_hw *hw)
381
380
return (val & mask ) == mask ;
382
381
}
383
382
384
- static int en7581_pci_prepare (struct clk_hw * hw )
385
- {
386
- struct en_clk_gate * cg = container_of (hw , struct en_clk_gate , hw );
387
- void __iomem * np_base = cg -> base ;
388
- u32 val , mask ;
389
-
390
- mask = REG_RESET_CONTROL_PCIE1 | REG_RESET_CONTROL_PCIE2 |
391
- REG_RESET_CONTROL_PCIEHB ;
392
- val = readl (np_base + REG_RESET_CONTROL1 );
393
- writel (val & ~mask , np_base + REG_RESET_CONTROL1 );
394
- val = readl (np_base + REG_RESET_CONTROL2 );
395
- writel (val & ~REG_RESET2_CONTROL_PCIE2 , np_base + REG_RESET_CONTROL2 );
396
- usleep_range (5000 , 10000 );
397
-
398
- return 0 ;
399
- }
400
-
401
383
static int en7581_pci_enable (struct clk_hw * hw )
402
384
{
403
385
struct en_clk_gate * cg = container_of (hw , struct en_clk_gate , hw );
@@ -414,23 +396,6 @@ static int en7581_pci_enable(struct clk_hw *hw)
414
396
return 0 ;
415
397
}
416
398
417
- static void en7581_pci_unprepare (struct clk_hw * hw )
418
- {
419
- struct en_clk_gate * cg = container_of (hw , struct en_clk_gate , hw );
420
- void __iomem * np_base = cg -> base ;
421
- u32 val , mask ;
422
-
423
- mask = REG_RESET_CONTROL_PCIE1 | REG_RESET_CONTROL_PCIE2 |
424
- REG_RESET_CONTROL_PCIEHB ;
425
- val = readl (np_base + REG_RESET_CONTROL1 );
426
- writel (val | mask , np_base + REG_RESET_CONTROL1 );
427
- mask = REG_RESET_CONTROL_PCIE1 | REG_RESET_CONTROL_PCIE2 ;
428
- writel (val | mask , np_base + REG_RESET_CONTROL1 );
429
- val = readl (np_base + REG_RESET_CONTROL2 );
430
- writel (val | REG_RESET_CONTROL_PCIE2 , np_base + REG_RESET_CONTROL2 );
431
- msleep (100 );
432
- }
433
-
434
399
static void en7581_pci_disable (struct clk_hw * hw )
435
400
{
436
401
struct en_clk_gate * cg = container_of (hw , struct en_clk_gate , hw );
@@ -651,9 +616,7 @@ static const struct en_clk_soc_data en7523_data = {
651
616
static const struct en_clk_soc_data en7581_data = {
652
617
.pcie_ops = {
653
618
.is_enabled = en7581_pci_is_enabled ,
654
- .prepare = en7581_pci_prepare ,
655
619
.enable = en7581_pci_enable ,
656
- .unprepare = en7581_pci_unprepare ,
657
620
.disable = en7581_pci_disable ,
658
621
},
659
622
.reset = {
0 commit comments