]> Git Repo - J-u-boot.git/blame - arch/arm/cpu/arm720t/tegra-common/cpu.h
Add GPL-2.0+ SPDX-License-Identifier to source files
[J-u-boot.git] / arch / arm / cpu / arm720t / tegra-common / cpu.h
CommitLineData
c037c93b
AM
1/*
2 * (C) Copyright 2010-2011
3 * NVIDIA Corporation <www.nvidia.com>
4 *
1a459660 5 * SPDX-License-Identifier: GPL-2.0+
c037c93b
AM
6 */
7#include <asm/types.h>
8
9/* Stabilization delays, in usec */
10#define PLL_STABILIZATION_DELAY (300)
11#define IO_STABILIZATION_DELAY (1000)
12
4040ec10 13#if defined(CONFIG_TEGRA20)
c037c93b 14#define NVBL_PLLP_KHZ (216000)
4040ec10
TW
15#elif defined(CONFIG_TEGRA30) || defined(CONFIG_TEGRA114)
16#define NVBL_PLLP_KHZ (408000)
17#else
18#error "Unknown Tegra chip!"
1b245fee 19#endif
c037c93b
AM
20
21#define PLLX_ENABLED (1 << 30)
22#define CCLK_BURST_POLICY 0x20008888
23#define SUPER_CCLK_DIVIDER 0x80000000
24
25/* Calculate clock fractional divider value from ref and target frequencies */
26#define CLK_DIVIDER(REF, FREQ) ((((REF) * 2) / FREQ) - 2)
27
28/* Calculate clock frequency value from reference and clock divider value */
29#define CLK_FREQUENCY(REF, REG) (((REF) * 2) / (REG + 2))
30
31/* AVP/CPU ID */
32#define PG_UP_TAG_0_PID_CPU 0x55555555 /* CPU aka "a9" aka "mpcore" */
33#define PG_UP_TAG_0 0x0
34
35#define CORESIGHT_UNLOCK 0xC5ACCE55;
36
c037c93b
AM
37#define EXCEP_VECTOR_CPU_RESET_VECTOR (NV_PA_EVP_BASE + 0x100)
38#define CSITE_CPU_DBG0_LAR (NV_PA_CSITE_BASE + 0x10FB0)
39#define CSITE_CPU_DBG1_LAR (NV_PA_CSITE_BASE + 0x12FB0)
1b245fee
TW
40#define CSITE_CPU_DBG2_LAR (NV_PA_CSITE_BASE + 0x14FB0)
41#define CSITE_CPU_DBG3_LAR (NV_PA_CSITE_BASE + 0x16FB0)
c037c93b
AM
42
43#define FLOW_CTLR_HALT_COP_EVENTS (NV_PA_FLOW_BASE + 4)
44#define FLOW_MODE_STOP 2
45#define HALT_COP_EVENT_JTAG (1 << 28)
46#define HALT_COP_EVENT_IRQ_1 (1 << 11)
47#define HALT_COP_EVENT_FIQ_1 (1 << 9)
48
1b245fee
TW
49#define FLOW_MODE_NONE 0
50
51#define SIMPLE_PLLX (CLOCK_ID_XCPU - CLOCK_ID_FIRST_SIMPLE)
52
53struct clk_pll_table {
54 u16 n;
55 u16 m;
56 u8 p;
57 u8 cpcon;
58};
59
60void clock_enable_coresight(int enable);
61void enable_cpu_clock(int enable);
c037c93b 62void halt_avp(void) __attribute__ ((noreturn));
1b245fee
TW
63void init_pllx(void);
64void powerup_cpu(void);
65void reset_A9_cpu(int reset);
66void start_cpu(u32 reset_vector);
49493cb7
TW
67int tegra_get_chip(void);
68int tegra_get_sku_info(void);
69int tegra_get_chip_sku(void);
1b245fee 70void adjust_pllp_out_freqs(void);
This page took 0.05651 seconds and 4 git commands to generate.