Dirk Behme | a1aa39c | 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 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License as |
| 8 | * published by the Free Software Foundation; either version 2 of |
| 9 | * the License, or (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 19 | * MA 02111-1307 USA |
| 20 | */ |
| 21 | #ifndef _CLOCKS_H_ |
| 22 | #define _CLOCKS_H_ |
| 23 | |
| 24 | #define LDELAY 12000000 |
| 25 | |
| 26 | #define S12M 12000000 |
| 27 | #define S13M 13000000 |
| 28 | #define S19_2M 19200000 |
| 29 | #define S24M 24000000 |
| 30 | #define S26M 26000000 |
| 31 | #define S38_4M 38400000 |
| 32 | |
| 33 | #define FCK_IVA2_ON 0x00000001 |
| 34 | #define FCK_CORE1_ON 0x03fffe29 |
| 35 | #define ICK_CORE1_ON 0x3ffffffb |
| 36 | #define ICK_CORE2_ON 0x0000001f |
| 37 | #define FCK_WKUP_ON 0x000000e9 |
| 38 | #define ICK_WKUP_ON 0x0000003f |
| 39 | #define FCK_DSS_ON 0x00000005 |
| 40 | #define ICK_DSS_ON 0x00000001 |
| 41 | #define FCK_CAM_ON 0x00000001 |
| 42 | #define ICK_CAM_ON 0x00000001 |
| 43 | #define FCK_PER_ON 0x0003ffff |
| 44 | #define ICK_PER_ON 0x0003ffff |
| 45 | |
| 46 | /* Used to index into DPLL parameter tables */ |
| 47 | typedef struct { |
| 48 | unsigned int m; |
| 49 | unsigned int n; |
| 50 | unsigned int fsel; |
| 51 | unsigned int m2; |
| 52 | } dpll_param; |
| 53 | |
Steve Sakoman | 24e81c1 | 2010-08-18 07:34:09 -0700 | [diff] [blame] | 54 | struct dpll_per_36x_param { |
| 55 | unsigned int sys_clk; |
| 56 | unsigned int m; |
| 57 | unsigned int n; |
| 58 | unsigned int m2; |
| 59 | unsigned int m3; |
| 60 | unsigned int m4; |
| 61 | unsigned int m5; |
| 62 | unsigned int m6; |
| 63 | unsigned int m2div; |
| 64 | }; |
| 65 | |
Dirk Behme | a1aa39c | 2008-12-14 09:47:12 +0100 | [diff] [blame] | 66 | /* Following functions are exported from lowlevel_init.S */ |
| 67 | extern dpll_param *get_mpu_dpll_param(void); |
| 68 | extern dpll_param *get_iva_dpll_param(void); |
| 69 | extern dpll_param *get_core_dpll_param(void); |
| 70 | extern dpll_param *get_per_dpll_param(void); |
Alexander Holler | 96b549e | 2011-04-19 09:27:55 -0400 | [diff] [blame] | 71 | extern dpll_param *get_per2_dpll_param(void); |
Dirk Behme | a1aa39c | 2008-12-14 09:47:12 +0100 | [diff] [blame] | 72 | |
Steve Sakoman | 24e81c1 | 2010-08-18 07:34:09 -0700 | [diff] [blame] | 73 | extern dpll_param *get_36x_mpu_dpll_param(void); |
| 74 | extern dpll_param *get_36x_iva_dpll_param(void); |
| 75 | extern dpll_param *get_36x_core_dpll_param(void); |
| 76 | extern dpll_param *get_36x_per_dpll_param(void); |
| 77 | |
Dirk Behme | a1aa39c | 2008-12-14 09:47:12 +0100 | [diff] [blame] | 78 | extern void *_end_vect, *_start; |
| 79 | |
| 80 | #endif |