]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
Tegra: compile PMC driver for Tegra132/Tegra210 platforms
authorVarun Wadekar <vwadekar@nvidia.com>
Thu, 17 May 2018 18:10:13 +0000 (11:10 -0700)
committerVarun Wadekar <vwadekar@nvidia.com>
Fri, 31 Jan 2020 21:20:57 +0000 (13:20 -0800)
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: Varun Wadekar <vwadekar@nvidia.com>
plat/nvidia/tegra/common/tegra_common.mk
plat/nvidia/tegra/common/tegra_pm.c
plat/nvidia/tegra/soc/t132/plat_psci_handlers.c
plat/nvidia/tegra/soc/t132/platform_t132.mk
plat/nvidia/tegra/soc/t210/plat_psci_handlers.c
plat/nvidia/tegra/soc/t210/platform_t210.mk

index 34b5638ecd5abe16841380101a15a8484253b7fa..50c9592f1726cd597bc608cf40b8d45cc7ac7ca5 100644 (file)
@@ -25,7 +25,6 @@ BL31_SOURCES          +=      drivers/delay_timer/delay_timer.c               \
                                plat/common/aarch64/crash_console_helpers.S     \
                                ${TEGRA_GICv2_SOURCES}                          \
                                ${COMMON_DIR}/aarch64/tegra_helpers.S           \
-                               ${COMMON_DIR}/drivers/pmc/pmc.c                 \
                                ${COMMON_DIR}/lib/debug/profiler.c              \
                                ${COMMON_DIR}/tegra_bl31_setup.c                \
                                ${COMMON_DIR}/tegra_delay_timer.c               \
index d0d2827e88d73f36dc93a84f9e0044849b1cdebf..1f59f30aad3683661791c67defd0c818d48f107d 100644 (file)
@@ -221,10 +221,10 @@ __dead2 void tegra_system_reset(void)
        /* per-SoC system reset handler */
        (void)tegra_soc_prepare_system_reset();
 
-       /*
-        * Program the PMC in order to restart the system.
-        */
-       tegra_pmc_system_reset();
+       /* wait for the system to reset */
+       for (;;) {
+               ;
+       }
 }
 
 /*******************************************************************************
index 5840312043b33526a44162e158df9b3b89a42d86..0e2edf0969e7b1f6de349564d9a1683be067e8a9 100644 (file)
@@ -193,6 +193,11 @@ int tegra_soc_prepare_system_reset(void)
        /* Wait 1 ms to make sure clock source/device logic is stabilized. */
        mdelay(1);
 
+       /*
+        * Program the PMC in order to restart the system.
+        */
+       tegra_pmc_system_reset();
+
        return PSCI_E_SUCCESS;
 }
 
index bb7b7ee6615db74418b0993ef84b5a4703f8ede6..183e1889cc5b3440d28c3c2e575909a9ba4e8649 100644 (file)
@@ -1,5 +1,6 @@
 #
 # 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
 #
@@ -23,6 +24,7 @@ BL31_SOURCES          +=      drivers/ti/uart/aarch64/16550_console.S         \
                                lib/cpus/aarch64/denver.S               \
                                ${COMMON_DIR}/drivers/flowctrl/flowctrl.c       \
                                ${COMMON_DIR}/drivers/memctrl/memctrl_v1.c      \
+                               ${COMMON_DIR}/drivers/pmc/pmc.c                 \
                                ${SOC_DIR}/plat_psci_handlers.c         \
                                ${SOC_DIR}/plat_sip_calls.c             \
                                ${SOC_DIR}/plat_setup.c                 \
index bbbfcf5bf4269351b75160e43d00b7dc48c70c36..4ef9558eec03ff14dd5e0aaf5687796d9289d74b 100644 (file)
@@ -579,6 +579,11 @@ int tegra_soc_prepare_system_reset(void)
        /* Wait 1 ms to make sure clock source/device logic is stabilized. */
        mdelay(1);
 
+       /*
+        * Program the PMC in order to restart the system.
+        */
+       tegra_pmc_system_reset();
+
        return PSCI_E_SUCCESS;
 }
 
index a11aef4dd2017b566fe19733456aca97fae6448f..4f2db53864c995221be884c5dc180b1793407e93 100644 (file)
@@ -1,5 +1,6 @@
 #
 # 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
 #
@@ -33,6 +34,7 @@ BL31_SOURCES          +=      drivers/ti/uart/aarch64/16550_console.S         \
                                ${COMMON_DIR}/drivers/bpmp/bpmp.c               \
                                ${COMMON_DIR}/drivers/flowctrl/flowctrl.c       \
                                ${COMMON_DIR}/drivers/memctrl/memctrl_v1.c      \
+                               ${COMMON_DIR}/drivers/pmc/pmc.c                 \
                                ${SOC_DIR}/plat_psci_handlers.c                 \
                                ${SOC_DIR}/plat_setup.c                         \
                                ${SOC_DIR}/drivers/se/security_engine.c         \