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