Scott Wood | f64c98c | 2015-03-20 19:28:12 -0700 | [diff] [blame] | 1 | /* |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 2 | * Copyright 2014-2015 Freescale Semiconductor |
Scott Wood | f64c98c | 2015-03-20 19:28:12 -0700 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #include <common.h> |
Ashish Kumar | 1123406 | 2017-08-11 11:09:14 +0530 | [diff] [blame] | 8 | #include <fsl_immap.h> |
Scott Wood | f64c98c | 2015-03-20 19:28:12 -0700 | [diff] [blame] | 9 | #include <fsl_ifc.h> |
Tang Yuantian | 57894be | 2015-12-09 15:32:18 +0800 | [diff] [blame] | 10 | #include <ahci.h> |
| 11 | #include <scsi.h> |
Hou Zhiqiang | 4b23ca8 | 2016-08-02 19:03:27 +0800 | [diff] [blame] | 12 | #include <asm/arch/fsl_serdes.h> |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 13 | #include <asm/arch/soc.h> |
Scott Wood | ae1df32 | 2015-03-20 19:28:13 -0700 | [diff] [blame] | 14 | #include <asm/io.h> |
Scott Wood | 8e728cd | 2015-03-24 13:25:02 -0700 | [diff] [blame] | 15 | #include <asm/global_data.h> |
Prabhakar Kushwaha | 22cfe96 | 2015-11-05 12:00:14 +0530 | [diff] [blame] | 16 | #include <asm/arch-fsl-layerscape/config.h> |
Hou Zhiqiang | 4b23ca8 | 2016-08-02 19:03:27 +0800 | [diff] [blame] | 17 | #ifdef CONFIG_LAYERSCAPE_NS_ACCESS |
Hou Zhiqiang | 5ac9a5c | 2016-08-02 19:03:23 +0800 | [diff] [blame] | 18 | #include <fsl_csu.h> |
Hou Zhiqiang | 4b23ca8 | 2016-08-02 19:03:27 +0800 | [diff] [blame] | 19 | #endif |
Prabhakar Kushwaha | d169ebe | 2016-06-03 18:41:31 +0530 | [diff] [blame] | 20 | #ifdef CONFIG_SYS_FSL_DDR |
Shengzhou Liu | ddf060b | 2016-04-07 16:22:21 +0800 | [diff] [blame] | 21 | #include <fsl_ddr_sdram.h> |
| 22 | #include <fsl_ddr.h> |
Prabhakar Kushwaha | d169ebe | 2016-06-03 18:41:31 +0530 | [diff] [blame] | 23 | #endif |
Aneesh Bansal | 39d5b3b | 2016-01-22 16:37:26 +0530 | [diff] [blame] | 24 | #ifdef CONFIG_CHAIN_OF_TRUST |
| 25 | #include <fsl_validate.h> |
| 26 | #endif |
Ashish Kumar | b25faa2 | 2017-08-31 16:12:53 +0530 | [diff] [blame] | 27 | #include <fsl_immap.h> |
Scott Wood | 8e728cd | 2015-03-24 13:25:02 -0700 | [diff] [blame] | 28 | |
| 29 | DECLARE_GLOBAL_DATA_PTR; |
Scott Wood | ae1df32 | 2015-03-20 19:28:13 -0700 | [diff] [blame] | 30 | |
York Sun | cbe8e1c | 2016-04-04 11:41:26 -0700 | [diff] [blame] | 31 | bool soc_has_dp_ddr(void) |
| 32 | { |
| 33 | struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR); |
| 34 | u32 svr = gur_in32(&gur->svr); |
| 35 | |
Priyanka Jain | 4a6f173 | 2016-11-17 12:29:55 +0530 | [diff] [blame] | 36 | /* LS2085A, LS2088A, LS2048A has DP_DDR */ |
| 37 | if ((SVR_SOC_VER(svr) == SVR_LS2085A) || |
| 38 | (SVR_SOC_VER(svr) == SVR_LS2088A) || |
| 39 | (SVR_SOC_VER(svr) == SVR_LS2048A)) |
York Sun | cbe8e1c | 2016-04-04 11:41:26 -0700 | [diff] [blame] | 40 | return true; |
| 41 | |
| 42 | return false; |
| 43 | } |
| 44 | |
| 45 | bool soc_has_aiop(void) |
| 46 | { |
| 47 | struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR); |
| 48 | u32 svr = gur_in32(&gur->svr); |
| 49 | |
| 50 | /* LS2085A has AIOP */ |
Prabhakar Kushwaha | ac7f242 | 2016-06-24 13:48:13 +0530 | [diff] [blame] | 51 | if (SVR_SOC_VER(svr) == SVR_LS2085A) |
York Sun | cbe8e1c | 2016-04-04 11:41:26 -0700 | [diff] [blame] | 52 | return true; |
| 53 | |
| 54 | return false; |
| 55 | } |
| 56 | |
Ran Wang | b358b7b | 2017-09-04 18:46:48 +0800 | [diff] [blame] | 57 | static inline void set_usb_txvreftune(u32 __iomem *scfg, u32 offset) |
| 58 | { |
| 59 | scfg_clrsetbits32(scfg + offset / 4, |
| 60 | 0xF << 6, |
| 61 | SCFG_USB_TXVREFTUNE << 6); |
| 62 | } |
| 63 | |
| 64 | static void erratum_a009008(void) |
| 65 | { |
| 66 | #ifdef CONFIG_SYS_FSL_ERRATUM_A009008 |
| 67 | u32 __iomem *scfg = (u32 __iomem *)SCFG_BASE; |
Ran Wang | 9e8fabc | 2017-09-04 18:46:49 +0800 | [diff] [blame] | 68 | |
Ran Wang | b358b7b | 2017-09-04 18:46:48 +0800 | [diff] [blame] | 69 | #if defined(CONFIG_ARCH_LS1043A) || defined(CONFIG_ARCH_LS1046A) |
| 70 | set_usb_txvreftune(scfg, SCFG_USB3PRM1CR_USB1); |
| 71 | set_usb_txvreftune(scfg, SCFG_USB3PRM1CR_USB2); |
| 72 | set_usb_txvreftune(scfg, SCFG_USB3PRM1CR_USB3); |
| 73 | #elif defined(CONFIG_ARCH_LS2080A) |
| 74 | set_usb_txvreftune(scfg, SCFG_USB3PRM1CR); |
| 75 | #endif |
| 76 | #endif /* CONFIG_SYS_FSL_ERRATUM_A009008 */ |
| 77 | } |
| 78 | |
Ran Wang | 9e8fabc | 2017-09-04 18:46:49 +0800 | [diff] [blame] | 79 | static inline void set_usb_sqrxtune(u32 __iomem *scfg, u32 offset) |
| 80 | { |
| 81 | scfg_clrbits32(scfg + offset / 4, |
| 82 | SCFG_USB_SQRXTUNE_MASK << 23); |
| 83 | } |
| 84 | |
| 85 | static void erratum_a009798(void) |
| 86 | { |
| 87 | #ifdef CONFIG_SYS_FSL_ERRATUM_A009798 |
| 88 | u32 __iomem *scfg = (u32 __iomem *)SCFG_BASE; |
| 89 | |
| 90 | #if defined(CONFIG_ARCH_LS1043A) || defined(CONFIG_ARCH_LS1046A) |
| 91 | set_usb_sqrxtune(scfg, SCFG_USB3PRM1CR_USB1); |
| 92 | set_usb_sqrxtune(scfg, SCFG_USB3PRM1CR_USB2); |
| 93 | set_usb_sqrxtune(scfg, SCFG_USB3PRM1CR_USB3); |
| 94 | #elif defined(CONFIG_ARCH_LS2080A) |
| 95 | set_usb_sqrxtune(scfg, SCFG_USB3PRM1CR); |
| 96 | #endif |
| 97 | #endif /* CONFIG_SYS_FSL_ERRATUM_A009798 */ |
| 98 | } |
| 99 | |
Ran Wang | e64f747 | 2017-09-04 18:46:50 +0800 | [diff] [blame] | 100 | #if defined(CONFIG_ARCH_LS1043A) || defined(CONFIG_ARCH_LS1046A) |
| 101 | static inline void set_usb_pcstxswingfull(u32 __iomem *scfg, u32 offset) |
| 102 | { |
| 103 | scfg_clrsetbits32(scfg + offset / 4, |
| 104 | 0x7F << 9, |
| 105 | SCFG_USB_PCSTXSWINGFULL << 9); |
| 106 | } |
| 107 | #endif |
| 108 | |
| 109 | static void erratum_a008997(void) |
| 110 | { |
| 111 | #ifdef CONFIG_SYS_FSL_ERRATUM_A008997 |
| 112 | #if defined(CONFIG_ARCH_LS1043A) || defined(CONFIG_ARCH_LS1046A) |
| 113 | u32 __iomem *scfg = (u32 __iomem *)SCFG_BASE; |
| 114 | |
| 115 | set_usb_pcstxswingfull(scfg, SCFG_USB3PRM2CR_USB1); |
| 116 | set_usb_pcstxswingfull(scfg, SCFG_USB3PRM2CR_USB2); |
| 117 | set_usb_pcstxswingfull(scfg, SCFG_USB3PRM2CR_USB3); |
| 118 | #endif |
| 119 | #endif /* CONFIG_SYS_FSL_ERRATUM_A008997 */ |
| 120 | } |
| 121 | |
Ran Wang | 3ba6948 | 2017-09-04 18:46:51 +0800 | [diff] [blame] | 122 | #if defined(CONFIG_ARCH_LS1043A) || defined(CONFIG_ARCH_LS1046A) |
| 123 | |
| 124 | #define PROGRAM_USB_PHY_RX_OVRD_IN_HI(phy) \ |
| 125 | out_be16((phy) + SCFG_USB_PHY_RX_OVRD_IN_HI, USB_PHY_RX_EQ_VAL_1); \ |
| 126 | out_be16((phy) + SCFG_USB_PHY_RX_OVRD_IN_HI, USB_PHY_RX_EQ_VAL_2); \ |
| 127 | out_be16((phy) + SCFG_USB_PHY_RX_OVRD_IN_HI, USB_PHY_RX_EQ_VAL_3); \ |
| 128 | out_be16((phy) + SCFG_USB_PHY_RX_OVRD_IN_HI, USB_PHY_RX_EQ_VAL_4) |
| 129 | |
| 130 | #elif defined(CONFIG_ARCH_LS2080A) |
| 131 | |
| 132 | #define PROGRAM_USB_PHY_RX_OVRD_IN_HI(phy) \ |
| 133 | out_le16((phy) + DCSR_USB_PHY_RX_OVRD_IN_HI, USB_PHY_RX_EQ_VAL_1); \ |
| 134 | out_le16((phy) + DCSR_USB_PHY_RX_OVRD_IN_HI, USB_PHY_RX_EQ_VAL_2); \ |
| 135 | out_le16((phy) + DCSR_USB_PHY_RX_OVRD_IN_HI, USB_PHY_RX_EQ_VAL_3); \ |
| 136 | out_le16((phy) + DCSR_USB_PHY_RX_OVRD_IN_HI, USB_PHY_RX_EQ_VAL_4) |
| 137 | |
| 138 | #endif |
| 139 | |
| 140 | static void erratum_a009007(void) |
| 141 | { |
| 142 | #if defined(CONFIG_ARCH_LS1043A) || defined(CONFIG_ARCH_LS1046A) |
| 143 | void __iomem *usb_phy = (void __iomem *)SCFG_USB_PHY1; |
| 144 | |
| 145 | PROGRAM_USB_PHY_RX_OVRD_IN_HI(usb_phy); |
| 146 | |
| 147 | usb_phy = (void __iomem *)SCFG_USB_PHY2; |
| 148 | PROGRAM_USB_PHY_RX_OVRD_IN_HI(usb_phy); |
| 149 | |
| 150 | usb_phy = (void __iomem *)SCFG_USB_PHY3; |
| 151 | PROGRAM_USB_PHY_RX_OVRD_IN_HI(usb_phy); |
| 152 | #elif defined(CONFIG_ARCH_LS2080A) |
| 153 | void __iomem *dcsr = (void __iomem *)DCSR_BASE; |
| 154 | |
| 155 | PROGRAM_USB_PHY_RX_OVRD_IN_HI(dcsr + DCSR_USB_PHY1); |
| 156 | PROGRAM_USB_PHY_RX_OVRD_IN_HI(dcsr + DCSR_USB_PHY2); |
| 157 | #endif /* CONFIG_SYS_FSL_ERRATUM_A009007 */ |
| 158 | } |
| 159 | |
Shengzhou Liu | a3117ee | 2016-11-11 18:11:05 +0800 | [diff] [blame] | 160 | #if defined(CONFIG_FSL_LSCH3) |
Yao Yuan | fae8805 | 2015-12-05 14:59:14 +0800 | [diff] [blame] | 161 | /* |
| 162 | * This erratum requires setting a value to eddrtqcr1 to |
| 163 | * optimal the DDR performance. |
| 164 | */ |
| 165 | static void erratum_a008336(void) |
| 166 | { |
Shengzhou Liu | a3117ee | 2016-11-11 18:11:05 +0800 | [diff] [blame] | 167 | #ifdef CONFIG_SYS_FSL_ERRATUM_A008336 |
Yao Yuan | fae8805 | 2015-12-05 14:59:14 +0800 | [diff] [blame] | 168 | u32 *eddrtqcr1; |
| 169 | |
Yao Yuan | fae8805 | 2015-12-05 14:59:14 +0800 | [diff] [blame] | 170 | #ifdef CONFIG_SYS_FSL_DCSR_DDR_ADDR |
| 171 | eddrtqcr1 = (void *)CONFIG_SYS_FSL_DCSR_DDR_ADDR + 0x800; |
Shengzhou Liu | 7beb0c4 | 2016-08-26 18:30:38 +0800 | [diff] [blame] | 172 | if (fsl_ddr_get_version(0) == 0x50200) |
| 173 | out_le32(eddrtqcr1, 0x63b30002); |
Yao Yuan | fae8805 | 2015-12-05 14:59:14 +0800 | [diff] [blame] | 174 | #endif |
| 175 | #ifdef CONFIG_SYS_FSL_DCSR_DDR2_ADDR |
| 176 | eddrtqcr1 = (void *)CONFIG_SYS_FSL_DCSR_DDR2_ADDR + 0x800; |
Shengzhou Liu | 7beb0c4 | 2016-08-26 18:30:38 +0800 | [diff] [blame] | 177 | if (fsl_ddr_get_version(0) == 0x50200) |
| 178 | out_le32(eddrtqcr1, 0x63b30002); |
Yao Yuan | fae8805 | 2015-12-05 14:59:14 +0800 | [diff] [blame] | 179 | #endif |
| 180 | #endif |
| 181 | } |
| 182 | |
| 183 | /* |
| 184 | * This erratum requires a register write before being Memory |
| 185 | * controller 3 being enabled. |
| 186 | */ |
| 187 | static void erratum_a008514(void) |
| 188 | { |
Shengzhou Liu | a3117ee | 2016-11-11 18:11:05 +0800 | [diff] [blame] | 189 | #ifdef CONFIG_SYS_FSL_ERRATUM_A008514 |
Yao Yuan | fae8805 | 2015-12-05 14:59:14 +0800 | [diff] [blame] | 190 | u32 *eddrtqcr1; |
| 191 | |
Yao Yuan | fae8805 | 2015-12-05 14:59:14 +0800 | [diff] [blame] | 192 | #ifdef CONFIG_SYS_FSL_DCSR_DDR3_ADDR |
| 193 | eddrtqcr1 = (void *)CONFIG_SYS_FSL_DCSR_DDR3_ADDR + 0x800; |
| 194 | out_le32(eddrtqcr1, 0x63b20002); |
| 195 | #endif |
| 196 | #endif |
| 197 | } |
Prabhakar Kushwaha | 22cfe96 | 2015-11-05 12:00:14 +0530 | [diff] [blame] | 198 | #ifdef CONFIG_SYS_FSL_ERRATUM_A009635 |
| 199 | #define PLATFORM_CYCLE_ENV_VAR "a009635_interval_val" |
| 200 | |
| 201 | static unsigned long get_internval_val_mhz(void) |
| 202 | { |
Simon Glass | 64b723f | 2017-08-03 12:22:12 -0600 | [diff] [blame] | 203 | char *interval = env_get(PLATFORM_CYCLE_ENV_VAR); |
Prabhakar Kushwaha | 22cfe96 | 2015-11-05 12:00:14 +0530 | [diff] [blame] | 204 | /* |
| 205 | * interval is the number of platform cycles(MHz) between |
| 206 | * wake up events generated by EPU. |
| 207 | */ |
| 208 | ulong interval_mhz = get_bus_freq(0) / (1000 * 1000); |
| 209 | |
| 210 | if (interval) |
| 211 | interval_mhz = simple_strtoul(interval, NULL, 10); |
| 212 | |
| 213 | return interval_mhz; |
| 214 | } |
| 215 | |
| 216 | void erratum_a009635(void) |
| 217 | { |
| 218 | u32 val; |
| 219 | unsigned long interval_mhz = get_internval_val_mhz(); |
| 220 | |
| 221 | if (!interval_mhz) |
| 222 | return; |
| 223 | |
| 224 | val = in_le32(DCSR_CGACRE5); |
| 225 | writel(val | 0x00000200, DCSR_CGACRE5); |
| 226 | |
| 227 | val = in_le32(EPU_EPCMPR5); |
| 228 | writel(interval_mhz, EPU_EPCMPR5); |
| 229 | val = in_le32(EPU_EPCCR5); |
| 230 | writel(val | 0x82820000, EPU_EPCCR5); |
| 231 | val = in_le32(EPU_EPSMCR5); |
| 232 | writel(val | 0x002f0000, EPU_EPSMCR5); |
| 233 | val = in_le32(EPU_EPECR5); |
| 234 | writel(val | 0x20000000, EPU_EPECR5); |
| 235 | val = in_le32(EPU_EPGCR); |
| 236 | writel(val | 0x80000000, EPU_EPGCR); |
| 237 | } |
| 238 | #endif /* CONFIG_SYS_FSL_ERRATUM_A009635 */ |
| 239 | |
Scott Wood | 8e728cd | 2015-03-24 13:25:02 -0700 | [diff] [blame] | 240 | static void erratum_rcw_src(void) |
| 241 | { |
Santan Kumar | 9913648 | 2017-05-05 15:42:28 +0530 | [diff] [blame] | 242 | #if defined(CONFIG_SPL) && defined(CONFIG_NAND_BOOT) |
Scott Wood | 8e728cd | 2015-03-24 13:25:02 -0700 | [diff] [blame] | 243 | u32 __iomem *dcfg_ccsr = (u32 __iomem *)DCFG_BASE; |
| 244 | u32 __iomem *dcfg_dcsr = (u32 __iomem *)DCFG_DCSR_BASE; |
| 245 | u32 val; |
| 246 | |
| 247 | val = in_le32(dcfg_ccsr + DCFG_PORSR1 / 4); |
| 248 | val &= ~DCFG_PORSR1_RCW_SRC; |
| 249 | val |= DCFG_PORSR1_RCW_SRC_NOR; |
| 250 | out_le32(dcfg_dcsr + DCFG_DCSR_PORCR1 / 4, val); |
| 251 | #endif |
| 252 | } |
| 253 | |
York Sun | 0404a39 | 2015-03-23 10:41:35 -0700 | [diff] [blame] | 254 | #define I2C_DEBUG_REG 0x6 |
| 255 | #define I2C_GLITCH_EN 0x8 |
| 256 | /* |
| 257 | * This erratum requires setting glitch_en bit to enable |
| 258 | * digital glitch filter to improve clock stability. |
| 259 | */ |
Ashish kumar | 3b52a23 | 2017-02-23 16:03:57 +0530 | [diff] [blame] | 260 | #ifdef CONFIG_SYS_FSL_ERRATUM_A009203 |
York Sun | 0404a39 | 2015-03-23 10:41:35 -0700 | [diff] [blame] | 261 | static void erratum_a009203(void) |
| 262 | { |
| 263 | u8 __iomem *ptr; |
| 264 | #ifdef CONFIG_SYS_I2C |
| 265 | #ifdef I2C1_BASE_ADDR |
| 266 | ptr = (u8 __iomem *)(I2C1_BASE_ADDR + I2C_DEBUG_REG); |
| 267 | |
| 268 | writeb(I2C_GLITCH_EN, ptr); |
| 269 | #endif |
| 270 | #ifdef I2C2_BASE_ADDR |
| 271 | ptr = (u8 __iomem *)(I2C2_BASE_ADDR + I2C_DEBUG_REG); |
| 272 | |
| 273 | writeb(I2C_GLITCH_EN, ptr); |
| 274 | #endif |
| 275 | #ifdef I2C3_BASE_ADDR |
| 276 | ptr = (u8 __iomem *)(I2C3_BASE_ADDR + I2C_DEBUG_REG); |
| 277 | |
| 278 | writeb(I2C_GLITCH_EN, ptr); |
| 279 | #endif |
| 280 | #ifdef I2C4_BASE_ADDR |
| 281 | ptr = (u8 __iomem *)(I2C4_BASE_ADDR + I2C_DEBUG_REG); |
| 282 | |
| 283 | writeb(I2C_GLITCH_EN, ptr); |
| 284 | #endif |
| 285 | #endif |
| 286 | } |
Ashish kumar | 3b52a23 | 2017-02-23 16:03:57 +0530 | [diff] [blame] | 287 | #endif |
Shengzhou Liu | a3117ee | 2016-11-11 18:11:05 +0800 | [diff] [blame] | 288 | |
Saksham Jain | 5d8ffe1 | 2016-03-23 16:24:40 +0530 | [diff] [blame] | 289 | void bypass_smmu(void) |
| 290 | { |
| 291 | u32 val; |
| 292 | val = (in_le32(SMMU_SCR0) | SCR0_CLIENTPD_MASK) & ~(SCR0_USFCFG_MASK); |
| 293 | out_le32(SMMU_SCR0, val); |
| 294 | val = (in_le32(SMMU_NSCR0) | SCR0_CLIENTPD_MASK) & ~(SCR0_USFCFG_MASK); |
| 295 | out_le32(SMMU_NSCR0, val); |
| 296 | } |
Scott Wood | f64c98c | 2015-03-20 19:28:12 -0700 | [diff] [blame] | 297 | void fsl_lsch3_early_init_f(void) |
| 298 | { |
Scott Wood | 8e728cd | 2015-03-24 13:25:02 -0700 | [diff] [blame] | 299 | erratum_rcw_src(); |
Scott Wood | f64c98c | 2015-03-20 19:28:12 -0700 | [diff] [blame] | 300 | init_early_memctl_regs(); /* tighten IFC timing */ |
Ashish kumar | 3b52a23 | 2017-02-23 16:03:57 +0530 | [diff] [blame] | 301 | #ifdef CONFIG_SYS_FSL_ERRATUM_A009203 |
York Sun | 0404a39 | 2015-03-23 10:41:35 -0700 | [diff] [blame] | 302 | erratum_a009203(); |
Ashish kumar | 3b52a23 | 2017-02-23 16:03:57 +0530 | [diff] [blame] | 303 | #endif |
Yao Yuan | fae8805 | 2015-12-05 14:59:14 +0800 | [diff] [blame] | 304 | erratum_a008514(); |
| 305 | erratum_a008336(); |
Ran Wang | b358b7b | 2017-09-04 18:46:48 +0800 | [diff] [blame] | 306 | erratum_a009008(); |
Ran Wang | 9e8fabc | 2017-09-04 18:46:49 +0800 | [diff] [blame] | 307 | erratum_a009798(); |
Ran Wang | e64f747 | 2017-09-04 18:46:50 +0800 | [diff] [blame] | 308 | erratum_a008997(); |
Ran Wang | 3ba6948 | 2017-09-04 18:46:51 +0800 | [diff] [blame] | 309 | erratum_a009007(); |
Saksham Jain | 5d8ffe1 | 2016-03-23 16:24:40 +0530 | [diff] [blame] | 310 | #ifdef CONFIG_CHAIN_OF_TRUST |
| 311 | /* In case of Secure Boot, the IBR configures the SMMU |
| 312 | * to allow only Secure transactions. |
| 313 | * SMMU must be reset in bypass mode. |
| 314 | * Set the ClientPD bit and Clear the USFCFG Bit |
| 315 | */ |
| 316 | if (fsl_check_boot_mode_secure() == 1) |
| 317 | bypass_smmu(); |
| 318 | #endif |
Scott Wood | f64c98c | 2015-03-20 19:28:12 -0700 | [diff] [blame] | 319 | } |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 320 | |
Tang Yuantian | 57894be | 2015-12-09 15:32:18 +0800 | [diff] [blame] | 321 | #ifdef CONFIG_SCSI_AHCI_PLAT |
| 322 | int sata_init(void) |
| 323 | { |
| 324 | struct ccsr_ahci __iomem *ccsr_ahci; |
| 325 | |
Ashish Kumar | 3eec512 | 2017-08-18 10:54:35 +0530 | [diff] [blame^] | 326 | #ifdef CONFIG_SYS_SATA2 |
Tang Yuantian | 57894be | 2015-12-09 15:32:18 +0800 | [diff] [blame] | 327 | ccsr_ahci = (void *)CONFIG_SYS_SATA2; |
| 328 | out_le32(&ccsr_ahci->ppcfg, AHCI_PORT_PHY_1_CFG); |
| 329 | out_le32(&ccsr_ahci->ptc, AHCI_PORT_TRANS_CFG); |
Tang Yuantian | ab9c831 | 2016-12-01 17:06:58 +0800 | [diff] [blame] | 330 | out_le32(&ccsr_ahci->axicc, AHCI_PORT_AXICC_CFG); |
Ashish Kumar | 3eec512 | 2017-08-18 10:54:35 +0530 | [diff] [blame^] | 331 | #endif |
Tang Yuantian | 57894be | 2015-12-09 15:32:18 +0800 | [diff] [blame] | 332 | |
Ashish Kumar | 3eec512 | 2017-08-18 10:54:35 +0530 | [diff] [blame^] | 333 | #ifdef CONFIG_SYS_SATA1 |
Tang Yuantian | 57894be | 2015-12-09 15:32:18 +0800 | [diff] [blame] | 334 | ccsr_ahci = (void *)CONFIG_SYS_SATA1; |
| 335 | out_le32(&ccsr_ahci->ppcfg, AHCI_PORT_PHY_1_CFG); |
| 336 | out_le32(&ccsr_ahci->ptc, AHCI_PORT_TRANS_CFG); |
Tang Yuantian | ab9c831 | 2016-12-01 17:06:58 +0800 | [diff] [blame] | 337 | out_le32(&ccsr_ahci->axicc, AHCI_PORT_AXICC_CFG); |
Tang Yuantian | 57894be | 2015-12-09 15:32:18 +0800 | [diff] [blame] | 338 | |
| 339 | ahci_init((void __iomem *)CONFIG_SYS_SATA1); |
Simon Glass | 4822873 | 2017-06-14 21:28:41 -0600 | [diff] [blame] | 340 | scsi_scan(false); |
Ashish Kumar | 3eec512 | 2017-08-18 10:54:35 +0530 | [diff] [blame^] | 341 | #endif |
Tang Yuantian | 57894be | 2015-12-09 15:32:18 +0800 | [diff] [blame] | 342 | |
| 343 | return 0; |
| 344 | } |
| 345 | #endif |
| 346 | |
Prabhakar Kushwaha | 1966d01 | 2016-06-03 18:41:27 +0530 | [diff] [blame] | 347 | #elif defined(CONFIG_FSL_LSCH2) |
Tang Yuantian | 57894be | 2015-12-09 15:32:18 +0800 | [diff] [blame] | 348 | #ifdef CONFIG_SCSI_AHCI_PLAT |
| 349 | int sata_init(void) |
| 350 | { |
| 351 | struct ccsr_ahci __iomem *ccsr_ahci = (void *)CONFIG_SYS_SATA; |
| 352 | |
Shaohui Xie | ed81e2b | 2016-09-07 17:56:12 +0800 | [diff] [blame] | 353 | /* Disable SATA ECC */ |
| 354 | out_le32((void *)CONFIG_SYS_DCSR_DCFG_ADDR + 0x520, 0x80000000); |
Tang Yuantian | 57894be | 2015-12-09 15:32:18 +0800 | [diff] [blame] | 355 | out_le32(&ccsr_ahci->ppcfg, AHCI_PORT_PHY_1_CFG); |
Tang Yuantian | 57894be | 2015-12-09 15:32:18 +0800 | [diff] [blame] | 356 | out_le32(&ccsr_ahci->ptc, AHCI_PORT_TRANS_CFG); |
Tang Yuantian | 2945ae0 | 2016-08-08 15:07:20 +0800 | [diff] [blame] | 357 | out_le32(&ccsr_ahci->axicc, AHCI_PORT_AXICC_CFG); |
Tang Yuantian | 57894be | 2015-12-09 15:32:18 +0800 | [diff] [blame] | 358 | |
| 359 | ahci_init((void __iomem *)CONFIG_SYS_SATA); |
Simon Glass | 4822873 | 2017-06-14 21:28:41 -0600 | [diff] [blame] | 360 | scsi_scan(false); |
Tang Yuantian | 57894be | 2015-12-09 15:32:18 +0800 | [diff] [blame] | 361 | |
| 362 | return 0; |
| 363 | } |
| 364 | #endif |
| 365 | |
Mingkai Hu | 8beb075 | 2015-12-07 16:58:54 +0800 | [diff] [blame] | 366 | static void erratum_a009929(void) |
| 367 | { |
| 368 | #ifdef CONFIG_SYS_FSL_ERRATUM_A009929 |
| 369 | struct ccsr_gur *gur = (void *)CONFIG_SYS_FSL_GUTS_ADDR; |
| 370 | u32 __iomem *dcsr_cop_ccp = (void *)CONFIG_SYS_DCSR_COP_CCP_ADDR; |
| 371 | u32 rstrqmr1 = gur_in32(&gur->rstrqmr1); |
| 372 | |
| 373 | rstrqmr1 |= 0x00000400; |
| 374 | gur_out32(&gur->rstrqmr1, rstrqmr1); |
| 375 | writel(0x01000000, dcsr_cop_ccp); |
| 376 | #endif |
| 377 | } |
| 378 | |
Mingkai Hu | 172081c | 2016-02-02 11:28:03 +0800 | [diff] [blame] | 379 | /* |
| 380 | * This erratum requires setting a value to eddrtqcr1 to optimal |
| 381 | * the DDR performance. The eddrtqcr1 register is in SCFG space |
| 382 | * of LS1043A and the offset is 0x157_020c. |
| 383 | */ |
| 384 | #if defined(CONFIG_SYS_FSL_ERRATUM_A009660) \ |
| 385 | && defined(CONFIG_SYS_FSL_ERRATUM_A008514) |
| 386 | #error A009660 and A008514 can not be both enabled. |
| 387 | #endif |
| 388 | |
| 389 | static void erratum_a009660(void) |
| 390 | { |
| 391 | #ifdef CONFIG_SYS_FSL_ERRATUM_A009660 |
| 392 | u32 *eddrtqcr1 = (void *)CONFIG_SYS_FSL_SCFG_ADDR + 0x20c; |
| 393 | out_be32(eddrtqcr1, 0x63b20042); |
| 394 | #endif |
| 395 | } |
| 396 | |
Shengzhou Liu | ddf060b | 2016-04-07 16:22:21 +0800 | [diff] [blame] | 397 | static void erratum_a008850_early(void) |
| 398 | { |
| 399 | #ifdef CONFIG_SYS_FSL_ERRATUM_A008850 |
| 400 | /* part 1 of 2 */ |
Ashish Kumar | 1123406 | 2017-08-11 11:09:14 +0530 | [diff] [blame] | 401 | struct ccsr_cci400 __iomem *cci = (void *)(CONFIG_SYS_IMMR + |
| 402 | CONFIG_SYS_CCI400_OFFSET); |
Shengzhou Liu | ddf060b | 2016-04-07 16:22:21 +0800 | [diff] [blame] | 403 | struct ccsr_ddr __iomem *ddr = (void *)CONFIG_SYS_FSL_DDR_ADDR; |
| 404 | |
York Sun | e6b871e | 2017-05-15 08:51:59 -0700 | [diff] [blame] | 405 | /* Skip if running at lower exception level */ |
| 406 | if (current_el() < 3) |
| 407 | return; |
| 408 | |
Shengzhou Liu | ddf060b | 2016-04-07 16:22:21 +0800 | [diff] [blame] | 409 | /* disables propagation of barrier transactions to DDRC from CCI400 */ |
| 410 | out_le32(&cci->ctrl_ord, CCI400_CTRLORD_TERM_BARRIER); |
| 411 | |
| 412 | /* disable the re-ordering in DDRC */ |
| 413 | ddr_out32(&ddr->eor, DDR_EOR_RD_REOD_DIS | DDR_EOR_WD_REOD_DIS); |
| 414 | #endif |
| 415 | } |
| 416 | |
| 417 | void erratum_a008850_post(void) |
| 418 | { |
| 419 | #ifdef CONFIG_SYS_FSL_ERRATUM_A008850 |
| 420 | /* part 2 of 2 */ |
Ashish Kumar | 1123406 | 2017-08-11 11:09:14 +0530 | [diff] [blame] | 421 | struct ccsr_cci400 __iomem *cci = (void *)(CONFIG_SYS_IMMR + |
| 422 | CONFIG_SYS_CCI400_OFFSET); |
Shengzhou Liu | ddf060b | 2016-04-07 16:22:21 +0800 | [diff] [blame] | 423 | struct ccsr_ddr __iomem *ddr = (void *)CONFIG_SYS_FSL_DDR_ADDR; |
| 424 | u32 tmp; |
| 425 | |
York Sun | e6b871e | 2017-05-15 08:51:59 -0700 | [diff] [blame] | 426 | /* Skip if running at lower exception level */ |
| 427 | if (current_el() < 3) |
| 428 | return; |
| 429 | |
Shengzhou Liu | ddf060b | 2016-04-07 16:22:21 +0800 | [diff] [blame] | 430 | /* enable propagation of barrier transactions to DDRC from CCI400 */ |
| 431 | out_le32(&cci->ctrl_ord, CCI400_CTRLORD_EN_BARRIER); |
| 432 | |
| 433 | /* enable the re-ordering in DDRC */ |
| 434 | tmp = ddr_in32(&ddr->eor); |
| 435 | tmp &= ~(DDR_EOR_RD_REOD_DIS | DDR_EOR_WD_REOD_DIS); |
| 436 | ddr_out32(&ddr->eor, tmp); |
| 437 | #endif |
| 438 | } |
Hou Zhiqiang | 4b23ca8 | 2016-08-02 19:03:27 +0800 | [diff] [blame] | 439 | |
| 440 | #ifdef CONFIG_SYS_FSL_ERRATUM_A010315 |
| 441 | void erratum_a010315(void) |
| 442 | { |
| 443 | int i; |
| 444 | |
| 445 | for (i = PCIE1; i <= PCIE4; i++) |
| 446 | if (!is_serdes_configured(i)) { |
| 447 | debug("PCIe%d: disabled all R/W permission!\n", i); |
| 448 | set_pcie_ns_access(i, 0); |
| 449 | } |
| 450 | } |
| 451 | #endif |
Shengzhou Liu | ddf060b | 2016-04-07 16:22:21 +0800 | [diff] [blame] | 452 | |
Hou Zhiqiang | c06b30a | 2016-09-29 12:42:44 +0800 | [diff] [blame] | 453 | static void erratum_a010539(void) |
| 454 | { |
| 455 | #if defined(CONFIG_SYS_FSL_ERRATUM_A010539) && defined(CONFIG_QSPI_BOOT) |
| 456 | struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR); |
| 457 | u32 porsr1; |
| 458 | |
| 459 | porsr1 = in_be32(&gur->porsr1); |
| 460 | porsr1 &= ~FSL_CHASSIS2_CCSR_PORSR1_RCW_MASK; |
| 461 | out_be32((void *)(CONFIG_SYS_DCSR_DCFG_ADDR + DCFG_DCSR_PORCR1), |
| 462 | porsr1); |
| 463 | #endif |
| 464 | } |
| 465 | |
Hou Zhiqiang | 4ad5999 | 2016-12-09 16:09:00 +0800 | [diff] [blame] | 466 | /* Get VDD in the unit mV from voltage ID */ |
| 467 | int get_core_volt_from_fuse(void) |
| 468 | { |
| 469 | struct ccsr_gur *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR); |
| 470 | int vdd; |
| 471 | u32 fusesr; |
| 472 | u8 vid; |
| 473 | |
| 474 | fusesr = in_be32(&gur->dcfg_fusesr); |
| 475 | debug("%s: fusesr = 0x%x\n", __func__, fusesr); |
| 476 | vid = (fusesr >> FSL_CHASSIS2_DCFG_FUSESR_ALTVID_SHIFT) & |
| 477 | FSL_CHASSIS2_DCFG_FUSESR_ALTVID_MASK; |
| 478 | if ((vid == 0) || (vid == FSL_CHASSIS2_DCFG_FUSESR_ALTVID_MASK)) { |
| 479 | vid = (fusesr >> FSL_CHASSIS2_DCFG_FUSESR_VID_SHIFT) & |
| 480 | FSL_CHASSIS2_DCFG_FUSESR_VID_MASK; |
| 481 | } |
| 482 | debug("%s: VID = 0x%x\n", __func__, vid); |
| 483 | switch (vid) { |
| 484 | case 0x00: /* VID isn't supported */ |
| 485 | vdd = -EINVAL; |
| 486 | debug("%s: The VID feature is not supported\n", __func__); |
| 487 | break; |
| 488 | case 0x08: /* 0.9V silicon */ |
| 489 | vdd = 900; |
| 490 | break; |
| 491 | case 0x10: /* 1.0V silicon */ |
| 492 | vdd = 1000; |
| 493 | break; |
| 494 | default: /* Other core voltage */ |
| 495 | vdd = -EINVAL; |
| 496 | printf("%s: The VID(%x) isn't supported\n", __func__, vid); |
| 497 | break; |
| 498 | } |
| 499 | debug("%s: The required minimum volt of CORE is %dmV\n", __func__, vdd); |
| 500 | |
| 501 | return vdd; |
| 502 | } |
| 503 | |
| 504 | __weak int board_switch_core_volt(u32 vdd) |
| 505 | { |
| 506 | return 0; |
| 507 | } |
| 508 | |
| 509 | static int setup_core_volt(u32 vdd) |
| 510 | { |
| 511 | return board_setup_core_volt(vdd); |
| 512 | } |
| 513 | |
| 514 | #ifdef CONFIG_SYS_FSL_DDR |
| 515 | static void ddr_enable_0v9_volt(bool en) |
| 516 | { |
| 517 | struct ccsr_ddr __iomem *ddr = (void *)CONFIG_SYS_FSL_DDR_ADDR; |
| 518 | u32 tmp; |
| 519 | |
| 520 | tmp = ddr_in32(&ddr->ddr_cdr1); |
| 521 | |
| 522 | if (en) |
| 523 | tmp |= DDR_CDR1_V0PT9_EN; |
| 524 | else |
| 525 | tmp &= ~DDR_CDR1_V0PT9_EN; |
| 526 | |
| 527 | ddr_out32(&ddr->ddr_cdr1, tmp); |
| 528 | } |
| 529 | #endif |
| 530 | |
| 531 | int setup_chip_volt(void) |
| 532 | { |
| 533 | int vdd; |
| 534 | |
| 535 | vdd = get_core_volt_from_fuse(); |
| 536 | /* Nothing to do for silicons doesn't support VID */ |
| 537 | if (vdd < 0) |
| 538 | return vdd; |
| 539 | |
| 540 | if (setup_core_volt(vdd)) |
| 541 | printf("%s: Switch core VDD to %dmV failed\n", __func__, vdd); |
| 542 | #ifdef CONFIG_SYS_HAS_SERDES |
| 543 | if (setup_serdes_volt(vdd)) |
| 544 | printf("%s: Switch SVDD to %dmV failed\n", __func__, vdd); |
| 545 | #endif |
| 546 | |
| 547 | #ifdef CONFIG_SYS_FSL_DDR |
| 548 | if (vdd == 900) |
| 549 | ddr_enable_0v9_volt(true); |
| 550 | #endif |
| 551 | |
| 552 | return 0; |
| 553 | } |
| 554 | |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 555 | void fsl_lsch2_early_init_f(void) |
| 556 | { |
Ashish Kumar | 1123406 | 2017-08-11 11:09:14 +0530 | [diff] [blame] | 557 | struct ccsr_cci400 *cci = (struct ccsr_cci400 *)(CONFIG_SYS_IMMR + |
| 558 | CONFIG_SYS_CCI400_OFFSET); |
Aneesh Bansal | 13d984d | 2015-12-08 13:54:27 +0530 | [diff] [blame] | 559 | struct ccsr_scfg *scfg = (struct ccsr_scfg *)CONFIG_SYS_FSL_SCFG_ADDR; |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 560 | |
Hou Zhiqiang | 5ac9a5c | 2016-08-02 19:03:23 +0800 | [diff] [blame] | 561 | #ifdef CONFIG_LAYERSCAPE_NS_ACCESS |
| 562 | enable_layerscape_ns_access(); |
| 563 | #endif |
| 564 | |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 565 | #ifdef CONFIG_FSL_IFC |
| 566 | init_early_memctl_regs(); /* tighten IFC timing */ |
| 567 | #endif |
| 568 | |
Qianyu Gong | 5ab2d0a | 2016-03-16 18:01:52 +0800 | [diff] [blame] | 569 | #if defined(CONFIG_FSL_QSPI) && !defined(CONFIG_QSPI_BOOT) |
Gong Qianyu | 760df89 | 2016-01-25 15:16:06 +0800 | [diff] [blame] | 570 | out_be32(&scfg->qspi_cfg, SCFG_QSPI_CLKSEL); |
| 571 | #endif |
Aneesh Bansal | 13d984d | 2015-12-08 13:54:27 +0530 | [diff] [blame] | 572 | /* Make SEC reads and writes snoopable */ |
| 573 | setbits_be32(&scfg->snpcnfgcr, SCFG_SNPCNFGCR_SECRDSNP | |
Tang Yuantian | 2945ae0 | 2016-08-08 15:07:20 +0800 | [diff] [blame] | 574 | SCFG_SNPCNFGCR_SECWRSNP | |
| 575 | SCFG_SNPCNFGCR_SATARDSNP | |
| 576 | SCFG_SNPCNFGCR_SATAWRSNP); |
Aneesh Bansal | 13d984d | 2015-12-08 13:54:27 +0530 | [diff] [blame] | 577 | |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 578 | /* |
| 579 | * Enable snoop requests and DVM message requests for |
| 580 | * Slave insterface S4 (A53 core cluster) |
| 581 | */ |
York Sun | e6b871e | 2017-05-15 08:51:59 -0700 | [diff] [blame] | 582 | if (current_el() == 3) { |
| 583 | out_le32(&cci->slave[4].snoop_ctrl, |
| 584 | CCI400_DVM_MESSAGE_REQ_EN | CCI400_SNOOP_REQ_EN); |
| 585 | } |
Mingkai Hu | 8beb075 | 2015-12-07 16:58:54 +0800 | [diff] [blame] | 586 | |
| 587 | /* Erratum */ |
Shengzhou Liu | ddf060b | 2016-04-07 16:22:21 +0800 | [diff] [blame] | 588 | erratum_a008850_early(); /* part 1 of 2 */ |
Mingkai Hu | 8beb075 | 2015-12-07 16:58:54 +0800 | [diff] [blame] | 589 | erratum_a009929(); |
Mingkai Hu | 172081c | 2016-02-02 11:28:03 +0800 | [diff] [blame] | 590 | erratum_a009660(); |
Hou Zhiqiang | c06b30a | 2016-09-29 12:42:44 +0800 | [diff] [blame] | 591 | erratum_a010539(); |
Ran Wang | b358b7b | 2017-09-04 18:46:48 +0800 | [diff] [blame] | 592 | erratum_a009008(); |
Ran Wang | 9e8fabc | 2017-09-04 18:46:49 +0800 | [diff] [blame] | 593 | erratum_a009798(); |
Ran Wang | e64f747 | 2017-09-04 18:46:50 +0800 | [diff] [blame] | 594 | erratum_a008997(); |
Ran Wang | 3ba6948 | 2017-09-04 18:46:51 +0800 | [diff] [blame] | 595 | erratum_a009007(); |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 596 | } |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 597 | #endif |
Scott Wood | 8e728cd | 2015-03-24 13:25:02 -0700 | [diff] [blame] | 598 | |
Yuan Yao | 52ae4fd | 2016-12-01 10:13:52 +0800 | [diff] [blame] | 599 | #ifdef CONFIG_QSPI_AHB_INIT |
| 600 | /* Enable 4bytes address support and fast read */ |
| 601 | int qspi_ahb_init(void) |
| 602 | { |
| 603 | u32 *qspi_lut, lut_key, *qspi_key; |
| 604 | |
| 605 | qspi_key = (void *)SYS_FSL_QSPI_ADDR + 0x300; |
| 606 | qspi_lut = (void *)SYS_FSL_QSPI_ADDR + 0x310; |
| 607 | |
| 608 | lut_key = in_be32(qspi_key); |
| 609 | |
| 610 | if (lut_key == 0x5af05af0) { |
| 611 | /* That means the register is BE */ |
| 612 | out_be32(qspi_key, 0x5af05af0); |
| 613 | /* Unlock the lut table */ |
| 614 | out_be32(qspi_key + 1, 0x00000002); |
| 615 | out_be32(qspi_lut, 0x0820040c); |
| 616 | out_be32(qspi_lut + 1, 0x1c080c08); |
| 617 | out_be32(qspi_lut + 2, 0x00002400); |
| 618 | /* Lock the lut table */ |
| 619 | out_be32(qspi_key, 0x5af05af0); |
| 620 | out_be32(qspi_key + 1, 0x00000001); |
| 621 | } else { |
| 622 | /* That means the register is LE */ |
| 623 | out_le32(qspi_key, 0x5af05af0); |
| 624 | /* Unlock the lut table */ |
| 625 | out_le32(qspi_key + 1, 0x00000002); |
| 626 | out_le32(qspi_lut, 0x0820040c); |
| 627 | out_le32(qspi_lut + 1, 0x1c080c08); |
| 628 | out_le32(qspi_lut + 2, 0x00002400); |
| 629 | /* Lock the lut table */ |
| 630 | out_le32(qspi_key, 0x5af05af0); |
| 631 | out_le32(qspi_key + 1, 0x00000001); |
| 632 | } |
| 633 | |
| 634 | return 0; |
| 635 | } |
| 636 | #endif |
| 637 | |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 638 | #ifdef CONFIG_BOARD_LATE_INIT |
| 639 | int board_late_init(void) |
Scott Wood | 8e728cd | 2015-03-24 13:25:02 -0700 | [diff] [blame] | 640 | { |
Tang Yuantian | 57894be | 2015-12-09 15:32:18 +0800 | [diff] [blame] | 641 | #ifdef CONFIG_SCSI_AHCI_PLAT |
| 642 | sata_init(); |
| 643 | #endif |
Aneesh Bansal | 39d5b3b | 2016-01-22 16:37:26 +0530 | [diff] [blame] | 644 | #ifdef CONFIG_CHAIN_OF_TRUST |
| 645 | fsl_setenv_chain_of_trust(); |
| 646 | #endif |
Yuan Yao | 52ae4fd | 2016-12-01 10:13:52 +0800 | [diff] [blame] | 647 | #ifdef CONFIG_QSPI_AHB_INIT |
| 648 | qspi_ahb_init(); |
| 649 | #endif |
Tang Yuantian | 57894be | 2015-12-09 15:32:18 +0800 | [diff] [blame] | 650 | |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 651 | return 0; |
Scott Wood | 8e728cd | 2015-03-24 13:25:02 -0700 | [diff] [blame] | 652 | } |
| 653 | #endif |