Channagoud Kadabi | 634ac6d | 2012-12-12 18:13:56 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. |
Deepa Dinamani | ca5ad85 | 2012-05-07 18:19:47 -0700 | [diff] [blame] | 2 | * |
| 3 | * Redistribution and use in source and binary forms, with or without |
Deepa Dinamani | 32bfad0 | 2012-11-02 12:15:05 -0700 | [diff] [blame] | 4 | * modification, are permitted provided that the following conditions are |
| 5 | * met: |
| 6 | * * Redistributions of source code must retain the above copyright |
| 7 | * notice, this list of conditions and the following disclaimer. |
| 8 | * * Redistributions in binary form must reproduce the above |
| 9 | * copyright notice, this list of conditions and the following |
| 10 | * disclaimer in the documentation and/or other materials provided |
| 11 | * with the distribution. |
| 12 | * * Neither the name of The Linux Foundation nor the names of its |
| 13 | * contributors may be used to endorse or promote products derived |
| 14 | * from this software without specific prior written permission. |
Deepa Dinamani | ca5ad85 | 2012-05-07 18:19:47 -0700 | [diff] [blame] | 15 | * |
Deepa Dinamani | 32bfad0 | 2012-11-02 12:15:05 -0700 | [diff] [blame] | 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED |
| 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT |
| 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS |
| 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Deepa Dinamani | ca5ad85 | 2012-05-07 18:19:47 -0700 | [diff] [blame] | 27 | */ |
| 28 | |
Amol Jadi | 29f9503 | 2012-06-22 12:52:54 -0700 | [diff] [blame] | 29 | #include <err.h> |
| 30 | #include <assert.h> |
Deepa Dinamani | ca5ad85 | 2012-05-07 18:19:47 -0700 | [diff] [blame] | 31 | #include <debug.h> |
| 32 | #include <reg.h> |
Deepa Dinamani | 32bfad0 | 2012-11-02 12:15:05 -0700 | [diff] [blame] | 33 | #include <platform/timer.h> |
Deepa Dinamani | ca5ad85 | 2012-05-07 18:19:47 -0700 | [diff] [blame] | 34 | #include <platform/iomap.h> |
Deepa Dinamani | ca5ad85 | 2012-05-07 18:19:47 -0700 | [diff] [blame] | 35 | #include <mmc.h> |
Amol Jadi | 29f9503 | 2012-06-22 12:52:54 -0700 | [diff] [blame] | 36 | #include <clock.h> |
| 37 | #include <platform/clock.h> |
Channagoud Kadabi | 634ac6d | 2012-12-12 18:13:56 -0800 | [diff] [blame] | 38 | #include <blsp_qup.h> |
Deepa Dinamani | ca5ad85 | 2012-05-07 18:19:47 -0700 | [diff] [blame] | 39 | |
Amol Jadi | 29f9503 | 2012-06-22 12:52:54 -0700 | [diff] [blame] | 40 | void hsusb_clock_init(void) |
| 41 | { |
| 42 | int ret; |
Deepa Dinamani | 0687ecd | 2012-08-10 16:00:26 -0700 | [diff] [blame] | 43 | struct clk *iclk, *cclk; |
Amol Jadi | 29f9503 | 2012-06-22 12:52:54 -0700 | [diff] [blame] | 44 | |
| 45 | ret = clk_get_set_enable("usb_iface_clk", 0, 1); |
| 46 | if(ret) |
| 47 | { |
| 48 | dprintf(CRITICAL, "failed to set usb_iface_clk ret = %d\n", ret); |
| 49 | ASSERT(0); |
| 50 | } |
| 51 | |
| 52 | ret = clk_get_set_enable("usb_core_clk", 75000000, 1); |
| 53 | if(ret) |
| 54 | { |
| 55 | dprintf(CRITICAL, "failed to set usb_core_clk ret = %d\n", ret); |
| 56 | ASSERT(0); |
| 57 | } |
Deepa Dinamani | 0687ecd | 2012-08-10 16:00:26 -0700 | [diff] [blame] | 58 | |
| 59 | mdelay(20); |
| 60 | |
| 61 | iclk = clk_get("usb_iface_clk"); |
| 62 | cclk = clk_get("usb_core_clk"); |
| 63 | |
| 64 | /* Disable USB all clock init */ |
| 65 | writel(0, USB_BOOT_CLOCK_CTL); |
| 66 | |
| 67 | clk_disable(iclk); |
| 68 | clk_disable(cclk); |
| 69 | |
| 70 | mdelay(20); |
| 71 | |
| 72 | /* Start the block reset for usb */ |
| 73 | writel(1, USB_HS_BCR); |
| 74 | |
| 75 | mdelay(20); |
| 76 | |
| 77 | /* Take usb block out of reset */ |
Deepa Dinamani | 32bfad0 | 2012-11-02 12:15:05 -0700 | [diff] [blame] | 78 | writel(0, USB_HS_BCR); |
Deepa Dinamani | 0687ecd | 2012-08-10 16:00:26 -0700 | [diff] [blame] | 79 | |
| 80 | mdelay(20); |
| 81 | |
| 82 | ret = clk_enable(iclk); |
Deepa Dinamani | 32bfad0 | 2012-11-02 12:15:05 -0700 | [diff] [blame] | 83 | |
Deepa Dinamani | 0687ecd | 2012-08-10 16:00:26 -0700 | [diff] [blame] | 84 | if(ret) |
| 85 | { |
| 86 | dprintf(CRITICAL, "failed to set usb_iface_clk after async ret = %d\n", ret); |
| 87 | ASSERT(0); |
| 88 | } |
| 89 | |
| 90 | ret = clk_enable(cclk); |
| 91 | |
| 92 | if(ret) |
| 93 | { |
| 94 | dprintf(CRITICAL, "failed to set usb_iface_clk after async ret = %d\n", ret); |
| 95 | ASSERT(0); |
| 96 | } |
| 97 | |
Amol Jadi | 29f9503 | 2012-06-22 12:52:54 -0700 | [diff] [blame] | 98 | } |
Deepa Dinamani | ca5ad85 | 2012-05-07 18:19:47 -0700 | [diff] [blame] | 99 | |
| 100 | void clock_init_mmc(uint32_t interface) |
| 101 | { |
Deepa Dinamani | b10c0e4 | 2012-08-10 14:36:24 -0700 | [diff] [blame] | 102 | char clk_name[64]; |
Amol Jadi | 29f9503 | 2012-06-22 12:52:54 -0700 | [diff] [blame] | 103 | int ret; |
| 104 | |
Deepa Dinamani | b10c0e4 | 2012-08-10 14:36:24 -0700 | [diff] [blame] | 105 | snprintf(clk_name, 64, "sdc%u_iface_clk", interface); |
| 106 | |
Amol Jadi | 29f9503 | 2012-06-22 12:52:54 -0700 | [diff] [blame] | 107 | /* enable interface clock */ |
Deepa Dinamani | b10c0e4 | 2012-08-10 14:36:24 -0700 | [diff] [blame] | 108 | ret = clk_get_set_enable(clk_name, 0, 1); |
Amol Jadi | 29f9503 | 2012-06-22 12:52:54 -0700 | [diff] [blame] | 109 | if(ret) |
| 110 | { |
| 111 | dprintf(CRITICAL, "failed to set sdc1_iface_clk ret = %d\n", ret); |
| 112 | ASSERT(0); |
| 113 | } |
Deepa Dinamani | ca5ad85 | 2012-05-07 18:19:47 -0700 | [diff] [blame] | 114 | } |
| 115 | |
| 116 | /* Configure MMC clock */ |
| 117 | void clock_config_mmc(uint32_t interface, uint32_t freq) |
| 118 | { |
Amol Jadi | 29f9503 | 2012-06-22 12:52:54 -0700 | [diff] [blame] | 119 | int ret; |
Deepa Dinamani | ca5ad85 | 2012-05-07 18:19:47 -0700 | [diff] [blame] | 120 | uint32_t reg; |
Deepa Dinamani | b10c0e4 | 2012-08-10 14:36:24 -0700 | [diff] [blame] | 121 | char clk_name[64]; |
| 122 | |
| 123 | snprintf(clk_name, 64, "sdc%u_core_clk", interface); |
Deepa Dinamani | ca5ad85 | 2012-05-07 18:19:47 -0700 | [diff] [blame] | 124 | |
Channagoud Kadabi | 9651841 | 2013-03-14 16:38:41 -0700 | [diff] [blame] | 125 | /* Disalbe MCI_CLK before changing the sdcc clock */ |
| 126 | mmc_boot_mci_clk_disable(); |
| 127 | |
Amol Jadi | 29f9503 | 2012-06-22 12:52:54 -0700 | [diff] [blame] | 128 | if(freq == MMC_CLK_400KHZ) |
| 129 | { |
Deepa Dinamani | b10c0e4 | 2012-08-10 14:36:24 -0700 | [diff] [blame] | 130 | ret = clk_get_set_enable(clk_name, 400000, 1); |
Amol Jadi | 29f9503 | 2012-06-22 12:52:54 -0700 | [diff] [blame] | 131 | } |
| 132 | else if(freq == MMC_CLK_50MHZ) |
| 133 | { |
Neeti Desai | ddc771b | 2012-08-28 18:17:04 -0700 | [diff] [blame] | 134 | ret = clk_get_set_enable(clk_name, 50000000, 1); |
Amol Jadi | 29f9503 | 2012-06-22 12:52:54 -0700 | [diff] [blame] | 135 | } |
| 136 | else |
| 137 | { |
| 138 | dprintf(CRITICAL, "sdc frequency (%d) is not supported\n", freq); |
| 139 | ASSERT(0); |
| 140 | } |
| 141 | |
| 142 | |
| 143 | if(ret) |
| 144 | { |
| 145 | dprintf(CRITICAL, "failed to set sdc1_core_clk ret = %d\n", ret); |
| 146 | ASSERT(0); |
| 147 | } |
Deepa Dinamani | ca5ad85 | 2012-05-07 18:19:47 -0700 | [diff] [blame] | 148 | |
Channagoud Kadabi | 9651841 | 2013-03-14 16:38:41 -0700 | [diff] [blame] | 149 | /* Enalbe MCI clock */ |
| 150 | mmc_boot_mci_clk_enable(); |
Deepa Dinamani | ca5ad85 | 2012-05-07 18:19:47 -0700 | [diff] [blame] | 151 | } |
| 152 | |
Deepa Dinamani | 26e9326 | 2012-05-21 17:35:14 -0700 | [diff] [blame] | 153 | /* Configure UART clock based on the UART block id*/ |
| 154 | void clock_config_uart_dm(uint8_t id) |
| 155 | { |
Amol Jadi | 29f9503 | 2012-06-22 12:52:54 -0700 | [diff] [blame] | 156 | int ret; |
Deepa Dinamani | 26e9326 | 2012-05-21 17:35:14 -0700 | [diff] [blame] | 157 | |
Neeti Desai | ac01127 | 2012-08-29 18:24:54 -0700 | [diff] [blame] | 158 | |
| 159 | ret = clk_get_set_enable("uart2_iface_clk", 0, 1); |
| 160 | if(ret) |
| 161 | { |
| 162 | dprintf(CRITICAL, "failed to set uart2_iface_clk ret = %d\n", ret); |
| 163 | ASSERT(0); |
| 164 | } |
| 165 | |
| 166 | ret = clk_get_set_enable("uart2_core_clk", 7372800, 1); |
Amol Jadi | 29f9503 | 2012-06-22 12:52:54 -0700 | [diff] [blame] | 167 | if(ret) |
| 168 | { |
| 169 | dprintf(CRITICAL, "failed to set uart1_core_clk ret = %d\n", ret); |
| 170 | ASSERT(0); |
| 171 | } |
Deepa Dinamani | 26e9326 | 2012-05-21 17:35:14 -0700 | [diff] [blame] | 172 | } |
Deepa Dinamani | 32bfad0 | 2012-11-02 12:15:05 -0700 | [diff] [blame] | 173 | |
| 174 | /* Function to asynchronously reset CE. |
| 175 | * Function assumes that all the CE clocks are off. |
| 176 | */ |
| 177 | static void ce_async_reset(uint8_t instance) |
| 178 | { |
| 179 | if (instance == 1) |
| 180 | { |
| 181 | /* TODO: Add support for instance 1. */ |
| 182 | dprintf(CRITICAL, "CE instance not supported instance = %d", instance); |
| 183 | ASSERT(0); |
| 184 | } |
| 185 | else if (instance == 2) |
| 186 | { |
| 187 | /* Start the block reset for CE */ |
| 188 | writel(1, GCC_CE2_BCR); |
| 189 | |
| 190 | udelay(2); |
| 191 | |
| 192 | /* Take CE block out of reset */ |
| 193 | writel(0, GCC_CE2_BCR); |
| 194 | |
| 195 | udelay(2); |
| 196 | } |
| 197 | else |
| 198 | { |
| 199 | dprintf(CRITICAL, "CE instance not supported instance = %d", instance); |
| 200 | ASSERT(0); |
| 201 | } |
| 202 | } |
| 203 | |
sundarajan srinivasan | 6aaa50c | 2013-02-27 14:18:57 -0800 | [diff] [blame] | 204 | void clock_ce_enable(uint8_t instance) |
Deepa Dinamani | 32bfad0 | 2012-11-02 12:15:05 -0700 | [diff] [blame] | 205 | { |
| 206 | int ret; |
| 207 | char clk_name[64]; |
| 208 | |
| 209 | snprintf(clk_name, 64, "ce%u_src_clk", instance); |
| 210 | ret = clk_get_set_enable(clk_name, 100000000, 1); |
| 211 | if(ret) |
| 212 | { |
| 213 | dprintf(CRITICAL, "failed to set ce_src_clk ret = %d\n", ret); |
| 214 | ASSERT(0); |
| 215 | } |
| 216 | |
| 217 | snprintf(clk_name, 64, "ce%u_core_clk", instance); |
| 218 | ret = clk_get_set_enable(clk_name, 0, 1); |
| 219 | if(ret) |
| 220 | { |
| 221 | dprintf(CRITICAL, "failed to set ce_core_clk ret = %d\n", ret); |
| 222 | ASSERT(0); |
| 223 | } |
| 224 | |
| 225 | snprintf(clk_name, 64, "ce%u_ahb_clk", instance); |
| 226 | ret = clk_get_set_enable(clk_name, 0, 1); |
| 227 | if(ret) |
| 228 | { |
| 229 | dprintf(CRITICAL, "failed to set ce_ahb_clk ret = %d\n", ret); |
| 230 | ASSERT(0); |
| 231 | } |
| 232 | |
| 233 | snprintf(clk_name, 64, "ce%u_axi_clk", instance); |
| 234 | ret = clk_get_set_enable(clk_name, 0, 1); |
| 235 | if(ret) |
| 236 | { |
| 237 | dprintf(CRITICAL, "failed to set ce_axi_clk ret = %d\n", ret); |
| 238 | ASSERT(0); |
| 239 | } |
| 240 | |
| 241 | /* Wait for 48 * #pipes cycles. |
| 242 | * This is necessary as immediately after an access control reset (boot up) |
| 243 | * or a debug re-enable, the Crypto core sequentially clears its internal |
| 244 | * pipe key storage memory. If pipe key initialization writes are attempted |
| 245 | * during this time, they may be overwritten by the internal clearing logic. |
| 246 | */ |
| 247 | udelay(1); |
| 248 | } |
| 249 | |
sundarajan srinivasan | 6aaa50c | 2013-02-27 14:18:57 -0800 | [diff] [blame] | 250 | void clock_ce_disable(uint8_t instance) |
Deepa Dinamani | 32bfad0 | 2012-11-02 12:15:05 -0700 | [diff] [blame] | 251 | { |
| 252 | struct clk *ahb_clk; |
| 253 | struct clk *cclk; |
| 254 | struct clk *axi_clk; |
| 255 | struct clk *src_clk; |
| 256 | char clk_name[64]; |
| 257 | |
| 258 | snprintf(clk_name, 64, "ce%u_src_clk", instance); |
| 259 | src_clk = clk_get(clk_name); |
| 260 | |
| 261 | snprintf(clk_name, 64, "ce%u_ahb_clk", instance); |
| 262 | ahb_clk = clk_get(clk_name); |
| 263 | |
| 264 | snprintf(clk_name, 64, "ce%u_axi_clk", instance); |
| 265 | axi_clk = clk_get(clk_name); |
| 266 | |
| 267 | snprintf(clk_name, 64, "ce%u_core_clk", instance); |
| 268 | cclk = clk_get(clk_name); |
| 269 | |
| 270 | clk_disable(ahb_clk); |
| 271 | clk_disable(axi_clk); |
| 272 | clk_disable(cclk); |
| 273 | clk_disable(src_clk); |
| 274 | |
| 275 | /* Some delay for the clocks to stabalize. */ |
| 276 | udelay(1); |
| 277 | } |
| 278 | |
| 279 | void clock_config_ce(uint8_t instance) |
| 280 | { |
| 281 | /* Need to enable the clock before disabling since the clk_disable() |
| 282 | * has a check to default to nop when the clk_enable() is not called |
| 283 | * on that particular clock. |
| 284 | */ |
| 285 | clock_ce_enable(instance); |
| 286 | |
| 287 | clock_ce_disable(instance); |
| 288 | |
| 289 | ce_async_reset(instance); |
| 290 | |
| 291 | clock_ce_enable(instance); |
sundarajan srinivasan | 6aaa50c | 2013-02-27 14:18:57 -0800 | [diff] [blame] | 292 | |
Deepa Dinamani | 32bfad0 | 2012-11-02 12:15:05 -0700 | [diff] [blame] | 293 | } |
Channagoud Kadabi | 634ac6d | 2012-12-12 18:13:56 -0800 | [diff] [blame] | 294 | |
| 295 | void clock_config_blsp_i2c(uint8_t blsp_id, uint8_t qup_id) |
| 296 | { |
| 297 | uint8_t ret = 0; |
| 298 | char clk_name[64]; |
| 299 | |
| 300 | struct clk *qup_clk; |
| 301 | |
| 302 | snprintf(clk_name, 64, "blsp%u_ahb_clk", blsp_id); |
| 303 | |
| 304 | ret = clk_get_set_enable(clk_name, 0 , 1); |
| 305 | |
| 306 | if (ret) { |
| 307 | dprintf(CRITICAL, "Failed to enable %s clock\n", clk_name); |
| 308 | return; |
| 309 | } |
| 310 | |
| 311 | snprintf(clk_name, 64, "blsp%u_qup%u_i2c_apps_clk", blsp_id, |
| 312 | (qup_id + 1)); |
| 313 | |
| 314 | qup_clk = clk_get(clk_name); |
| 315 | |
| 316 | if (!qup_clk) { |
| 317 | dprintf(CRITICAL, "Failed to get %s\n", clk_name); |
| 318 | return; |
| 319 | } |
| 320 | |
| 321 | ret = clk_enable(qup_clk); |
| 322 | |
| 323 | if (ret) { |
| 324 | dprintf(CRITICAL, "Failed to enable %s\n", clk_name); |
| 325 | return; |
| 326 | } |
| 327 | } |
Siddhartha Agrawal | acdaf5b | 2013-01-22 18:14:53 -0800 | [diff] [blame] | 328 | |
| 329 | void mdp_gdsc_ctrl(uint8_t enable) |
| 330 | { |
| 331 | uint32_t reg = 0; |
| 332 | reg = readl(MDP_GDSCR); |
| 333 | if (enable) { |
Siddhartha Agrawal | 267fc3f | 2013-03-25 17:03:50 -0700 | [diff] [blame^] | 334 | if (reg & 0x1) { |
| 335 | reg &= ~(BIT(0) | GDSC_EN_FEW_WAIT_MASK); |
| 336 | reg |= GDSC_EN_FEW_WAIT_256_MASK; |
| 337 | writel(reg, MDP_GDSCR); |
| 338 | } |
Siddhartha Agrawal | acdaf5b | 2013-01-22 18:14:53 -0800 | [diff] [blame] | 339 | |
| 340 | while(readl(MDP_GDSCR) & ((GDSC_POWER_ON_BIT) | (GDSC_POWER_ON_STATUS_BIT))); |
| 341 | } else |
| 342 | ASSERT(1); |
| 343 | } |
| 344 | |
| 345 | /* Configure MDP clock */ |
| 346 | void mdp_clock_init(void) |
| 347 | { |
| 348 | int ret; |
| 349 | |
| 350 | /* Set MDP clock to 200MHz */ |
| 351 | ret = clk_get_set_enable("mdp_ahb_clk", 0, 1); |
| 352 | if(ret) |
| 353 | { |
| 354 | dprintf(CRITICAL, "failed to set mdp_ahb_clk ret = %d\n", ret); |
| 355 | ASSERT(0); |
| 356 | } |
| 357 | |
| 358 | ret = clk_get_set_enable("mdss_mdp_clk_src", 75000000, 1); |
| 359 | if(ret) |
| 360 | { |
| 361 | dprintf(CRITICAL, "failed to set mdp_clk_src ret = %d\n", ret); |
| 362 | ASSERT(0); |
| 363 | } |
| 364 | |
| 365 | ret = clk_get_set_enable("mdss_mdp_clk", 0, 1); |
| 366 | if(ret) |
| 367 | { |
| 368 | dprintf(CRITICAL, "failed to set mdp_clk ret = %d\n", ret); |
| 369 | ASSERT(0); |
| 370 | } |
| 371 | |
| 372 | ret = clk_get_set_enable("mdss_mdp_lut_clk", 0, 1); |
| 373 | if(ret) |
| 374 | { |
| 375 | dprintf(CRITICAL, "failed to set lut_mdp clk ret = %d\n", ret); |
| 376 | ASSERT(0); |
| 377 | } |
| 378 | } |
| 379 | |
| 380 | /* Initialize all clocks needed by Display */ |
| 381 | void mmss_clock_init(void) |
| 382 | { |
| 383 | int ret; |
| 384 | |
| 385 | /* Configure Byte clock */ |
| 386 | writel(0x100, DSI_BYTE0_CFG_RCGR); |
| 387 | writel(0x1, DSI_BYTE0_CMD_RCGR); |
| 388 | writel(0x1, DSI_BYTE0_CBCR); |
| 389 | |
| 390 | /* Configure ESC clock */ |
| 391 | ret = clk_get_set_enable("mdss_esc0_clk", 0, 1); |
| 392 | if(ret) |
| 393 | { |
| 394 | dprintf(CRITICAL, "failed to set esc0_clk ret = %d\n", ret); |
| 395 | ASSERT(0); |
| 396 | } |
| 397 | |
| 398 | /* Configure MMSSNOC AXI clock */ |
| 399 | ret = clk_get_set_enable("mmss_mmssnoc_axi_clk", 100000000, 1); |
| 400 | if(ret) |
| 401 | { |
| 402 | dprintf(CRITICAL, "failed to set mmssnoc_axi_clk ret = %d\n", ret); |
| 403 | ASSERT(0); |
| 404 | } |
| 405 | |
| 406 | /* Configure MMSSNOC AXI clock */ |
| 407 | ret = clk_get_set_enable("mmss_s0_axi_clk", 100000000, 1); |
| 408 | if(ret) |
| 409 | { |
| 410 | dprintf(CRITICAL, "failed to set mmss_s0_axi_clk ret = %d\n", ret); |
| 411 | ASSERT(0); |
| 412 | } |
| 413 | |
| 414 | /* Configure AXI clock */ |
| 415 | ret = clk_get_set_enable("mdss_axi_clk", 100000000, 1); |
| 416 | if(ret) |
| 417 | { |
| 418 | dprintf(CRITICAL, "failed to set mdss_axi_clk ret = %d\n", ret); |
| 419 | ASSERT(0); |
| 420 | } |
| 421 | |
| 422 | /* Configure Pixel clock */ |
| 423 | writel(0x102, DSI_PIXEL0_CFG_RCGR); |
| 424 | writel(0x1, DSI_PIXEL0_CMD_RCGR); |
| 425 | writel(0x1, DSI_PIXEL0_CBCR); |
| 426 | } |