@@ -6363,49 +6363,49 @@ static void e1000e_s0ix_entry_flow(struct e1000_adapter *adapter)
6363
6363
mac_data |= E1000_EXTCNF_CTRL_GATE_PHY_CFG ;
6364
6364
ew32 (EXTCNF_CTRL , mac_data );
6365
6365
6366
- /* Enable the Dynamic Power Gating in the MAC */
6367
- mac_data = er32 (FEXTNVM7 );
6368
- mac_data |= BIT (22 );
6369
- ew32 (FEXTNVM7 , mac_data );
6370
-
6371
6366
/* Disable disconnected cable conditioning for Power Gating */
6372
6367
mac_data = er32 (DPGFR );
6373
6368
mac_data |= BIT (2 );
6374
6369
ew32 (DPGFR , mac_data );
6375
6370
6376
- /* Don't wake from dynamic Power Gating with clock request */
6377
- mac_data = er32 (FEXTNVM12 );
6378
- mac_data |= BIT (12 );
6379
- ew32 (FEXTNVM12 , mac_data );
6380
-
6381
- /* Ungate PGCB clock */
6382
- mac_data = er32 (FEXTNVM9 );
6383
- mac_data &= ~BIT (28 );
6384
- ew32 (FEXTNVM9 , mac_data );
6385
-
6386
- /* Enable K1 off to enable mPHY Power Gating */
6387
- mac_data = er32 (FEXTNVM6 );
6388
- mac_data |= BIT (31 );
6389
- ew32 (FEXTNVM6 , mac_data );
6390
-
6391
- /* Enable mPHY power gating for any link and speed */
6392
- mac_data = er32 (FEXTNVM8 );
6393
- mac_data |= BIT (9 );
6394
- ew32 (FEXTNVM8 , mac_data );
6395
-
6396
6371
/* Enable the Dynamic Clock Gating in the DMA and MAC */
6397
6372
mac_data = er32 (CTRL_EXT );
6398
6373
mac_data |= E1000_CTRL_EXT_DMA_DYN_CLK_EN ;
6399
6374
ew32 (CTRL_EXT , mac_data );
6400
-
6401
- /* No MAC DPG gating SLP_S0 in modern standby
6402
- * Switch the logic of the lanphypc to use PMC counter
6403
- */
6404
- mac_data = er32 (FEXTNVM5 );
6405
- mac_data |= BIT (7 );
6406
- ew32 (FEXTNVM5 , mac_data );
6407
6375
}
6408
6376
6377
+ /* Enable the Dynamic Power Gating in the MAC */
6378
+ mac_data = er32 (FEXTNVM7 );
6379
+ mac_data |= BIT (22 );
6380
+ ew32 (FEXTNVM7 , mac_data );
6381
+
6382
+ /* Don't wake from dynamic Power Gating with clock request */
6383
+ mac_data = er32 (FEXTNVM12 );
6384
+ mac_data |= BIT (12 );
6385
+ ew32 (FEXTNVM12 , mac_data );
6386
+
6387
+ /* Ungate PGCB clock */
6388
+ mac_data = er32 (FEXTNVM9 );
6389
+ mac_data &= ~BIT (28 );
6390
+ ew32 (FEXTNVM9 , mac_data );
6391
+
6392
+ /* Enable K1 off to enable mPHY Power Gating */
6393
+ mac_data = er32 (FEXTNVM6 );
6394
+ mac_data |= BIT (31 );
6395
+ ew32 (FEXTNVM6 , mac_data );
6396
+
6397
+ /* Enable mPHY power gating for any link and speed */
6398
+ mac_data = er32 (FEXTNVM8 );
6399
+ mac_data |= BIT (9 );
6400
+ ew32 (FEXTNVM8 , mac_data );
6401
+
6402
+ /* No MAC DPG gating SLP_S0 in modern standby
6403
+ * Switch the logic of the lanphypc to use PMC counter
6404
+ */
6405
+ mac_data = er32 (FEXTNVM5 );
6406
+ mac_data |= BIT (7 );
6407
+ ew32 (FEXTNVM5 , mac_data );
6408
+
6409
6409
/* Disable the time synchronization clock */
6410
6410
mac_data = er32 (FEXTNVM7 );
6411
6411
mac_data |= BIT (31 );
@@ -6498,33 +6498,6 @@ static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter)
6498
6498
} else {
6499
6499
/* Request driver unconfigure the device from S0ix */
6500
6500
6501
- /* Disable the Dynamic Power Gating in the MAC */
6502
- mac_data = er32 (FEXTNVM7 );
6503
- mac_data &= 0xFFBFFFFF ;
6504
- ew32 (FEXTNVM7 , mac_data );
6505
-
6506
- /* Disable mPHY power gating for any link and speed */
6507
- mac_data = er32 (FEXTNVM8 );
6508
- mac_data &= ~BIT (9 );
6509
- ew32 (FEXTNVM8 , mac_data );
6510
-
6511
- /* Disable K1 off */
6512
- mac_data = er32 (FEXTNVM6 );
6513
- mac_data &= ~BIT (31 );
6514
- ew32 (FEXTNVM6 , mac_data );
6515
-
6516
- /* Disable Ungate PGCB clock */
6517
- mac_data = er32 (FEXTNVM9 );
6518
- mac_data |= BIT (28 );
6519
- ew32 (FEXTNVM9 , mac_data );
6520
-
6521
- /* Cancel not waking from dynamic
6522
- * Power Gating with clock request
6523
- */
6524
- mac_data = er32 (FEXTNVM12 );
6525
- mac_data &= ~BIT (12 );
6526
- ew32 (FEXTNVM12 , mac_data );
6527
-
6528
6501
/* Cancel disable disconnected cable conditioning
6529
6502
* for Power Gating
6530
6503
*/
@@ -6537,13 +6510,6 @@ static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter)
6537
6510
mac_data &= 0xFFF7FFFF ;
6538
6511
ew32 (CTRL_EXT , mac_data );
6539
6512
6540
- /* Revert the lanphypc logic to use the internal Gbe counter
6541
- * and not the PMC counter
6542
- */
6543
- mac_data = er32 (FEXTNVM5 );
6544
- mac_data &= 0xFFFFFF7F ;
6545
- ew32 (FEXTNVM5 , mac_data );
6546
-
6547
6513
/* Enable the periodic inband message,
6548
6514
* Request PCIe clock in K1 page770_17[10:9] =01b
6549
6515
*/
@@ -6581,6 +6547,40 @@ static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter)
6581
6547
mac_data &= ~BIT (31 );
6582
6548
mac_data |= BIT (0 );
6583
6549
ew32 (FEXTNVM7 , mac_data );
6550
+
6551
+ /* Disable the Dynamic Power Gating in the MAC */
6552
+ mac_data = er32 (FEXTNVM7 );
6553
+ mac_data &= 0xFFBFFFFF ;
6554
+ ew32 (FEXTNVM7 , mac_data );
6555
+
6556
+ /* Disable mPHY power gating for any link and speed */
6557
+ mac_data = er32 (FEXTNVM8 );
6558
+ mac_data &= ~BIT (9 );
6559
+ ew32 (FEXTNVM8 , mac_data );
6560
+
6561
+ /* Disable K1 off */
6562
+ mac_data = er32 (FEXTNVM6 );
6563
+ mac_data &= ~BIT (31 );
6564
+ ew32 (FEXTNVM6 , mac_data );
6565
+
6566
+ /* Disable Ungate PGCB clock */
6567
+ mac_data = er32 (FEXTNVM9 );
6568
+ mac_data |= BIT (28 );
6569
+ ew32 (FEXTNVM9 , mac_data );
6570
+
6571
+ /* Cancel not waking from dynamic
6572
+ * Power Gating with clock request
6573
+ */
6574
+ mac_data = er32 (FEXTNVM12 );
6575
+ mac_data &= ~BIT (12 );
6576
+ ew32 (FEXTNVM12 , mac_data );
6577
+
6578
+ /* Revert the lanphypc logic to use the internal Gbe counter
6579
+ * and not the PMC counter
6580
+ */
6581
+ mac_data = er32 (FEXTNVM5 );
6582
+ mac_data &= 0xFFFFFF7F ;
6583
+ ew32 (FEXTNVM5 , mac_data );
6584
6584
}
6585
6585
6586
6586
static int e1000e_pm_freeze (struct device * dev )
0 commit comments