tegra124: Correct cpu power on sequence and CPUPWRGOOD_TIME
Based on TRM, cpu clock enabling and reset vector setting should all be done properly before ungating cpu power partition. Otherwise, with current code, a race condition could occur where cpu starts but reset vector has not been set. BUG=chrome-os-partner:30064 BRANCH=none TEST=run nyan_big reboot test. No issue is experienced. Original-Signed-off-by: Jimmy Zhang <jimmzhang@nvidia.com> Original-Change-Id: I571e128693bb2763ee673bd183b8cf60921dc475 Original-Reviewed-on: https://chromium-review.googlesource.com/206682 Original-Tested-by: Jimmy Zhang <jimmzhang@nvidia.com> Original-Reviewed-by: Julius Werner <jwerner@chromium.org> Original-Commit-Queue: Jimmy Zhang <jimmzhang@nvidia.com> (cherry picked from commit 106480ff32406c899a24544fdfab858db5afd1d9) Signed-off-by: Marc Jones <marc.jones@se-eng.com> Change-Id: I3da6018dd68e4c15d2c58db566a9745b0b26c365 Reviewed-on: http://review.coreboot.org/8414 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <arch/exception.h>
|
||||
#include <bootblock_common.h>
|
||||
#include <cbfs.h>
|
||||
@@ -69,16 +70,16 @@ void main(void)
|
||||
PINMUX_PWR_INT_N_FUNC_PMICINTR |
|
||||
PINMUX_INPUT_ENABLE);
|
||||
|
||||
power_enable_cpu_rail();
|
||||
power_ungate_cpu();
|
||||
|
||||
if (IS_ENABLED(CONFIG_VBOOT2_VERIFY_FIRMWARE))
|
||||
entry = (void *)verstage_vboot_main;
|
||||
else
|
||||
entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, "fallback/romstage");
|
||||
|
||||
if (entry)
|
||||
clock_cpu0_config_and_reset(entry);
|
||||
ASSERT(entry);
|
||||
clock_cpu0_config(entry);
|
||||
|
||||
power_enable_and_ungate_cpu();
|
||||
clock_cpu0_remove_reset();
|
||||
|
||||
clock_halt_avp();
|
||||
}
|
||||
|
Reference in New Issue
Block a user