2011-04-14 12:18:06 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2010-2011
|
|
|
|
* NVIDIA Corporation <www.nvidia.com>
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2011-04-14 12:18:06 +00:00
|
|
|
*/
|
|
|
|
#include <asm/types.h>
|
|
|
|
|
|
|
|
/* Stabilization delays, in usec */
|
2012-12-11 13:34:15 +00:00
|
|
|
#define PLL_STABILIZATION_DELAY (300)
|
2011-04-14 12:18:06 +00:00
|
|
|
#define IO_STABILIZATION_DELAY (1000)
|
|
|
|
|
|
|
|
#define PLLX_ENABLED (1 << 30)
|
|
|
|
#define CCLK_BURST_POLICY 0x20008888
|
|
|
|
#define SUPER_CCLK_DIVIDER 0x80000000
|
|
|
|
|
|
|
|
/* Calculate clock fractional divider value from ref and target frequencies */
|
2012-12-11 13:34:15 +00:00
|
|
|
#define CLK_DIVIDER(REF, FREQ) ((((REF) * 2) / FREQ) - 2)
|
2011-04-14 12:18:06 +00:00
|
|
|
|
|
|
|
/* Calculate clock frequency value from reference and clock divider value */
|
2012-12-11 13:34:15 +00:00
|
|
|
#define CLK_FREQUENCY(REF, REG) (((REF) * 2) / (REG + 2))
|
2011-04-14 12:18:06 +00:00
|
|
|
|
|
|
|
/* AVP/CPU ID */
|
|
|
|
#define PG_UP_TAG_0_PID_CPU 0x55555555 /* CPU aka "a9" aka "mpcore" */
|
2012-12-11 13:34:15 +00:00
|
|
|
#define PG_UP_TAG_0 0x0
|
2011-04-14 12:18:06 +00:00
|
|
|
|
|
|
|
#define CORESIGHT_UNLOCK 0xC5ACCE55;
|
|
|
|
|
2012-12-11 13:34:15 +00:00
|
|
|
/* AP base physical address of internal SRAM */
|
|
|
|
#define NV_PA_BASE_SRAM 0x40000000
|
2011-04-14 12:18:06 +00:00
|
|
|
|
|
|
|
#define EXCEP_VECTOR_CPU_RESET_VECTOR (NV_PA_EVP_BASE + 0x100)
|
|
|
|
#define CSITE_CPU_DBG0_LAR (NV_PA_CSITE_BASE + 0x10FB0)
|
|
|
|
#define CSITE_CPU_DBG1_LAR (NV_PA_CSITE_BASE + 0x12FB0)
|
|
|
|
|
|
|
|
#define FLOW_CTLR_HALT_COP_EVENTS (NV_PA_FLOW_BASE + 4)
|
|
|
|
#define FLOW_MODE_STOP 2
|
|
|
|
#define HALT_COP_EVENT_JTAG (1 << 28)
|
|
|
|
#define HALT_COP_EVENT_IRQ_1 (1 << 11)
|
|
|
|
#define HALT_COP_EVENT_FIQ_1 (1 << 9)
|
|
|
|
|
2011-11-05 03:56:50 +00:00
|
|
|
/* This is the main entry into U-Boot, used by the Cortex-A9 */
|
|
|
|
extern void _start(void);
|
2012-04-02 13:18:50 +00:00
|
|
|
|
|
|
|
/**
|
2013-04-10 17:32:32 +00:00
|
|
|
* Works out the SOC/SKU type used for clocks settings
|
2012-04-02 13:18:50 +00:00
|
|
|
*
|
|
|
|
* @return SOC type - see TEGRA_SOC...
|
|
|
|
*/
|
2013-04-10 17:32:32 +00:00
|
|
|
int tegra_get_chip_sku(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the pure SOC (chip ID) from the HIDREV register
|
|
|
|
*
|
|
|
|
* @return SOC ID - see CHIPID_TEGRAxx...
|
|
|
|
*/
|
|
|
|
int tegra_get_chip(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the SKU ID from the sku_info register
|
|
|
|
*
|
|
|
|
* @return SKU ID - see SKU_ID_Txx...
|
|
|
|
*/
|
|
|
|
int tegra_get_sku_info(void);
|
|
|
|
|
|
|
|
/* Do any chip-specific cache config */
|
2013-03-25 23:22:26 +00:00
|
|
|
void config_cache(void);
|