Commit 57c539f9 authored by Varun Wadekar's avatar Varun Wadekar
Browse files

Tegra: compile PMC driver for Tegra132/Tegra210 platforms



The PMC driver is used only by Tegra210 and Tegra132 platforms. This
patch removes pmc.c from the common makefile and moves it to the
platform specific makefiles.

As a result, the PMC code from common code has been moved to Tegra132
and Tegra210 platform ports.

Change-Id: Ia157f70e776b3eff3c12eb8f0f02d30102670a98
Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
parent f561a179
...@@ -25,7 +25,6 @@ BL31_SOURCES += drivers/delay_timer/delay_timer.c \ ...@@ -25,7 +25,6 @@ BL31_SOURCES += drivers/delay_timer/delay_timer.c \
plat/common/aarch64/crash_console_helpers.S \ plat/common/aarch64/crash_console_helpers.S \
${TEGRA_GICv2_SOURCES} \ ${TEGRA_GICv2_SOURCES} \
${COMMON_DIR}/aarch64/tegra_helpers.S \ ${COMMON_DIR}/aarch64/tegra_helpers.S \
${COMMON_DIR}/drivers/pmc/pmc.c \
${COMMON_DIR}/lib/debug/profiler.c \ ${COMMON_DIR}/lib/debug/profiler.c \
${COMMON_DIR}/tegra_bl31_setup.c \ ${COMMON_DIR}/tegra_bl31_setup.c \
${COMMON_DIR}/tegra_delay_timer.c \ ${COMMON_DIR}/tegra_delay_timer.c \
......
...@@ -221,10 +221,10 @@ __dead2 void tegra_system_reset(void) ...@@ -221,10 +221,10 @@ __dead2 void tegra_system_reset(void)
/* per-SoC system reset handler */ /* per-SoC system reset handler */
(void)tegra_soc_prepare_system_reset(); (void)tegra_soc_prepare_system_reset();
/* /* wait for the system to reset */
* Program the PMC in order to restart the system. for (;;) {
*/ ;
tegra_pmc_system_reset(); }
} }
/******************************************************************************* /*******************************************************************************
......
...@@ -193,6 +193,11 @@ int tegra_soc_prepare_system_reset(void) ...@@ -193,6 +193,11 @@ int tegra_soc_prepare_system_reset(void)
/* Wait 1 ms to make sure clock source/device logic is stabilized. */ /* Wait 1 ms to make sure clock source/device logic is stabilized. */
mdelay(1); mdelay(1);
/*
* Program the PMC in order to restart the system.
*/
tegra_pmc_system_reset();
return PSCI_E_SUCCESS; return PSCI_E_SUCCESS;
} }
......
# #
# Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. # Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
# Copyright (c) 2020, NVIDIA Corporation. All rights reserved.
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
...@@ -23,6 +24,7 @@ BL31_SOURCES += drivers/ti/uart/aarch64/16550_console.S \ ...@@ -23,6 +24,7 @@ BL31_SOURCES += drivers/ti/uart/aarch64/16550_console.S \
lib/cpus/aarch64/denver.S \ lib/cpus/aarch64/denver.S \
${COMMON_DIR}/drivers/flowctrl/flowctrl.c \ ${COMMON_DIR}/drivers/flowctrl/flowctrl.c \
${COMMON_DIR}/drivers/memctrl/memctrl_v1.c \ ${COMMON_DIR}/drivers/memctrl/memctrl_v1.c \
${COMMON_DIR}/drivers/pmc/pmc.c \
${SOC_DIR}/plat_psci_handlers.c \ ${SOC_DIR}/plat_psci_handlers.c \
${SOC_DIR}/plat_sip_calls.c \ ${SOC_DIR}/plat_sip_calls.c \
${SOC_DIR}/plat_setup.c \ ${SOC_DIR}/plat_setup.c \
......
...@@ -579,6 +579,11 @@ int tegra_soc_prepare_system_reset(void) ...@@ -579,6 +579,11 @@ int tegra_soc_prepare_system_reset(void)
/* Wait 1 ms to make sure clock source/device logic is stabilized. */ /* Wait 1 ms to make sure clock source/device logic is stabilized. */
mdelay(1); mdelay(1);
/*
* Program the PMC in order to restart the system.
*/
tegra_pmc_system_reset();
return PSCI_E_SUCCESS; return PSCI_E_SUCCESS;
} }
......
# #
# Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved. # Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
# Copyright (c) 2020, NVIDIA Corporation. All rights reserved.
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
...@@ -33,6 +34,7 @@ BL31_SOURCES += drivers/ti/uart/aarch64/16550_console.S \ ...@@ -33,6 +34,7 @@ BL31_SOURCES += drivers/ti/uart/aarch64/16550_console.S \
${COMMON_DIR}/drivers/bpmp/bpmp.c \ ${COMMON_DIR}/drivers/bpmp/bpmp.c \
${COMMON_DIR}/drivers/flowctrl/flowctrl.c \ ${COMMON_DIR}/drivers/flowctrl/flowctrl.c \
${COMMON_DIR}/drivers/memctrl/memctrl_v1.c \ ${COMMON_DIR}/drivers/memctrl/memctrl_v1.c \
${COMMON_DIR}/drivers/pmc/pmc.c \
${SOC_DIR}/plat_psci_handlers.c \ ${SOC_DIR}/plat_psci_handlers.c \
${SOC_DIR}/plat_setup.c \ ${SOC_DIR}/plat_setup.c \
${SOC_DIR}/drivers/se/security_engine.c \ ${SOC_DIR}/drivers/se/security_engine.c \
......
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