@@ -361,9 +361,8 @@ static struct clk_hw *en7523_register_pcie_clk(struct device *dev,
361361 cg -> base = np_base ;
362362 cg -> hw .init = & init ;
363363
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 );
367366
368367 if (clk_hw_register (dev , & cg -> hw ))
369368 return NULL ;
@@ -381,23 +380,6 @@ static int en7581_pci_is_enabled(struct clk_hw *hw)
381380 return (val & mask ) == mask ;
382381}
383382
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-
401383static int en7581_pci_enable (struct clk_hw * hw )
402384{
403385 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)
414396 return 0 ;
415397}
416398
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-
434399static void en7581_pci_disable (struct clk_hw * hw )
435400{
436401 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 = {
651616static const struct en_clk_soc_data en7581_data = {
652617 .pcie_ops = {
653618 .is_enabled = en7581_pci_is_enabled ,
654- .prepare = en7581_pci_prepare ,
655619 .enable = en7581_pci_enable ,
656- .unprepare = en7581_pci_unprepare ,
657620 .disable = en7581_pci_disable ,
658621 },
659622 .reset = {
0 commit comments