mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-30 00:21:06 +00:00
83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
59 lines
1.2 KiB
C
59 lines
1.2 KiB
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved.
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <asm/io.h>
|
|
#include <asm/arch/tegra.h>
|
|
#include <asm/arch-tegra/pmc.h>
|
|
#include "../cpu.h"
|
|
|
|
static void enable_cpu_power_rail(void)
|
|
{
|
|
struct pmc_ctlr *pmc = (struct pmc_ctlr *)NV_PA_PMC_BASE;
|
|
u32 reg;
|
|
|
|
reg = readl(&pmc->pmc_cntrl);
|
|
reg |= CPUPWRREQ_OE;
|
|
writel(reg, &pmc->pmc_cntrl);
|
|
|
|
/*
|
|
* The TI PMU65861C needs a 3.75ms delay between enabling
|
|
* the power rail and enabling the CPU clock. This delay
|
|
* between SM1EN and SM1 is for switching time + the ramp
|
|
* up of the voltage to the CPU (VDD_CPU from PMU).
|
|
*/
|
|
udelay(3750);
|
|
}
|
|
|
|
void start_cpu(u32 reset_vector)
|
|
{
|
|
/* Enable VDD_CPU */
|
|
enable_cpu_power_rail();
|
|
|
|
/* Hold the CPUs in reset */
|
|
reset_A9_cpu(1);
|
|
|
|
/* Disable the CPU clock */
|
|
enable_cpu_clock(0);
|
|
|
|
/* Enable CoreSight */
|
|
clock_enable_coresight(1);
|
|
|
|
/*
|
|
* Set the entry point for CPU execution from reset,
|
|
* if it's a non-zero value.
|
|
*/
|
|
if (reset_vector)
|
|
writel(reset_vector, EXCEP_VECTOR_CPU_RESET_VECTOR);
|
|
|
|
/* Enable the CPU clock */
|
|
enable_cpu_clock(1);
|
|
|
|
/* If the CPU doesn't already have power, power it up */
|
|
powerup_cpu();
|
|
|
|
/* Take the CPU out of reset */
|
|
reset_A9_cpu(0);
|
|
}
|