OLD | NEW |
1 /* | 1 /* |
2 * (C) Copyright 2010 | 2 * (C) Copyright 2010 |
3 * NVIDIA Corporation <www.nvidia.com> | 3 * NVIDIA Corporation <www.nvidia.com> |
4 * | 4 * |
5 * See file CREDITS for list of people who contributed to this | 5 * See file CREDITS for list of people who contributed to this |
6 * project. | 6 * project. |
7 * | 7 * |
8 * This program is free software; you can redistribute it and/or | 8 * This program is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU General Public License as | 9 * modify it under the terms of the GNU General Public License as |
10 * published by the Free Software Foundation; either version 2 of | 10 * published by the Free Software Foundation; either version 2 of |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include <asm/arch/nvcommon.h> | 24 #include <asm/arch/nvcommon.h> |
25 #include <asm/arch/nv_drf.h> | 25 #include <asm/arch/nv_drf.h> |
26 #include <asm/arch/tegra2.h> | 26 #include <asm/arch/tegra2.h> |
27 #include <asm/arch/nv_hardware_access.h> | 27 #include <asm/arch/nv_hardware_access.h> |
28 #include <asm/arch/nvboot_bit.h> | 28 #include <asm/arch/nvboot_bit.h> |
29 #include <asm/arch/nvboot_osc.h> | 29 #include <asm/arch/nvboot_osc.h> |
30 #include <asm/arch/nvboot_clocks.h> | 30 #include <asm/arch/nvboot_clocks.h> |
31 #include <asm/arch/nvbl_memmap_nvap.h> | 31 #include <asm/arch/nvbl_memmap_nvap.h> |
32 #include <asm/arch/nvbl_arm_cpsr.h> | 32 #include <asm/arch/nvbl_arm_cpsr.h> |
33 #include <asm/arch/nvbl_arm_cp15.h> | 33 #include <asm/arch/nvbl_arm_cp15.h> |
| 34 #include <asm/arch/nvboot_sdram_param.h> |
34 | 35 |
35 #define _AND_ & | 36 #define _AND_ & |
36 | 37 |
37 #define PG_UP_PA_BASE 0x60000000 // Base address for arpg.h registers | 38 #define PG_UP_PA_BASE 0x60000000 // Base address for arpg.h registers |
38 #define PMC_PA_BASE 0x7000E400 // Base address for arapbpm.h registers | 39 #define PMC_PA_BASE 0x7000E400 // Base address for arapbpm.h registers |
39 #define CLK_RST_PA_BASE 0x60006000 // Base address for arclk_rst.h register
s | 40 #define CLK_RST_PA_BASE 0x60006000 // Base address for arclk_rst.h register
s |
40 #define TIMERUS_PA_BASE 0x60005010 // Base address for artimerus.h register
s | 41 #define TIMERUS_PA_BASE 0x60005010 // Base address for artimerus.h register
s |
41 #define FLOW_PA_BASE 0x60007000 // Base address for arflow_ctlr.h regist
ers | 42 #define FLOW_PA_BASE 0x60007000 // Base address for arflow_ctlr.h regist
ers |
42 #define EMC_PA_BASE 0x7000f400 // Base address for aremc.h registers | 43 #define EMC_PA_BASE 0x7000f400 // Base address for aremc.h registers |
43 #define MC_PA_BASE 0x7000f000 // Base address for armc.h registers | 44 #define MC_PA_BASE 0x7000f000 // Base address for armc.h registers |
44 #define MISC_PA_BASE 0x70000000 // Base address for arapb_misc.h registe
rs | 45 #define MISC_PA_BASE 0x70000000 // Base address for arapb_misc.h registe
rs |
45 #define AHB_PA_BASE 0x6000C004 // Base address for arahb_arbc.h registe
rs | 46 #define AHB_PA_BASE 0x6000C004 // Base address for arahb_arbc.h registe
rs |
46 #define EVP_PA_BASE 0x6000F000 // Base address for arevp.h registers | 47 #define EVP_PA_BASE 0x6000F000 // Base address for arevp.h registers |
47 #define CSITE_PA_BASE 0x70040000 // Base address for arcsite.h registers | 48 #define CSITE_PA_BASE 0x70040000 // Base address for arcsite.h registers |
| 49 #define ARM_PREF_BASE 0x50040000 |
48 | 50 |
49 #define NV_PMC_REGR(pCar, reg) NV_READ32( (((NvUPtr)(pCar)) + APBDEV_PM
C_##reg##_0)) | 51 #define NV_PMC_REGR(pCar, reg) NV_READ32( (((NvUPtr)(pCar)) + APBDEV_PM
C_##reg##_0)) |
50 #define NV_PMC_REGW(pCar, reg, val) NV_WRITE32((((NvUPtr)(pCar)) + APBDEV_PM
C_##reg##_0), (val)) | 52 #define NV_PMC_REGW(pCar, reg, val) NV_WRITE32((((NvUPtr)(pCar)) + APBDEV_PM
C_##reg##_0), (val)) |
51 #define NV_FLOW_REGR(pFlow, reg) NV_READ32((((NvUPtr)(pFlow)) + FLOW_CTLR
_##reg##_0)) | 53 #define NV_FLOW_REGR(pFlow, reg) NV_READ32((((NvUPtr)(pFlow)) + FLOW_CTLR
_##reg##_0)) |
52 #define NV_FLOW_REGW(pFlow, reg, val) NV_WRITE32((((NvUPtr)(pFlow)) + FLOW_CTL
R_##reg##_0), (val)) | 54 #define NV_FLOW_REGW(pFlow, reg, val) NV_WRITE32((((NvUPtr)(pFlow)) + FLOW_CTL
R_##reg##_0), (val)) |
53 #define NV_EVP_REGR(pEvp, reg) NV_READ32( (((NvUPtr)(pEvp)) + EVP_##reg
##_0)) | 55 #define NV_EVP_REGR(pEvp, reg) NV_READ32( (((NvUPtr)(pEvp)) + EVP_##reg
##_0)) |
54 #define NV_EVP_REGW(pEvp, reg, val) NV_WRITE32((((NvUPtr)(pEvp)) + EVP_##reg
##_0), (val)) | 56 #define NV_EVP_REGW(pEvp, reg, val) NV_WRITE32((((NvUPtr)(pEvp)) + EVP_##reg
##_0), (val)) |
55 | 57 |
56 #define USE_PLLC_OUT1 0 // 0 ==> PLLP_OUT4, 1 ==> PLLC_OUT1 | 58 #define USE_PLLC_OUT1 0 // 0 ==> PLLP_OUT4, 1 ==> PLLC_OUT1 |
57 #define NVBL_PLL_BYPASS 0 | 59 #define NVBL_PLL_BYPASS 0 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 /// Calculate clock fractional divider value from reference and target frequenci
es | 94 /// Calculate clock fractional divider value from reference and target frequenci
es |
93 #define CLK_DIVIDER(REF, FREQ) ((((REF) * 2) / FREQ) - 2) | 95 #define CLK_DIVIDER(REF, FREQ) ((((REF) * 2) / FREQ) - 2) |
94 | 96 |
95 /// Calculate clock frequency value from reference and clock divider value | 97 /// Calculate clock frequency value from reference and clock divider value |
96 #define CLK_FREQUENCY(REF, REG) (((REF) * 2) / (REG + 2)) | 98 #define CLK_FREQUENCY(REF, REG) (((REF) * 2) / (REG + 2)) |
97 | 99 |
98 #define SCU_CONTROL_0 _MK_ADDR_CONST(0x0) | 100 #define SCU_CONTROL_0 _MK_ADDR_CONST(0x0) |
99 #define SCU_CONTROL_0_SCU_ENABLE_RANGE 0:0 | 101 #define SCU_CONTROL_0_SCU_ENABLE_RANGE 0:0 |
100 #define SCU_INVALID_ALL_0 _MK_ADDR_CONST(0xc) | 102 #define SCU_INVALID_ALL_0 _MK_ADDR_CONST(0xc) |
101 | 103 |
102 #define ARM_PREF_BASE 0x50040000 | |
103 | |
104 #define NV_SCU_REGR(reg) NV_READ32(ARM_PREF_BASE + SCU_##reg##_0) | 104 #define NV_SCU_REGR(reg) NV_READ32(ARM_PREF_BASE + SCU_##reg##_0) |
105 #define NV_SCU_REGW(reg, val) NV_WRITE32((ARM_PREF_BASE + SCU_##reg##_0), (val)) | 105 #define NV_SCU_REGW(reg, val) NV_WRITE32((ARM_PREF_BASE + SCU_##reg##_0), (val)) |
106 | 106 |
107 //------------------------------------------------------------------------------ | 107 //------------------------------------------------------------------------------ |
108 // Provide missing enumerators for spec files. | 108 // Provide missing enumerators for spec files. |
109 //------------------------------------------------------------------------------ | 109 //------------------------------------------------------------------------------ |
110 | 110 |
111 #define NV_BIT_ADDRESS 0x40000000 | 111 #define NV_BIT_ADDRESS 0x40000000 |
112 #define NV3P_SIGNATURE 0x5AFEADD8 | 112 #define NV3P_SIGNATURE 0x5AFEADD8 |
113 | 113 |
114 void NvBlStartCpu_AP20(NvU32 ResetVector); | 114 void NvBlStartCpu_AP20(NvU32 ResetVector); |
115 void NvBlAvpHalt_AP20(void); | 115 void NvBlAvpHalt_AP20(void); |
116 NV_NAKED void NvBlStartUpAvp_AP20( void ); | 116 NV_NAKED void NvBlStartUpAvp_AP20( void ); |
117 NV_NAKED void ColdBoot_AP20( void ); | 117 NV_NAKED void ColdBoot_AP20( void ); |
118 void tegra2_start(void); | 118 void tegra2_start(void); |
119 void uart_post(char c); | 119 void uart_post(char c); |
120 void NvBlUartInit(void); | 120 void NvBlUartInit(void); |
121 void cpu_start(void); | 121 void cpu_start(void); |
122 void cpu_init_crit(void); | 122 void cpu_init_crit(void); |
123 void PostZz(void); | 123 void PostZz(void); |
124 void PostYy(void); | 124 void PostYy(void); |
125 void PostXx(void); | 125 void PostXx(void); |
| 126 void NvBlPrintU32(NvU32); |
126 | 127 |
OLD | NEW |