diff options
author | Hao Zhang | 2014-12-01 14:54:46 -0600 |
---|---|---|
committer | Hao Zhang | 2014-12-01 14:54:46 -0600 |
commit | 28702a904adc920dda017571dc685001e3e209af (patch) | |
tree | a8aee858ca67cfe57f10147b5d04668ce2d152b1 | |
parent | 35890580abb0c86b38dca5deb591376e94e90f3f (diff) | |
download | u-boot-28702a904adc920dda017571dc685001e3e209af.tar.gz u-boot-28702a904adc920dda017571dc685001e3e209af.tar.xz u-boot-28702a904adc920dda017571dc685001e3e209af.zip |
k2l: srss: enable Smart Reflex Class0 driverK2_UBOOT_2013_01_14.12_01
Enable Smart Reflex Class 0 driver in miscellaneous init.
Signed-off-by: Hao Zhang <hzhang@ti.com>
-rw-r--r-- | arch/arm/cpu/armv7/keystone/keystone_common.c | 17 | ||||
-rw-r--r-- | include/srss.h | 28 | ||||
-rw-r--r-- | include/tps544.h | 28 |
3 files changed, 73 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/keystone/keystone_common.c b/arch/arm/cpu/armv7/keystone/keystone_common.c index 06632ac314..1a14a6d92f 100644 --- a/arch/arm/cpu/armv7/keystone/keystone_common.c +++ b/arch/arm/cpu/armv7/keystone/keystone_common.c | |||
@@ -25,6 +25,8 @@ | |||
25 | 25 | ||
26 | #include <asm/arch/hardware.h> | 26 | #include <asm/arch/hardware.h> |
27 | #include <asm/io.h> | 27 | #include <asm/io.h> |
28 | #include <srss.h> | ||
29 | #include <tps544.h> | ||
28 | 30 | ||
29 | /* Byte swap the 32-bit data if the device is BE */ | 31 | /* Byte swap the 32-bit data if the device is BE */ |
30 | int cpu_to_bus(u32 *ptr, u32 length) | 32 | int cpu_to_bus(u32 *ptr, u32 length) |
@@ -94,6 +96,21 @@ int misc_init_r(void) | |||
94 | if ((debug_options & DBG_LEAVE_DSPS_ON) == 0) | 96 | if ((debug_options & DBG_LEAVE_DSPS_ON) == 0) |
95 | turn_off_all_dsps(KS2_NUM_DSPS); | 97 | turn_off_all_dsps(KS2_NUM_DSPS); |
96 | 98 | ||
99 | /* workarounds: | ||
100 | * 1: select PA PLL clock souce after powering on PA clock domain; | ||
101 | * 2. initialize SRSS after configuring PA clock since SRSS uses PA clk | ||
102 | */ | ||
103 | if (psc_enable_module(KS2_LPSC_PA)) | ||
104 | return -1; | ||
105 | pll_pa_clk_sel(1); | ||
106 | |||
107 | #ifdef CONFIG_SRSS_C0 | ||
108 | i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); | ||
109 | |||
110 | /* inistialize SRSS class 0 */ | ||
111 | srss_c0_init(KS2_SRSS_BASE, srss_tps544_init); | ||
112 | #endif | ||
113 | |||
97 | return 0; | 114 | return 0; |
98 | } | 115 | } |
99 | 116 | ||
diff --git a/include/srss.h b/include/srss.h new file mode 100644 index 0000000000..680702ef0a --- /dev/null +++ b/include/srss.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2014 Texas Instruments Inc. | ||
3 | * | ||
4 | * Keystone2: Smart Reflex Sub-system Initialization | ||
5 | * | ||
6 | * See file CREDITS for list of people who contributed to this | ||
7 | * project. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
22 | */ | ||
23 | |||
24 | #ifndef __INCLUDE_SRSS_H__ | ||
25 | #define __INCLUDE_SRSS_H__ | ||
26 | int srss_c0_init(u32 base, int (*pc_init)(u32, u32, u8)); | ||
27 | #endif | ||
28 | |||
diff --git a/include/tps544.h b/include/tps544.h new file mode 100644 index 0000000000..b8234a44e1 --- /dev/null +++ b/include/tps544.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2014 Texas Instruments Inc. | ||
3 | * | ||
4 | * Keystone2: Smart Reflex Sub-system Initialization | ||
5 | * | ||
6 | * See file CREDITS for list of people who contributed to this | ||
7 | * project. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
22 | */ | ||
23 | |||
24 | #ifndef __INCLUDE_TPS544_H__ | ||
25 | #define __INCLUDE_TPS544_H__ | ||
26 | int srss_tps544_init(u32 vid, u32 i2c_bus, u8 i2c_addr); | ||
27 | #endif | ||
28 | |||