Dirk Behme | a8b6450 | 2008-12-14 09:47:12 +0100 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2006-2008 |
| 3 | * Texas Instruments, <www.ti.com> |
| 4 | * Richard Woodruff <r-woodruff2@ti.com> |
| 5 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 6 | * SPDX-License-Identifier: GPL-2.0+ |
Dirk Behme | a8b6450 | 2008-12-14 09:47:12 +0100 | [diff] [blame] | 7 | */ |
| 8 | #ifndef _CLOCKS_H_ |
| 9 | #define _CLOCKS_H_ |
| 10 | |
| 11 | #define LDELAY 12000000 |
| 12 | |
| 13 | #define S12M 12000000 |
| 14 | #define S13M 13000000 |
| 15 | #define S19_2M 19200000 |
| 16 | #define S24M 24000000 |
| 17 | #define S26M 26000000 |
| 18 | #define S38_4M 38400000 |
| 19 | |
| 20 | #define FCK_IVA2_ON 0x00000001 |
| 21 | #define FCK_CORE1_ON 0x03fffe29 |
| 22 | #define ICK_CORE1_ON 0x3ffffffb |
| 23 | #define ICK_CORE2_ON 0x0000001f |
| 24 | #define FCK_WKUP_ON 0x000000e9 |
| 25 | #define ICK_WKUP_ON 0x0000003f |
| 26 | #define FCK_DSS_ON 0x00000005 |
| 27 | #define ICK_DSS_ON 0x00000001 |
| 28 | #define FCK_CAM_ON 0x00000001 |
| 29 | #define ICK_CAM_ON 0x00000001 |
| 30 | #define FCK_PER_ON 0x0003ffff |
| 31 | #define ICK_PER_ON 0x0003ffff |
| 32 | |
| 33 | /* Used to index into DPLL parameter tables */ |
| 34 | typedef struct { |
| 35 | unsigned int m; |
| 36 | unsigned int n; |
| 37 | unsigned int fsel; |
| 38 | unsigned int m2; |
| 39 | } dpll_param; |
| 40 | |
Steve Sakoman | 7c281c9 | 2010-08-18 07:34:09 -0700 | [diff] [blame] | 41 | struct dpll_per_36x_param { |
| 42 | unsigned int sys_clk; |
| 43 | unsigned int m; |
| 44 | unsigned int n; |
| 45 | unsigned int m2; |
| 46 | unsigned int m3; |
| 47 | unsigned int m4; |
| 48 | unsigned int m5; |
| 49 | unsigned int m6; |
| 50 | unsigned int m2div; |
| 51 | }; |
| 52 | |
Dirk Behme | a8b6450 | 2008-12-14 09:47:12 +0100 | [diff] [blame] | 53 | /* Following functions are exported from lowlevel_init.S */ |
| 54 | extern dpll_param *get_mpu_dpll_param(void); |
| 55 | extern dpll_param *get_iva_dpll_param(void); |
| 56 | extern dpll_param *get_core_dpll_param(void); |
| 57 | extern dpll_param *get_per_dpll_param(void); |
Alexander Holler | 7b89795 | 2011-04-19 09:27:55 -0400 | [diff] [blame] | 58 | extern dpll_param *get_per2_dpll_param(void); |
Dirk Behme | a8b6450 | 2008-12-14 09:47:12 +0100 | [diff] [blame] | 59 | |
Steve Sakoman | 7c281c9 | 2010-08-18 07:34:09 -0700 | [diff] [blame] | 60 | extern dpll_param *get_36x_mpu_dpll_param(void); |
| 61 | extern dpll_param *get_36x_iva_dpll_param(void); |
| 62 | extern dpll_param *get_36x_core_dpll_param(void); |
| 63 | extern dpll_param *get_36x_per_dpll_param(void); |
Naumann Andreas | a704a6d | 2013-07-09 09:43:17 +0200 | [diff] [blame^] | 64 | extern dpll_param *get_36x_per2_dpll_param(void); |
Steve Sakoman | 7c281c9 | 2010-08-18 07:34:09 -0700 | [diff] [blame] | 65 | |
Dirk Behme | a8b6450 | 2008-12-14 09:47:12 +0100 | [diff] [blame] | 66 | extern void *_end_vect, *_start; |
| 67 | |
| 68 | #endif |