diff mbox series

[07/29] accel/ivpu: Set 500 ns delay between power island TRICKLE and ENABLE

Message ID 20240924081754.209728-8-jacek.lawrynowicz@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series accel/ivpu: Fixes for 6.12-rc1 | expand

Commit Message

Jacek Lawrynowicz Sept. 24, 2024, 8:17 a.m. UTC
From: "Wachowski, Karol" <karol.wachowski@intel.com>

Follow HAS recommendation of 500 ns delay when setting
AON_PWR_ISLAND_TRICKLE_EN and AON_PWR_ISLAND_EN registers

Signed-off-by: Wachowski, Karol <karol.wachowski@intel.com>
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
---
 drivers/accel/ivpu/ivpu_hw_ip.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

Jeffrey Hugo Sept. 27, 2024, 8:47 p.m. UTC | #1
On 9/24/2024 2:17 AM, Jacek Lawrynowicz wrote:
> From: "Wachowski, Karol" <karol.wachowski@intel.com>
> 
> Follow HAS recommendation of 500 ns delay when setting

"HAS"?

> AON_PWR_ISLAND_TRICKLE_EN and AON_PWR_ISLAND_EN registers

Missing "." ?


Also, you currently have a 500 ns delay when setting both.  Perhaps the 
recommendation is to have a delay between setting them?
Jacek Lawrynowicz Sept. 30, 2024, 5:19 p.m. UTC | #2
On 9/27/2024 10:47 PM, Jeffrey Hugo wrote:
> On 9/24/2024 2:17 AM, Jacek Lawrynowicz wrote:
>> From: "Wachowski, Karol" <karol.wachowski@intel.com>
>>
>> Follow HAS recommendation of 500 ns delay when setting
> 
> "HAS"?
> 
>> AON_PWR_ISLAND_TRICKLE_EN and AON_PWR_ISLAND_EN registers
> 
> Missing "." ?
> 
> 
> Also, you currently have a 500 ns delay when setting both.  Perhaps the recommendation is to have a delay between setting them?
> 

Yeah, I'm definitely going to reword this.
diff mbox series

Patch

diff --git a/drivers/accel/ivpu/ivpu_hw_ip.c b/drivers/accel/ivpu/ivpu_hw_ip.c
index dfd2f4a5b5268..cfcbb99168e65 100644
--- a/drivers/accel/ivpu/ivpu_hw_ip.c
+++ b/drivers/accel/ivpu/ivpu_hw_ip.c
@@ -311,9 +311,6 @@  static void pwr_island_trickle_drive_40xx(struct ivpu_device *vdev, bool enable)
 		val = REG_CLR_FLD(VPU_40XX_HOST_SS_AON_PWR_ISLAND_TRICKLE_EN0, CSS_CPU, val);
 
 	REGV_WR32(VPU_40XX_HOST_SS_AON_PWR_ISLAND_TRICKLE_EN0, val);
-
-	if (enable)
-		ndelay(500);
 }
 
 static void pwr_island_drive_37xx(struct ivpu_device *vdev, bool enable)
@@ -326,9 +323,6 @@  static void pwr_island_drive_37xx(struct ivpu_device *vdev, bool enable)
 		val = REG_CLR_FLD(VPU_40XX_HOST_SS_AON_PWR_ISLAND_EN0, CSS_CPU, val);
 
 	REGV_WR32(VPU_40XX_HOST_SS_AON_PWR_ISLAND_EN0, val);
-
-	if (!enable)
-		ndelay(500);
 }
 
 static void pwr_island_drive_40xx(struct ivpu_device *vdev, bool enable)
@@ -347,9 +341,11 @@  static void pwr_island_enable(struct ivpu_device *vdev)
 {
 	if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) {
 		pwr_island_trickle_drive_37xx(vdev, true);
+		ndelay(500);
 		pwr_island_drive_37xx(vdev, true);
 	} else {
 		pwr_island_trickle_drive_40xx(vdev, true);
+		ndelay(500);
 		pwr_island_drive_40xx(vdev, true);
 	}
 }