Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 1 | /* |
Matt Wagantall | 3bc2fe5 | 2013-01-15 13:34:55 -0800 | [diff] [blame] | 2 | * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 and |
| 6 | * only version 2 as published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | */ |
| 13 | |
| 14 | #include <linux/init.h> |
| 15 | #include <linux/module.h> |
| 16 | #include <linux/platform_device.h> |
| 17 | #include <linux/io.h> |
Matt Wagantall | b774799 | 2012-05-11 19:37:51 -0700 | [diff] [blame] | 18 | #include <linux/iopoll.h> |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 19 | #include <linux/err.h> |
| 20 | #include <linux/of.h> |
| 21 | #include <linux/clk.h> |
Matt Wagantall | 6c51598 | 2013-01-29 14:58:43 -0800 | [diff] [blame] | 22 | #include <linux/regulator/consumer.h> |
| 23 | #include <mach/rpm-regulator-smd.h> |
Matt Wagantall | d41ce77 | 2012-05-10 23:16:41 -0700 | [diff] [blame] | 24 | #include <mach/clk.h> |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 25 | #include "peripheral-loader.h" |
| 26 | #include "pil-q6v5.h" |
| 27 | |
Matt Wagantall | b774799 | 2012-05-11 19:37:51 -0700 | [diff] [blame] | 28 | /* QDSP6SS Register Offsets */ |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 29 | #define QDSP6SS_RESET 0x014 |
| 30 | #define QDSP6SS_GFMUX_CTL 0x020 |
| 31 | #define QDSP6SS_PWR_CTL 0x030 |
| 32 | |
Matt Wagantall | b774799 | 2012-05-11 19:37:51 -0700 | [diff] [blame] | 33 | /* AXI Halt Register Offsets */ |
| 34 | #define AXI_HALTREQ 0x0 |
| 35 | #define AXI_HALTACK 0x4 |
| 36 | #define AXI_IDLE 0x8 |
| 37 | |
| 38 | #define HALT_ACK_TIMEOUT_US 100000 |
| 39 | |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 40 | /* QDSP6SS_RESET */ |
Matt Wagantall | 11c07e2 | 2012-08-09 16:14:07 -0700 | [diff] [blame] | 41 | #define Q6SS_STOP_CORE BIT(0) |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 42 | #define Q6SS_CORE_ARES BIT(1) |
Matt Wagantall | 11c07e2 | 2012-08-09 16:14:07 -0700 | [diff] [blame] | 43 | #define Q6SS_BUS_ARES_ENA BIT(2) |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 44 | |
| 45 | /* QDSP6SS_GFMUX_CTL */ |
| 46 | #define Q6SS_CLK_ENA BIT(1) |
| 47 | |
| 48 | /* QDSP6SS_PWR_CTL */ |
Matt Wagantall | d4aaa15 | 2013-04-18 20:31:47 -0700 | [diff] [blame] | 49 | #define Q6SS_L2DATA_SLP_NRET_N_0 BIT(0) |
| 50 | #define Q6SS_L2DATA_SLP_NRET_N_1 BIT(1) |
| 51 | #define Q6SS_L2DATA_SLP_NRET_N_2 BIT(2) |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 52 | #define Q6SS_L2TAG_SLP_NRET_N BIT(16) |
| 53 | #define Q6SS_ETB_SLP_NRET_N BIT(17) |
| 54 | #define Q6SS_L2DATA_STBY_N BIT(18) |
| 55 | #define Q6SS_SLP_RET_N BIT(19) |
| 56 | #define Q6SS_CLAMP_IO BIT(20) |
| 57 | #define QDSS_BHS_ON BIT(21) |
Matt Wagantall | 3bc2fe5 | 2013-01-15 13:34:55 -0800 | [diff] [blame] | 58 | #define QDSS_LDO_BYP BIT(22) |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 59 | |
| 60 | int pil_q6v5_make_proxy_votes(struct pil_desc *pil) |
| 61 | { |
| 62 | int ret; |
Stephen Boyd | 3826cd4 | 2012-07-05 17:37:53 -0700 | [diff] [blame] | 63 | struct q6v5_data *drv = container_of(pil, struct q6v5_data, desc); |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 64 | |
| 65 | ret = clk_prepare_enable(drv->xo); |
| 66 | if (ret) { |
Matt Wagantall | 6c51598 | 2013-01-29 14:58:43 -0800 | [diff] [blame] | 67 | dev_err(pil->dev, "Failed to vote for XO\n"); |
| 68 | goto out; |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 69 | } |
Matt Wagantall | 6c51598 | 2013-01-29 14:58:43 -0800 | [diff] [blame] | 70 | |
Matt Wagantall | 9a8dde4 | 2013-02-11 16:18:33 -0800 | [diff] [blame] | 71 | ret = regulator_set_voltage(drv->vreg_cx, |
| 72 | RPM_REGULATOR_CORNER_SUPER_TURBO, |
| 73 | RPM_REGULATOR_CORNER_SUPER_TURBO); |
| 74 | if (ret) { |
| 75 | dev_err(pil->dev, "Failed to request vdd_cx voltage.\n"); |
| 76 | goto err_cx_voltage; |
| 77 | } |
| 78 | |
| 79 | ret = regulator_set_optimum_mode(drv->vreg_cx, 100000); |
| 80 | if (ret < 0) { |
| 81 | dev_err(pil->dev, "Failed to set vdd_cx mode.\n"); |
| 82 | goto err_cx_mode; |
| 83 | } |
| 84 | |
Matt Wagantall | 6c51598 | 2013-01-29 14:58:43 -0800 | [diff] [blame] | 85 | ret = regulator_enable(drv->vreg_cx); |
| 86 | if (ret) { |
| 87 | dev_err(pil->dev, "Failed to vote for vdd_cx\n"); |
Matt Wagantall | 9a8dde4 | 2013-02-11 16:18:33 -0800 | [diff] [blame] | 88 | goto err_cx_enable; |
Matt Wagantall | 6c51598 | 2013-01-29 14:58:43 -0800 | [diff] [blame] | 89 | } |
| 90 | |
| 91 | if (drv->vreg_pll) { |
| 92 | ret = regulator_enable(drv->vreg_pll); |
| 93 | if (ret) { |
| 94 | dev_err(pil->dev, "Failed to vote for vdd_pll\n"); |
Matt Wagantall | 9a8dde4 | 2013-02-11 16:18:33 -0800 | [diff] [blame] | 95 | goto err_vreg_pll; |
Matt Wagantall | 6c51598 | 2013-01-29 14:58:43 -0800 | [diff] [blame] | 96 | } |
| 97 | } |
| 98 | |
Matt Wagantall | 9a8dde4 | 2013-02-11 16:18:33 -0800 | [diff] [blame] | 99 | return 0; |
| 100 | |
| 101 | err_vreg_pll: |
| 102 | regulator_disable(drv->vreg_cx); |
| 103 | err_cx_enable: |
| 104 | regulator_set_optimum_mode(drv->vreg_cx, 0); |
| 105 | err_cx_mode: |
| 106 | regulator_set_voltage(drv->vreg_cx, RPM_REGULATOR_CORNER_NONE, |
| 107 | RPM_REGULATOR_CORNER_SUPER_TURBO); |
| 108 | err_cx_voltage: |
| 109 | clk_disable_unprepare(drv->xo); |
Matt Wagantall | 6c51598 | 2013-01-29 14:58:43 -0800 | [diff] [blame] | 110 | out: |
| 111 | return ret; |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 112 | } |
| 113 | EXPORT_SYMBOL(pil_q6v5_make_proxy_votes); |
| 114 | |
| 115 | void pil_q6v5_remove_proxy_votes(struct pil_desc *pil) |
| 116 | { |
Stephen Boyd | 3826cd4 | 2012-07-05 17:37:53 -0700 | [diff] [blame] | 117 | struct q6v5_data *drv = container_of(pil, struct q6v5_data, desc); |
Matt Wagantall | 6c51598 | 2013-01-29 14:58:43 -0800 | [diff] [blame] | 118 | if (drv->vreg_pll) |
| 119 | regulator_disable(drv->vreg_pll); |
| 120 | regulator_disable(drv->vreg_cx); |
Matt Wagantall | 9a8dde4 | 2013-02-11 16:18:33 -0800 | [diff] [blame] | 121 | regulator_set_optimum_mode(drv->vreg_cx, 0); |
| 122 | regulator_set_voltage(drv->vreg_cx, RPM_REGULATOR_CORNER_NONE, |
| 123 | RPM_REGULATOR_CORNER_SUPER_TURBO); |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 124 | clk_disable_unprepare(drv->xo); |
| 125 | } |
| 126 | EXPORT_SYMBOL(pil_q6v5_remove_proxy_votes); |
| 127 | |
Matt Wagantall | b774799 | 2012-05-11 19:37:51 -0700 | [diff] [blame] | 128 | void pil_q6v5_halt_axi_port(struct pil_desc *pil, void __iomem *halt_base) |
| 129 | { |
| 130 | int ret; |
| 131 | u32 status; |
| 132 | |
| 133 | /* Assert halt request */ |
| 134 | writel_relaxed(1, halt_base + AXI_HALTREQ); |
| 135 | |
| 136 | /* Wait for halt */ |
| 137 | ret = readl_poll_timeout(halt_base + AXI_HALTACK, |
| 138 | status, status != 0, 50, HALT_ACK_TIMEOUT_US); |
| 139 | if (ret) |
| 140 | dev_warn(pil->dev, "Port %p halt timeout\n", halt_base); |
| 141 | else if (!readl_relaxed(halt_base + AXI_IDLE)) |
| 142 | dev_warn(pil->dev, "Port %p halt failed\n", halt_base); |
| 143 | |
| 144 | /* Clear halt request (port will remain halted until reset) */ |
| 145 | writel_relaxed(0, halt_base + AXI_HALTREQ); |
| 146 | } |
| 147 | EXPORT_SYMBOL(pil_q6v5_halt_axi_port); |
| 148 | |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 149 | void pil_q6v5_shutdown(struct pil_desc *pil) |
| 150 | { |
| 151 | u32 val; |
Stephen Boyd | 3826cd4 | 2012-07-05 17:37:53 -0700 | [diff] [blame] | 152 | struct q6v5_data *drv = container_of(pil, struct q6v5_data, desc); |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 153 | |
| 154 | /* Turn off core clock */ |
| 155 | val = readl_relaxed(drv->reg_base + QDSP6SS_GFMUX_CTL); |
| 156 | val &= ~Q6SS_CLK_ENA; |
| 157 | writel_relaxed(val, drv->reg_base + QDSP6SS_GFMUX_CTL); |
| 158 | |
| 159 | /* Clamp IO */ |
| 160 | val = readl_relaxed(drv->reg_base + QDSP6SS_PWR_CTL); |
| 161 | val |= Q6SS_CLAMP_IO; |
| 162 | writel_relaxed(val, drv->reg_base + QDSP6SS_PWR_CTL); |
| 163 | |
| 164 | /* Turn off Q6 memories */ |
Matt Wagantall | d4aaa15 | 2013-04-18 20:31:47 -0700 | [diff] [blame] | 165 | val &= ~(Q6SS_L2DATA_SLP_NRET_N_0 | Q6SS_L2DATA_SLP_NRET_N_1 | |
| 166 | Q6SS_L2DATA_SLP_NRET_N_2 | Q6SS_SLP_RET_N | |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 167 | Q6SS_L2TAG_SLP_NRET_N | Q6SS_ETB_SLP_NRET_N | |
| 168 | Q6SS_L2DATA_STBY_N); |
Matt Wagantall | f15e5a3 | 2012-12-19 14:41:17 -0800 | [diff] [blame] | 169 | writel_relaxed(val, drv->reg_base + QDSP6SS_PWR_CTL); |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 170 | |
| 171 | /* Assert Q6 resets */ |
| 172 | val = readl_relaxed(drv->reg_base + QDSP6SS_RESET); |
Matt Wagantall | 75d1740 | 2013-02-21 15:00:48 -0800 | [diff] [blame] | 173 | val |= (Q6SS_CORE_ARES | Q6SS_BUS_ARES_ENA); |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 174 | writel_relaxed(val, drv->reg_base + QDSP6SS_RESET); |
| 175 | |
Matt Wagantall | 3bc2fe5 | 2013-01-15 13:34:55 -0800 | [diff] [blame] | 176 | /* Kill power at block headswitch */ |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 177 | val = readl_relaxed(drv->reg_base + QDSP6SS_PWR_CTL); |
| 178 | val &= ~QDSS_BHS_ON; |
| 179 | writel_relaxed(val, drv->reg_base + QDSP6SS_PWR_CTL); |
| 180 | } |
| 181 | EXPORT_SYMBOL(pil_q6v5_shutdown); |
| 182 | |
| 183 | int pil_q6v5_reset(struct pil_desc *pil) |
| 184 | { |
Stephen Boyd | 3826cd4 | 2012-07-05 17:37:53 -0700 | [diff] [blame] | 185 | struct q6v5_data *drv = container_of(pil, struct q6v5_data, desc); |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 186 | u32 val; |
| 187 | |
| 188 | /* Assert resets, stop core */ |
| 189 | val = readl_relaxed(drv->reg_base + QDSP6SS_RESET); |
Matt Wagantall | 11c07e2 | 2012-08-09 16:14:07 -0700 | [diff] [blame] | 190 | val |= (Q6SS_CORE_ARES | Q6SS_BUS_ARES_ENA | Q6SS_STOP_CORE); |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 191 | writel_relaxed(val, drv->reg_base + QDSP6SS_RESET); |
| 192 | |
Matt Wagantall | 3bc2fe5 | 2013-01-15 13:34:55 -0800 | [diff] [blame] | 193 | /* Enable power block headswitch, and wait for it to stabilize */ |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 194 | val = readl_relaxed(drv->reg_base + QDSP6SS_PWR_CTL); |
Matt Wagantall | 3bc2fe5 | 2013-01-15 13:34:55 -0800 | [diff] [blame] | 195 | val |= QDSS_BHS_ON | QDSS_LDO_BYP; |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 196 | writel_relaxed(val, drv->reg_base + QDSP6SS_PWR_CTL); |
Matt Wagantall | 3bc2fe5 | 2013-01-15 13:34:55 -0800 | [diff] [blame] | 197 | mb(); |
| 198 | udelay(1); |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 199 | |
Matt Wagantall | d4aaa15 | 2013-04-18 20:31:47 -0700 | [diff] [blame] | 200 | /* |
| 201 | * Turn on memories. L2 banks should be done individually |
| 202 | * to minimize inrush current. |
| 203 | */ |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 204 | val = readl_relaxed(drv->reg_base + QDSP6SS_PWR_CTL); |
Matt Wagantall | d4aaa15 | 2013-04-18 20:31:47 -0700 | [diff] [blame] | 205 | val |= Q6SS_SLP_RET_N | Q6SS_L2TAG_SLP_NRET_N | |
| 206 | Q6SS_ETB_SLP_NRET_N | Q6SS_L2DATA_STBY_N; |
| 207 | writel_relaxed(val, drv->reg_base + QDSP6SS_PWR_CTL); |
| 208 | val |= Q6SS_L2DATA_SLP_NRET_N_2; |
| 209 | writel_relaxed(val, drv->reg_base + QDSP6SS_PWR_CTL); |
| 210 | val |= Q6SS_L2DATA_SLP_NRET_N_1; |
| 211 | writel_relaxed(val, drv->reg_base + QDSP6SS_PWR_CTL); |
| 212 | val |= Q6SS_L2DATA_SLP_NRET_N_0; |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 213 | writel_relaxed(val, drv->reg_base + QDSP6SS_PWR_CTL); |
| 214 | |
| 215 | /* Remove IO clamp */ |
| 216 | val &= ~Q6SS_CLAMP_IO; |
| 217 | writel_relaxed(val, drv->reg_base + QDSP6SS_PWR_CTL); |
| 218 | |
| 219 | /* Bring core out of reset */ |
Matt Wagantall | 11c07e2 | 2012-08-09 16:14:07 -0700 | [diff] [blame] | 220 | val = readl_relaxed(drv->reg_base + QDSP6SS_RESET); |
| 221 | val &= ~Q6SS_CORE_ARES; |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 222 | writel_relaxed(val, drv->reg_base + QDSP6SS_RESET); |
| 223 | |
| 224 | /* Turn on core clock */ |
| 225 | val = readl_relaxed(drv->reg_base + QDSP6SS_GFMUX_CTL); |
| 226 | val |= Q6SS_CLK_ENA; |
| 227 | writel_relaxed(val, drv->reg_base + QDSP6SS_GFMUX_CTL); |
| 228 | |
| 229 | /* Start core execution */ |
| 230 | val = readl_relaxed(drv->reg_base + QDSP6SS_RESET); |
| 231 | val &= ~Q6SS_STOP_CORE; |
| 232 | writel_relaxed(val, drv->reg_base + QDSP6SS_RESET); |
| 233 | |
| 234 | return 0; |
| 235 | } |
| 236 | EXPORT_SYMBOL(pil_q6v5_reset); |
| 237 | |
Stephen Boyd | 3826cd4 | 2012-07-05 17:37:53 -0700 | [diff] [blame] | 238 | struct q6v5_data __devinit *pil_q6v5_init(struct platform_device *pdev) |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 239 | { |
| 240 | struct q6v5_data *drv; |
| 241 | struct resource *res; |
| 242 | struct pil_desc *desc; |
| 243 | int ret; |
| 244 | |
| 245 | drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL); |
| 246 | if (!drv) |
| 247 | return ERR_PTR(-ENOMEM); |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 248 | |
Matt Wagantall | 1f16815 | 2012-09-25 13:26:47 -0700 | [diff] [blame] | 249 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "qdsp6_base"); |
Stephen Boyd | f8f8928 | 2012-07-16 18:05:48 -0700 | [diff] [blame] | 250 | drv->reg_base = devm_request_and_ioremap(&pdev->dev, res); |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 251 | if (!drv->reg_base) |
| 252 | return ERR_PTR(-ENOMEM); |
Stephen Boyd | f8f8928 | 2012-07-16 18:05:48 -0700 | [diff] [blame] | 253 | |
Matt Wagantall | 1f16815 | 2012-09-25 13:26:47 -0700 | [diff] [blame] | 254 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "halt_base"); |
Matt Wagantall | b774799 | 2012-05-11 19:37:51 -0700 | [diff] [blame] | 255 | drv->axi_halt_base = devm_ioremap(&pdev->dev, res->start, |
| 256 | resource_size(res)); |
| 257 | if (!drv->axi_halt_base) |
| 258 | return ERR_PTR(-ENOMEM); |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 259 | |
Stephen Boyd | 633eb62 | 2012-06-13 12:05:35 -0700 | [diff] [blame] | 260 | desc = &drv->desc; |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 261 | ret = of_property_read_string(pdev->dev.of_node, "qcom,firmware-name", |
| 262 | &desc->name); |
| 263 | if (ret) |
| 264 | return ERR_PTR(ret); |
| 265 | |
| 266 | drv->xo = devm_clk_get(&pdev->dev, "xo"); |
| 267 | if (IS_ERR(drv->xo)) |
| 268 | return ERR_CAST(drv->xo); |
| 269 | |
Matt Wagantall | 6c51598 | 2013-01-29 14:58:43 -0800 | [diff] [blame] | 270 | drv->vreg_cx = devm_regulator_get(&pdev->dev, "vdd_cx"); |
| 271 | if (IS_ERR(drv->vreg_cx)) |
| 272 | return ERR_CAST(drv->vreg_cx); |
| 273 | |
Matt Wagantall | 6c51598 | 2013-01-29 14:58:43 -0800 | [diff] [blame] | 274 | drv->vreg_pll = devm_regulator_get(&pdev->dev, "vdd_pll"); |
| 275 | if (!IS_ERR(drv->vreg_pll)) { |
| 276 | int voltage; |
| 277 | ret = of_property_read_u32(pdev->dev.of_node, "qcom,vdd_pll", |
| 278 | &voltage); |
| 279 | if (ret) { |
| 280 | dev_err(&pdev->dev, "Failed to find vdd_pll voltage.\n"); |
| 281 | return ERR_PTR(ret); |
| 282 | } |
| 283 | |
| 284 | ret = regulator_set_voltage(drv->vreg_pll, voltage, voltage); |
| 285 | if (ret) { |
| 286 | dev_err(&pdev->dev, "Failed to request vdd_pll voltage.\n"); |
| 287 | return ERR_PTR(ret); |
| 288 | } |
| 289 | |
| 290 | ret = regulator_set_optimum_mode(drv->vreg_pll, 10000); |
| 291 | if (ret < 0) { |
| 292 | dev_err(&pdev->dev, "Failed to set vdd_pll mode.\n"); |
| 293 | return ERR_PTR(ret); |
| 294 | } |
| 295 | } else { |
| 296 | drv->vreg_pll = NULL; |
| 297 | } |
| 298 | |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 299 | desc->dev = &pdev->dev; |
| 300 | |
Stephen Boyd | 3826cd4 | 2012-07-05 17:37:53 -0700 | [diff] [blame] | 301 | return drv; |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 302 | } |
| 303 | EXPORT_SYMBOL(pil_q6v5_init); |