Commit e9044480 authored by Varun Wadekar's avatar Varun Wadekar
Browse files

Tegra: bpmp: fixup TEGRA_CLK_SE values for Tegra186/Tegra194



This patch fixes the SE clock ID being used for Tegra186 and Tegra194
SoCs. Previous assumption, that both SoCs use the same clock ID, was
incorrect.

Change-Id: I1ef0da5547ff2e14151b53968cad9cc78fee63bd
Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
parent de3fd9b3
...@@ -18,11 +18,6 @@ ...@@ -18,11 +18,6 @@
#define TEGRA_RESET_ID_XUSB_PADCTL U(114) #define TEGRA_RESET_ID_XUSB_PADCTL U(114)
#define TEGRA_RESET_ID_GPCDMA U(70) #define TEGRA_RESET_ID_GPCDMA U(70)
/**
* Clock identifier for the SE device
*/
#define TEGRA_CLK_SE U(124)
/** /**
* Function to initialise the IPC with the bpmp * Function to initialise the IPC with the bpmp
*/ */
......
...@@ -72,6 +72,12 @@ ...@@ -72,6 +72,12 @@
#define TEGRA186_SEC_IRQ_TARGET_MASK U(0xF3) /* 4 A57 - 2 Denver */ #define TEGRA186_SEC_IRQ_TARGET_MASK U(0xF3) /* 4 A57 - 2 Denver */
/*******************************************************************************
* Clock identifier for the SE device
******************************************************************************/
#define TEGRA186_CLK_SE U(103)
#define TEGRA_CLK_SE TEGRA186_CLK_SE
/******************************************************************************* /*******************************************************************************
* Tegra Miscellanous register constants * Tegra Miscellanous register constants
******************************************************************************/ ******************************************************************************/
......
...@@ -42,6 +42,12 @@ ...@@ -42,6 +42,12 @@
#define TEGRA194_SEC_IRQ_TARGET_MASK U(0xFF) /* 8 Carmel */ #define TEGRA194_SEC_IRQ_TARGET_MASK U(0xFF) /* 8 Carmel */
/*******************************************************************************
* Clock identifier for the SE device
******************************************************************************/
#define TEGRA194_CLK_SE U(124)
#define TEGRA_CLK_SE TEGRA194_CLK_SE
/******************************************************************************* /*******************************************************************************
* Tegra Miscellanous register constants * Tegra Miscellanous register constants
******************************************************************************/ ******************************************************************************/
......
...@@ -294,7 +294,7 @@ int32_t tegra_soc_pwr_domain_power_down_wfi(const psci_power_state_t *target_sta ...@@ -294,7 +294,7 @@ int32_t tegra_soc_pwr_domain_power_down_wfi(const psci_power_state_t *target_sta
assert(tegra_bpmp_ipc_init() == 0); assert(tegra_bpmp_ipc_init() == 0);
/* Enable SE clock */ /* Enable SE clock */
ret = tegra_bpmp_ipc_enable_clock(TEGRA_CLK_SE); ret = tegra_bpmp_ipc_enable_clock(TEGRA186_CLK_SE);
if (ret != 0) { if (ret != 0) {
ERROR("Failed to enable clock\n"); ERROR("Failed to enable clock\n");
return ret; return ret;
...@@ -319,7 +319,7 @@ int32_t tegra_soc_pwr_domain_power_down_wfi(const psci_power_state_t *target_sta ...@@ -319,7 +319,7 @@ int32_t tegra_soc_pwr_domain_power_down_wfi(const psci_power_state_t *target_sta
memcpy16((void *)(uintptr_t)val, (void *)(uintptr_t)BL31_BASE, memcpy16((void *)(uintptr_t)val, (void *)(uintptr_t)BL31_BASE,
(uintptr_t)BL31_END - (uintptr_t)BL31_BASE); (uintptr_t)BL31_END - (uintptr_t)BL31_BASE);
ret = tegra_bpmp_ipc_disable_clock(TEGRA_CLK_SE); ret = tegra_bpmp_ipc_disable_clock(TEGRA186_CLK_SE);
if (ret != 0) { if (ret != 0) {
ERROR("Failed to disable clock\n"); ERROR("Failed to disable clock\n");
return ret; return ret;
......
...@@ -459,7 +459,7 @@ int32_t tegra_se_suspend(void) ...@@ -459,7 +459,7 @@ int32_t tegra_se_suspend(void)
assert(tegra_bpmp_ipc_init() == 0); assert(tegra_bpmp_ipc_init() == 0);
/* Enable SE clock before SE context save */ /* Enable SE clock before SE context save */
ret = tegra_bpmp_ipc_enable_clock(TEGRA_CLK_SE); ret = tegra_bpmp_ipc_enable_clock(TEGRA194_CLK_SE);
assert(ret == 0); assert(ret == 0);
/* save SE registers */ /* save SE registers */
...@@ -475,7 +475,7 @@ int32_t tegra_se_suspend(void) ...@@ -475,7 +475,7 @@ int32_t tegra_se_suspend(void)
} }
/* Disable SE clock after SE context save */ /* Disable SE clock after SE context save */
ret = tegra_bpmp_ipc_disable_clock(TEGRA_CLK_SE); ret = tegra_bpmp_ipc_disable_clock(TEGRA194_CLK_SE);
assert(ret == 0); assert(ret == 0);
return ret; return ret;
...@@ -492,7 +492,7 @@ void tegra_se_resume(void) ...@@ -492,7 +492,7 @@ void tegra_se_resume(void)
assert(tegra_bpmp_ipc_init() == 0); assert(tegra_bpmp_ipc_init() == 0);
/* Enable SE clock before SE context restore */ /* Enable SE clock before SE context restore */
ret = tegra_bpmp_ipc_enable_clock(TEGRA_CLK_SE); ret = tegra_bpmp_ipc_enable_clock(TEGRA194_CLK_SE);
assert(ret == 0); assert(ret == 0);
/* /*
...@@ -507,6 +507,6 @@ void tegra_se_resume(void) ...@@ -507,6 +507,6 @@ void tegra_se_resume(void)
mmio_write_32(TEGRA_PKA1_BASE + PKA1_MUTEX_WATCHDOG_NS_LIMIT, se_regs[3]); mmio_write_32(TEGRA_PKA1_BASE + PKA1_MUTEX_WATCHDOG_NS_LIMIT, se_regs[3]);
/* Disable SE clock after SE context restore */ /* Disable SE clock after SE context restore */
ret = tegra_bpmp_ipc_disable_clock(TEGRA_CLK_SE); ret = tegra_bpmp_ipc_disable_clock(TEGRA194_CLK_SE);
assert(ret == 0); assert(ret == 0);
} }
...@@ -304,7 +304,7 @@ int32_t tegra_soc_pwr_domain_power_down_wfi(const psci_power_state_t *target_sta ...@@ -304,7 +304,7 @@ int32_t tegra_soc_pwr_domain_power_down_wfi(const psci_power_state_t *target_sta
assert(ret == 0); assert(ret == 0);
/* Enable SE clock before SE context save */ /* Enable SE clock before SE context save */
ret = tegra_bpmp_ipc_enable_clock(TEGRA_CLK_SE); ret = tegra_bpmp_ipc_enable_clock(TEGRA194_CLK_SE);
assert(ret == 0); assert(ret == 0);
/* /*
...@@ -330,7 +330,7 @@ int32_t tegra_soc_pwr_domain_power_down_wfi(const psci_power_state_t *target_sta ...@@ -330,7 +330,7 @@ int32_t tegra_soc_pwr_domain_power_down_wfi(const psci_power_state_t *target_sta
src_len_in_bytes); src_len_in_bytes);
/* Disable SE clock after SE context save */ /* Disable SE clock after SE context save */
ret = tegra_bpmp_ipc_disable_clock(TEGRA_CLK_SE); ret = tegra_bpmp_ipc_disable_clock(TEGRA194_CLK_SE);
assert(ret == 0); assert(ret == 0);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment