blob: db4b3c4bacd77f8630b706112959e7834966e4b5 [file] [log] [blame]
Thomas Gleixner1802d0b2019-05-27 08:55:21 +02001// SPDX-License-Identifier: GPL-2.0-only
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -07002/*
Avaneesh Kumar Dwivedi90a068e2017-01-30 20:33:08 +05303 * Qualcomm ADSP/SLPI Peripheral Image Loader for MSM8974 and MSM8996
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -07004 *
5 * Copyright (C) 2016 Linaro Ltd
6 * Copyright (C) 2014 Sony Mobile Communications AB
7 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -07008 */
9
Sarangdhar Joshif33a7352016-10-25 13:57:26 -070010#include <linux/clk.h>
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -070011#include <linux/firmware.h>
12#include <linux/interrupt.h>
13#include <linux/kernel.h>
14#include <linux/module.h>
15#include <linux/of_address.h>
16#include <linux/of_device.h>
17#include <linux/platform_device.h>
18#include <linux/qcom_scm.h>
19#include <linux/regulator/consumer.h>
20#include <linux/remoteproc.h>
Bjorn Andersson2aad40d2017-01-27 03:12:57 -080021#include <linux/soc/qcom/mdt_loader.h>
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -070022#include <linux/soc/qcom/smem.h>
23#include <linux/soc/qcom/smem_state.h>
24
Bjorn Anderssonbde440e2017-01-27 02:28:32 -080025#include "qcom_common.h"
Bjorn Andersson6103b1a2018-06-04 13:30:37 -070026#include "qcom_q6v5.h"
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -070027#include "remoteproc_internal.h"
28
Avaneesh Kumar Dwivedic7715e42017-01-30 20:33:06 +053029struct adsp_data {
30 int crash_reason_smem;
31 const char *firmware_name;
32 int pas_id;
Avaneesh Kumar Dwivedie323fc02017-01-30 20:33:07 +053033 bool has_aggre2_clk;
Bjorn Andersson1fb82ee2017-08-27 21:51:38 -070034
Bjorn Andersson1e140df2017-07-24 22:56:43 -070035 const char *ssr_name;
Bjorn Andersson1fb82ee2017-08-27 21:51:38 -070036 const char *sysmon_name;
37 int ssctl_id;
Avaneesh Kumar Dwivedic7715e42017-01-30 20:33:06 +053038};
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -070039
40struct qcom_adsp {
41 struct device *dev;
42 struct rproc *rproc;
43
Bjorn Andersson6103b1a2018-06-04 13:30:37 -070044 struct qcom_q6v5 q6v5;
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -070045
Sarangdhar Joshif33a7352016-10-25 13:57:26 -070046 struct clk *xo;
Avaneesh Kumar Dwivedie323fc02017-01-30 20:33:07 +053047 struct clk *aggre2_clk;
Sarangdhar Joshif33a7352016-10-25 13:57:26 -070048
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -070049 struct regulator *cx_supply;
Avaneesh Kumar Dwivedie323fc02017-01-30 20:33:07 +053050 struct regulator *px_supply;
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -070051
Avaneesh Kumar Dwivedic7715e42017-01-30 20:33:06 +053052 int pas_id;
53 int crash_reason_smem;
Avaneesh Kumar Dwivedie323fc02017-01-30 20:33:07 +053054 bool has_aggre2_clk;
Avaneesh Kumar Dwivedic7715e42017-01-30 20:33:06 +053055
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -070056 struct completion start_done;
57 struct completion stop_done;
58
59 phys_addr_t mem_phys;
60 phys_addr_t mem_reloc;
61 void *mem_region;
62 size_t mem_size;
Bjorn Andersson4b489212017-01-29 14:05:50 -080063
Bjorn Anderssoneea07022017-08-29 16:13:35 -070064 struct qcom_rproc_glink glink_subdev;
Bjorn Andersson4b489212017-01-29 14:05:50 -080065 struct qcom_rproc_subdev smd_subdev;
Bjorn Andersson1e140df2017-07-24 22:56:43 -070066 struct qcom_rproc_ssr ssr_subdev;
Bjorn Andersson1fb82ee2017-08-27 21:51:38 -070067 struct qcom_sysmon *sysmon;
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -070068};
69
70static int adsp_load(struct rproc *rproc, const struct firmware *fw)
71{
72 struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv;
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -070073
Bjorn Andersson7f0dd072017-01-27 02:17:23 -080074 return qcom_mdt_load(adsp->dev, fw, rproc->firmware, adsp->pas_id,
Bjorn Andersson4dd27f52018-01-05 16:04:19 -080075 adsp->mem_region, adsp->mem_phys, adsp->mem_size,
76 &adsp->mem_reloc);
77
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -070078}
79
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -070080static int adsp_start(struct rproc *rproc)
81{
82 struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv;
83 int ret;
84
Bjorn Andersson6103b1a2018-06-04 13:30:37 -070085 qcom_q6v5_prepare(&adsp->q6v5);
86
Sarangdhar Joshif33a7352016-10-25 13:57:26 -070087 ret = clk_prepare_enable(adsp->xo);
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -070088 if (ret)
89 return ret;
90
Avaneesh Kumar Dwivedie323fc02017-01-30 20:33:07 +053091 ret = clk_prepare_enable(adsp->aggre2_clk);
92 if (ret)
93 goto disable_xo_clk;
94
Sarangdhar Joshif33a7352016-10-25 13:57:26 -070095 ret = regulator_enable(adsp->cx_supply);
96 if (ret)
Avaneesh Kumar Dwivedie323fc02017-01-30 20:33:07 +053097 goto disable_aggre2_clk;
98
99 ret = regulator_enable(adsp->px_supply);
100 if (ret)
101 goto disable_cx_supply;
Sarangdhar Joshif33a7352016-10-25 13:57:26 -0700102
Avaneesh Kumar Dwivedic7715e42017-01-30 20:33:06 +0530103 ret = qcom_scm_pas_auth_and_reset(adsp->pas_id);
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700104 if (ret) {
105 dev_err(adsp->dev,
106 "failed to authenticate image and release reset\n");
Avaneesh Kumar Dwivedie323fc02017-01-30 20:33:07 +0530107 goto disable_px_supply;
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700108 }
109
Bjorn Andersson6103b1a2018-06-04 13:30:37 -0700110 ret = qcom_q6v5_wait_for_start(&adsp->q6v5, msecs_to_jiffies(5000));
111 if (ret == -ETIMEDOUT) {
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700112 dev_err(adsp->dev, "start timed out\n");
Avaneesh Kumar Dwivedic7715e42017-01-30 20:33:06 +0530113 qcom_scm_pas_shutdown(adsp->pas_id);
Avaneesh Kumar Dwivedie323fc02017-01-30 20:33:07 +0530114 goto disable_px_supply;
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700115 }
116
Bjorn Andersson6103b1a2018-06-04 13:30:37 -0700117 return 0;
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700118
Avaneesh Kumar Dwivedie323fc02017-01-30 20:33:07 +0530119disable_px_supply:
120 regulator_disable(adsp->px_supply);
121disable_cx_supply:
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700122 regulator_disable(adsp->cx_supply);
Avaneesh Kumar Dwivedie323fc02017-01-30 20:33:07 +0530123disable_aggre2_clk:
124 clk_disable_unprepare(adsp->aggre2_clk);
125disable_xo_clk:
Sarangdhar Joshif33a7352016-10-25 13:57:26 -0700126 clk_disable_unprepare(adsp->xo);
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700127
128 return ret;
129}
130
Bjorn Andersson6103b1a2018-06-04 13:30:37 -0700131static void qcom_pas_handover(struct qcom_q6v5 *q6v5)
132{
133 struct qcom_adsp *adsp = container_of(q6v5, struct qcom_adsp, q6v5);
134
135 regulator_disable(adsp->px_supply);
136 regulator_disable(adsp->cx_supply);
137 clk_disable_unprepare(adsp->aggre2_clk);
138 clk_disable_unprepare(adsp->xo);
139}
140
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700141static int adsp_stop(struct rproc *rproc)
142{
143 struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv;
Bjorn Andersson6103b1a2018-06-04 13:30:37 -0700144 int handover;
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700145 int ret;
146
Bjorn Andersson6103b1a2018-06-04 13:30:37 -0700147 ret = qcom_q6v5_request_stop(&adsp->q6v5);
148 if (ret == -ETIMEDOUT)
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700149 dev_err(adsp->dev, "timed out on wait\n");
150
Avaneesh Kumar Dwivedic7715e42017-01-30 20:33:06 +0530151 ret = qcom_scm_pas_shutdown(adsp->pas_id);
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700152 if (ret)
153 dev_err(adsp->dev, "failed to shutdown: %d\n", ret);
154
Bjorn Andersson6103b1a2018-06-04 13:30:37 -0700155 handover = qcom_q6v5_unprepare(&adsp->q6v5);
156 if (handover)
157 qcom_pas_handover(&adsp->q6v5);
158
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700159 return ret;
160}
161
162static void *adsp_da_to_va(struct rproc *rproc, u64 da, int len)
163{
164 struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv;
165 int offset;
166
167 offset = da - adsp->mem_reloc;
168 if (offset < 0 || offset + len > adsp->mem_size)
169 return NULL;
170
171 return adsp->mem_region + offset;
172}
173
174static const struct rproc_ops adsp_ops = {
175 .start = adsp_start,
176 .stop = adsp_stop,
177 .da_to_va = adsp_da_to_va,
Sarangdhar Joshidcb57ed2018-01-05 16:04:20 -0800178 .parse_fw = qcom_register_dump_segments,
Bjorn Andersson0f21f9c2018-01-05 15:58:01 -0800179 .load = adsp_load,
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700180};
181
Sarangdhar Joshif33a7352016-10-25 13:57:26 -0700182static int adsp_init_clock(struct qcom_adsp *adsp)
183{
184 int ret;
185
186 adsp->xo = devm_clk_get(adsp->dev, "xo");
187 if (IS_ERR(adsp->xo)) {
188 ret = PTR_ERR(adsp->xo);
189 if (ret != -EPROBE_DEFER)
190 dev_err(adsp->dev, "failed to get xo clock");
191 return ret;
192 }
193
Avaneesh Kumar Dwivedie323fc02017-01-30 20:33:07 +0530194 if (adsp->has_aggre2_clk) {
195 adsp->aggre2_clk = devm_clk_get(adsp->dev, "aggre2");
196 if (IS_ERR(adsp->aggre2_clk)) {
197 ret = PTR_ERR(adsp->aggre2_clk);
198 if (ret != -EPROBE_DEFER)
199 dev_err(adsp->dev,
200 "failed to get aggre2 clock");
201 return ret;
202 }
203 }
204
Sarangdhar Joshif33a7352016-10-25 13:57:26 -0700205 return 0;
206}
207
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700208static int adsp_init_regulator(struct qcom_adsp *adsp)
209{
210 adsp->cx_supply = devm_regulator_get(adsp->dev, "cx");
211 if (IS_ERR(adsp->cx_supply))
212 return PTR_ERR(adsp->cx_supply);
213
214 regulator_set_load(adsp->cx_supply, 100000);
215
Avaneesh Kumar Dwivedie323fc02017-01-30 20:33:07 +0530216 adsp->px_supply = devm_regulator_get(adsp->dev, "px");
Himanshu Jhac76929b2017-08-29 19:13:18 +0530217 return PTR_ERR_OR_ZERO(adsp->px_supply);
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700218}
219
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700220static int adsp_alloc_memory_region(struct qcom_adsp *adsp)
221{
222 struct device_node *node;
223 struct resource r;
224 int ret;
225
226 node = of_parse_phandle(adsp->dev->of_node, "memory-region", 0);
227 if (!node) {
228 dev_err(adsp->dev, "no memory-region specified\n");
229 return -EINVAL;
230 }
231
232 ret = of_address_to_resource(node, 0, &r);
233 if (ret)
234 return ret;
235
236 adsp->mem_phys = adsp->mem_reloc = r.start;
237 adsp->mem_size = resource_size(&r);
238 adsp->mem_region = devm_ioremap_wc(adsp->dev, adsp->mem_phys, adsp->mem_size);
239 if (!adsp->mem_region) {
240 dev_err(adsp->dev, "unable to map memory region: %pa+%zx\n",
241 &r.start, adsp->mem_size);
242 return -EBUSY;
243 }
244
245 return 0;
246}
247
248static int adsp_probe(struct platform_device *pdev)
249{
Avaneesh Kumar Dwivedic7715e42017-01-30 20:33:06 +0530250 const struct adsp_data *desc;
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700251 struct qcom_adsp *adsp;
252 struct rproc *rproc;
Sibi Sankara5a4e022019-01-15 01:20:01 +0530253 const char *fw_name;
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700254 int ret;
255
Avaneesh Kumar Dwivedic7715e42017-01-30 20:33:06 +0530256 desc = of_device_get_match_data(&pdev->dev);
257 if (!desc)
258 return -EINVAL;
259
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700260 if (!qcom_scm_is_available())
261 return -EPROBE_DEFER;
262
Sibi Sankara5a4e022019-01-15 01:20:01 +0530263 fw_name = desc->firmware_name;
264 ret = of_property_read_string(pdev->dev.of_node, "firmware-name",
265 &fw_name);
266 if (ret < 0 && ret != -EINVAL)
267 return ret;
268
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700269 rproc = rproc_alloc(&pdev->dev, pdev->name, &adsp_ops,
Sibi Sankara5a4e022019-01-15 01:20:01 +0530270 fw_name, sizeof(*adsp));
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700271 if (!rproc) {
272 dev_err(&pdev->dev, "unable to allocate remoteproc\n");
273 return -ENOMEM;
274 }
275
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700276 adsp = (struct qcom_adsp *)rproc->priv;
277 adsp->dev = &pdev->dev;
278 adsp->rproc = rproc;
Avaneesh Kumar Dwivedic7715e42017-01-30 20:33:06 +0530279 adsp->pas_id = desc->pas_id;
Avaneesh Kumar Dwivedie323fc02017-01-30 20:33:07 +0530280 adsp->has_aggre2_clk = desc->has_aggre2_clk;
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700281 platform_set_drvdata(pdev, adsp);
282
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700283 ret = adsp_alloc_memory_region(adsp);
284 if (ret)
285 goto free_rproc;
286
Sarangdhar Joshif33a7352016-10-25 13:57:26 -0700287 ret = adsp_init_clock(adsp);
288 if (ret)
289 goto free_rproc;
290
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700291 ret = adsp_init_regulator(adsp);
292 if (ret)
293 goto free_rproc;
294
Bjorn Andersson6103b1a2018-06-04 13:30:37 -0700295 ret = qcom_q6v5_init(&adsp->q6v5, pdev, rproc, desc->crash_reason_smem,
296 qcom_pas_handover);
297 if (ret)
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700298 goto free_rproc;
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700299
Bjorn Anderssoneea07022017-08-29 16:13:35 -0700300 qcom_add_glink_subdev(rproc, &adsp->glink_subdev);
Bjorn Andersson4b489212017-01-29 14:05:50 -0800301 qcom_add_smd_subdev(rproc, &adsp->smd_subdev);
Bjorn Andersson1e140df2017-07-24 22:56:43 -0700302 qcom_add_ssr_subdev(rproc, &adsp->ssr_subdev, desc->ssr_name);
Bjorn Andersson1fb82ee2017-08-27 21:51:38 -0700303 adsp->sysmon = qcom_add_sysmon_subdev(rproc,
304 desc->sysmon_name,
305 desc->ssctl_id);
Sibi Sankar027045a2019-01-08 15:53:43 +0530306 if (IS_ERR(adsp->sysmon)) {
307 ret = PTR_ERR(adsp->sysmon);
308 goto free_rproc;
309 }
Bjorn Andersson4b489212017-01-29 14:05:50 -0800310
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700311 ret = rproc_add(rproc);
312 if (ret)
313 goto free_rproc;
314
315 return 0;
316
317free_rproc:
Bjorn Andersson90a80d82016-11-19 22:42:55 -0800318 rproc_free(rproc);
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700319
320 return ret;
321}
322
323static int adsp_remove(struct platform_device *pdev)
324{
325 struct qcom_adsp *adsp = platform_get_drvdata(pdev);
326
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700327 rproc_del(adsp->rproc);
Bjorn Andersson4b489212017-01-29 14:05:50 -0800328
Bjorn Anderssoneea07022017-08-29 16:13:35 -0700329 qcom_remove_glink_subdev(adsp->rproc, &adsp->glink_subdev);
Bjorn Andersson1fb82ee2017-08-27 21:51:38 -0700330 qcom_remove_sysmon_subdev(adsp->sysmon);
Bjorn Andersson4b489212017-01-29 14:05:50 -0800331 qcom_remove_smd_subdev(adsp->rproc, &adsp->smd_subdev);
Bjorn Andersson1e140df2017-07-24 22:56:43 -0700332 qcom_remove_ssr_subdev(adsp->rproc, &adsp->ssr_subdev);
Bjorn Andersson90a80d82016-11-19 22:42:55 -0800333 rproc_free(adsp->rproc);
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700334
335 return 0;
336}
337
Avaneesh Kumar Dwivedic7715e42017-01-30 20:33:06 +0530338static const struct adsp_data adsp_resource_init = {
339 .crash_reason_smem = 423,
340 .firmware_name = "adsp.mdt",
341 .pas_id = 1,
Avaneesh Kumar Dwivedie323fc02017-01-30 20:33:07 +0530342 .has_aggre2_clk = false,
Bjorn Andersson1e140df2017-07-24 22:56:43 -0700343 .ssr_name = "lpass",
Bjorn Andersson1fb82ee2017-08-27 21:51:38 -0700344 .sysmon_name = "adsp",
345 .ssctl_id = 0x14,
Avaneesh Kumar Dwivedic7715e42017-01-30 20:33:06 +0530346};
347
Bjorn Andersson3b0d1b62018-08-28 00:14:58 -0700348static const struct adsp_data cdsp_resource_init = {
349 .crash_reason_smem = 601,
350 .firmware_name = "cdsp.mdt",
351 .pas_id = 18,
352 .has_aggre2_clk = false,
353 .ssr_name = "cdsp",
354 .sysmon_name = "cdsp",
355 .ssctl_id = 0x17,
356};
357
Avaneesh Kumar Dwivedi90a068e2017-01-30 20:33:08 +0530358static const struct adsp_data slpi_resource_init = {
359 .crash_reason_smem = 424,
360 .firmware_name = "slpi.mdt",
361 .pas_id = 12,
362 .has_aggre2_clk = true,
Bjorn Andersson1e140df2017-07-24 22:56:43 -0700363 .ssr_name = "dsps",
Bjorn Andersson1fb82ee2017-08-27 21:51:38 -0700364 .sysmon_name = "slpi",
365 .ssctl_id = 0x16,
Avaneesh Kumar Dwivedi90a068e2017-01-30 20:33:08 +0530366};
367
Bjorn Andersson0af93682018-09-27 12:03:46 -0700368static const struct adsp_data wcss_resource_init = {
369 .crash_reason_smem = 421,
370 .firmware_name = "wcnss.mdt",
371 .pas_id = 6,
372 .ssr_name = "mpss",
373 .sysmon_name = "wcnss",
374 .ssctl_id = 0x12,
375};
376
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700377static const struct of_device_id adsp_of_match[] = {
Avaneesh Kumar Dwivedic7715e42017-01-30 20:33:06 +0530378 { .compatible = "qcom,msm8974-adsp-pil", .data = &adsp_resource_init},
379 { .compatible = "qcom,msm8996-adsp-pil", .data = &adsp_resource_init},
Avaneesh Kumar Dwivedi90a068e2017-01-30 20:33:08 +0530380 { .compatible = "qcom,msm8996-slpi-pil", .data = &slpi_resource_init},
Bjorn Andersson0af93682018-09-27 12:03:46 -0700381 { .compatible = "qcom,qcs404-adsp-pas", .data = &adsp_resource_init },
382 { .compatible = "qcom,qcs404-cdsp-pas", .data = &cdsp_resource_init },
383 { .compatible = "qcom,qcs404-wcss-pas", .data = &wcss_resource_init },
Bjorn Andersson3b0d1b62018-08-28 00:14:58 -0700384 { .compatible = "qcom,sdm845-adsp-pas", .data = &adsp_resource_init},
385 { .compatible = "qcom,sdm845-cdsp-pas", .data = &cdsp_resource_init},
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700386 { },
387};
Bjorn Andersson62423472016-11-19 22:41:56 -0800388MODULE_DEVICE_TABLE(of, adsp_of_match);
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700389
390static struct platform_driver adsp_driver = {
391 .probe = adsp_probe,
392 .remove = adsp_remove,
393 .driver = {
Bjorn Andersson9e004f92018-09-24 16:45:25 -0700394 .name = "qcom_q6v5_pas",
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700395 .of_match_table = adsp_of_match,
396 },
397};
398
399module_platform_driver(adsp_driver);
Bjorn Andersson9e004f92018-09-24 16:45:25 -0700400MODULE_DESCRIPTION("Qualcomm Hexagon v5 Peripheral Authentication Service driver");
Bjorn Anderssonb9e718e2016-08-22 22:57:44 -0700401MODULE_LICENSE("GPL v2");