blob: 8b9d06fd03256683bdc5696b3e25af8d7d2bfd27 [file] [log] [blame]
Alexander Shishkine443b332012-05-11 17:25:46 +03001/*
2 * core.c - ChipIdea USB IP core family device controller
3 *
4 * Copyright (C) 2008 Chipidea - MIPS Technologies, Inc. All rights reserved.
5 *
6 * Author: David Lopo
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13/*
14 * Description: ChipIdea USB IP core family device controller
15 *
16 * This driver is composed of several blocks:
17 * - HW: hardware interface
18 * - DBG: debug facilities (optional)
19 * - UTIL: utilities
20 * - ISR: interrupts handling
21 * - ENDPT: endpoint operations (Gadget API)
22 * - GADGET: gadget operations (Gadget API)
23 * - BUS: bus glue code, bus abstraction layer
24 *
25 * Compile Options
26 * - CONFIG_USB_GADGET_DEBUG_FILES: enable debug facilities
27 * - STALL_IN: non-empty bulk-in pipes cannot be halted
28 * if defined mass storage compliance succeeds but with warnings
29 * => case 4: Hi > Dn
30 * => case 5: Hi > Di
31 * => case 8: Hi <> Do
32 * if undefined usbtest 13 fails
33 * - TRACE: enable function tracing (depends on DEBUG)
34 *
35 * Main Features
36 * - Chapter 9 & Mass Storage Compliance with Gadget File Storage
37 * - Chapter 9 Compliance with Gadget Zero (STALL_IN undefined)
38 * - Normal & LPM support
39 *
40 * USBTEST Report
41 * - OK: 0-12, 13 (STALL_IN defined) & 14
42 * - Not Supported: 15 & 16 (ISO)
43 *
44 * TODO List
45 * - OTG
46 * - Isochronous & Interrupt Traffic
47 * - Handle requests which spawns into several TDs
48 * - GET_STATUS(device) - always reports 0
49 * - Gadget API (majority of optional features)
50 * - Suspend & Remote Wakeup
51 */
52#include <linux/delay.h>
53#include <linux/device.h>
54#include <linux/dmapool.h>
55#include <linux/dma-mapping.h>
56#include <linux/init.h>
57#include <linux/platform_device.h>
58#include <linux/module.h>
59#include <linux/interrupt.h>
60#include <linux/io.h>
61#include <linux/irq.h>
62#include <linux/kernel.h>
63#include <linux/slab.h>
64#include <linux/pm_runtime.h>
65#include <linux/usb/ch9.h>
66#include <linux/usb/gadget.h>
67#include <linux/usb/otg.h>
68#include <linux/usb/chipidea.h>
69
70#include "ci.h"
71#include "udc.h"
72#include "bits.h"
Alexander Shishkineb70e5a2012-05-11 17:25:54 +030073#include "host.h"
Alexander Shishkine443b332012-05-11 17:25:46 +030074#include "debug.h"
75
Alexander Shishkin5f36e232012-05-11 17:25:47 +030076/* Controller register map */
Alexander Shishkine443b332012-05-11 17:25:46 +030077static uintptr_t ci_regs_nolpm[] = {
78 [CAP_CAPLENGTH] = 0x000UL,
79 [CAP_HCCPARAMS] = 0x008UL,
80 [CAP_DCCPARAMS] = 0x024UL,
81 [CAP_TESTMODE] = 0x038UL,
82 [OP_USBCMD] = 0x000UL,
83 [OP_USBSTS] = 0x004UL,
84 [OP_USBINTR] = 0x008UL,
85 [OP_DEVICEADDR] = 0x014UL,
86 [OP_ENDPTLISTADDR] = 0x018UL,
87 [OP_PORTSC] = 0x044UL,
88 [OP_DEVLC] = 0x084UL,
Alexander Shishkin5f36e232012-05-11 17:25:47 +030089 [OP_OTGSC] = 0x064UL,
Alexander Shishkine443b332012-05-11 17:25:46 +030090 [OP_USBMODE] = 0x068UL,
91 [OP_ENDPTSETUPSTAT] = 0x06CUL,
92 [OP_ENDPTPRIME] = 0x070UL,
93 [OP_ENDPTFLUSH] = 0x074UL,
94 [OP_ENDPTSTAT] = 0x078UL,
95 [OP_ENDPTCOMPLETE] = 0x07CUL,
96 [OP_ENDPTCTRL] = 0x080UL,
97};
98
99static uintptr_t ci_regs_lpm[] = {
100 [CAP_CAPLENGTH] = 0x000UL,
101 [CAP_HCCPARAMS] = 0x008UL,
102 [CAP_DCCPARAMS] = 0x024UL,
103 [CAP_TESTMODE] = 0x0FCUL,
104 [OP_USBCMD] = 0x000UL,
105 [OP_USBSTS] = 0x004UL,
106 [OP_USBINTR] = 0x008UL,
107 [OP_DEVICEADDR] = 0x014UL,
108 [OP_ENDPTLISTADDR] = 0x018UL,
109 [OP_PORTSC] = 0x044UL,
110 [OP_DEVLC] = 0x084UL,
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300111 [OP_OTGSC] = 0x0C4UL,
Alexander Shishkine443b332012-05-11 17:25:46 +0300112 [OP_USBMODE] = 0x0C8UL,
113 [OP_ENDPTSETUPSTAT] = 0x0D8UL,
114 [OP_ENDPTPRIME] = 0x0DCUL,
115 [OP_ENDPTFLUSH] = 0x0E0UL,
116 [OP_ENDPTSTAT] = 0x0E4UL,
117 [OP_ENDPTCOMPLETE] = 0x0E8UL,
118 [OP_ENDPTCTRL] = 0x0ECUL,
119};
120
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300121static int hw_alloc_regmap(struct ci13xxx *ci, bool is_lpm)
Alexander Shishkine443b332012-05-11 17:25:46 +0300122{
123 int i;
124
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300125 kfree(ci->hw_bank.regmap);
Alexander Shishkine443b332012-05-11 17:25:46 +0300126
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300127 ci->hw_bank.regmap = kzalloc((OP_LAST + 1) * sizeof(void *),
128 GFP_KERNEL);
129 if (!ci->hw_bank.regmap)
Alexander Shishkine443b332012-05-11 17:25:46 +0300130 return -ENOMEM;
131
132 for (i = 0; i < OP_ENDPTCTRL; i++)
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300133 ci->hw_bank.regmap[i] =
134 (i <= CAP_LAST ? ci->hw_bank.cap : ci->hw_bank.op) +
Alexander Shishkine443b332012-05-11 17:25:46 +0300135 (is_lpm ? ci_regs_lpm[i] : ci_regs_nolpm[i]);
136
137 for (; i <= OP_LAST; i++)
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300138 ci->hw_bank.regmap[i] = ci->hw_bank.op +
Alexander Shishkine443b332012-05-11 17:25:46 +0300139 4 * (i - OP_ENDPTCTRL) +
140 (is_lpm
141 ? ci_regs_lpm[OP_ENDPTCTRL]
142 : ci_regs_nolpm[OP_ENDPTCTRL]);
143
144 return 0;
145}
146
147/**
148 * hw_port_test_set: writes port test mode (execute without interruption)
149 * @mode: new value
150 *
151 * This function returns an error code
152 */
153int hw_port_test_set(struct ci13xxx *ci, u8 mode)
154{
155 const u8 TEST_MODE_MAX = 7;
156
157 if (mode > TEST_MODE_MAX)
158 return -EINVAL;
159
160 hw_write(ci, OP_PORTSC, PORTSC_PTC, mode << ffs_nr(PORTSC_PTC));
161 return 0;
162}
163
164/**
165 * hw_port_test_get: reads port test mode value
166 *
167 * This function returns port test mode value
168 */
169u8 hw_port_test_get(struct ci13xxx *ci)
170{
171 return hw_read(ci, OP_PORTSC, PORTSC_PTC) >> ffs_nr(PORTSC_PTC);
172}
173
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300174static int hw_device_init(struct ci13xxx *ci, void __iomem *base)
Alexander Shishkine443b332012-05-11 17:25:46 +0300175{
176 u32 reg;
177
178 /* bank is a module variable */
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300179 ci->hw_bank.abs = base;
Alexander Shishkine443b332012-05-11 17:25:46 +0300180
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300181 ci->hw_bank.cap = ci->hw_bank.abs;
Richard Zhao77c44002012-06-29 17:48:53 +0800182 ci->hw_bank.cap += ci->platdata->capoffset;
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300183 ci->hw_bank.op = ci->hw_bank.cap + ioread8(ci->hw_bank.cap);
Alexander Shishkine443b332012-05-11 17:25:46 +0300184
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300185 hw_alloc_regmap(ci, false);
186 reg = hw_read(ci, CAP_HCCPARAMS, HCCPARAMS_LEN) >>
Alexander Shishkine443b332012-05-11 17:25:46 +0300187 ffs_nr(HCCPARAMS_LEN);
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300188 ci->hw_bank.lpm = reg;
189 hw_alloc_regmap(ci, !!reg);
190 ci->hw_bank.size = ci->hw_bank.op - ci->hw_bank.abs;
191 ci->hw_bank.size += OP_LAST;
192 ci->hw_bank.size /= sizeof(u32);
Alexander Shishkine443b332012-05-11 17:25:46 +0300193
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300194 reg = hw_read(ci, CAP_DCCPARAMS, DCCPARAMS_DEN) >>
Alexander Shishkine443b332012-05-11 17:25:46 +0300195 ffs_nr(DCCPARAMS_DEN);
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300196 ci->hw_ep_max = reg * 2; /* cache hw ENDPT_MAX */
Alexander Shishkine443b332012-05-11 17:25:46 +0300197
Richard Zhao09c94e62012-05-15 21:58:18 +0800198 if (ci->hw_ep_max > ENDPT_MAX)
Alexander Shishkine443b332012-05-11 17:25:46 +0300199 return -ENODEV;
200
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300201 dev_dbg(ci->dev, "ChipIdea HDRC found, lpm: %d; cap: %p op: %p\n",
202 ci->hw_bank.lpm, ci->hw_bank.cap, ci->hw_bank.op);
Alexander Shishkine443b332012-05-11 17:25:46 +0300203
204 /* setup lock mode ? */
205
206 /* ENDPTSETUPSTAT is '0' by default */
207
208 /* HCSPARAMS.bf.ppc SHOULD BE zero for device */
209
210 return 0;
211}
212
213/**
214 * hw_device_reset: resets chip (execute without interruption)
215 * @ci: the controller
216 *
217 * This function returns an error code
218 */
Alexander Shishkineb70e5a2012-05-11 17:25:54 +0300219int hw_device_reset(struct ci13xxx *ci, u32 mode)
Alexander Shishkine443b332012-05-11 17:25:46 +0300220{
221 /* should flush & stop before reset */
222 hw_write(ci, OP_ENDPTFLUSH, ~0, ~0);
223 hw_write(ci, OP_USBCMD, USBCMD_RS, 0);
224
225 hw_write(ci, OP_USBCMD, USBCMD_RST, USBCMD_RST);
226 while (hw_read(ci, OP_USBCMD, USBCMD_RST))
227 udelay(10); /* not RTOS friendly */
228
229
Richard Zhao77c44002012-06-29 17:48:53 +0800230 if (ci->platdata->notify_event)
231 ci->platdata->notify_event(ci,
Alexander Shishkine443b332012-05-11 17:25:46 +0300232 CI13XXX_CONTROLLER_RESET_EVENT);
233
Richard Zhao77c44002012-06-29 17:48:53 +0800234 if (ci->platdata->flags & CI13XXX_DISABLE_STREAMING)
Alexander Shishkin758fc982012-05-11 17:25:53 +0300235 hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS);
Alexander Shishkine443b332012-05-11 17:25:46 +0300236
237 /* USBMODE should be configured step by step */
238 hw_write(ci, OP_USBMODE, USBMODE_CM, USBMODE_CM_IDLE);
Alexander Shishkineb70e5a2012-05-11 17:25:54 +0300239 hw_write(ci, OP_USBMODE, USBMODE_CM, mode);
Alexander Shishkine443b332012-05-11 17:25:46 +0300240 /* HW >= 2.3 */
241 hw_write(ci, OP_USBMODE, USBMODE_SLOM, USBMODE_SLOM);
242
Alexander Shishkineb70e5a2012-05-11 17:25:54 +0300243 if (hw_read(ci, OP_USBMODE, USBMODE_CM) != mode) {
244 pr_err("cannot enter in %s mode", ci_role(ci)->name);
Alexander Shishkine443b332012-05-11 17:25:46 +0300245 pr_err("lpm = %i", ci->hw_bank.lpm);
246 return -ENODEV;
247 }
248
249 return 0;
250}
251
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300252/**
253 * ci_otg_role - pick role based on ID pin state
254 * @ci: the controller
255 */
256static enum ci_role ci_otg_role(struct ci13xxx *ci)
257{
258 u32 sts = hw_read(ci, OP_OTGSC, ~0);
259 enum ci_role role = sts & OTGSC_ID
260 ? CI_ROLE_GADGET
261 : CI_ROLE_HOST;
262
263 return role;
264}
265
266/**
267 * ci_role_work - perform role changing based on ID pin
268 * @work: work struct
269 */
270static void ci_role_work(struct work_struct *work)
271{
272 struct ci13xxx *ci = container_of(work, struct ci13xxx, work);
273 enum ci_role role = ci_otg_role(ci);
274
275 hw_write(ci, OP_OTGSC, OTGSC_IDIS, OTGSC_IDIS);
276
277 if (role != ci->role) {
278 dev_dbg(ci->dev, "switching from %s to %s\n",
279 ci_role(ci)->name, ci->roles[role]->name);
280
281 ci_role_stop(ci);
282 ci_role_start(ci, role);
283 }
284}
285
286static ssize_t show_role(struct device *dev, struct device_attribute *attr,
287 char *buf)
288{
289 struct ci13xxx *ci = dev_get_drvdata(dev);
290
291 return sprintf(buf, "%s\n", ci_role(ci)->name);
292}
293
294static ssize_t store_role(struct device *dev, struct device_attribute *attr,
295 const char *buf, size_t count)
296{
297 struct ci13xxx *ci = dev_get_drvdata(dev);
298 enum ci_role role;
299 int ret;
300
301 for (role = CI_ROLE_HOST; role < CI_ROLE_END; role++)
302 if (ci->roles[role] && !strcmp(buf, ci->roles[role]->name))
303 break;
304
305 if (role == CI_ROLE_END || role == ci->role)
306 return -EINVAL;
307
308 ci_role_stop(ci);
309 ret = ci_role_start(ci, role);
310 if (ret)
311 return ret;
312
313 return count;
314}
315
316static DEVICE_ATTR(role, S_IRUSR | S_IWUSR, show_role, store_role);
317
318static irqreturn_t ci_irq(int irq, void *data)
319{
320 struct ci13xxx *ci = data;
321 irqreturn_t ret = IRQ_NONE;
322
323 if (ci->is_otg) {
324 u32 sts = hw_read(ci, OP_OTGSC, ~0);
325
326 if (sts & OTGSC_IDIS) {
327 queue_work(ci->wq, &ci->work);
328 ret = IRQ_HANDLED;
329 }
330 }
331
332 return ci->role == CI_ROLE_END ? ret : ci_role(ci)->irq(ci);
333}
334
Richard Zhaocbc6dc22012-07-07 22:56:41 +0800335struct platform_device *ci13xxx_add_device(struct device *dev,
336 struct resource *res, int nres,
337 struct ci13xxx_platform_data *platdata)
338{
339 struct platform_device *pdev;
340 int ret;
341
342 /* FIXME: find a way to choose id */
343 pdev = platform_device_alloc("ci_hdrc", -1);
344 if (!pdev)
345 return ERR_PTR(-ENOMEM);
346
347 pdev->dev.parent = dev;
348 pdev->dev.dma_mask = dev->dma_mask;
349 pdev->dev.dma_parms = dev->dma_parms;
350 dma_set_coherent_mask(&pdev->dev, dev->coherent_dma_mask);
351
352 ret = platform_device_add_resources(pdev, res, nres);
353 if (ret)
354 goto err;
355
356 ret = platform_device_add_data(pdev, platdata, sizeof(*platdata));
357 if (ret)
358 goto err;
359
360 ret = platform_device_add(pdev);
361 if (ret)
362 goto err;
363
364 return pdev;
365
366err:
367 platform_device_put(pdev);
368 return ERR_PTR(ret);
369}
370EXPORT_SYMBOL_GPL(ci13xxx_add_device);
371
372void ci13xxx_remove_device(struct platform_device *pdev)
373{
374 platform_device_unregister(pdev);
375}
376EXPORT_SYMBOL_GPL(ci13xxx_remove_device);
377
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300378static int __devinit ci_hdrc_probe(struct platform_device *pdev)
Alexander Shishkine443b332012-05-11 17:25:46 +0300379{
380 struct device *dev = &pdev->dev;
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300381 struct ci13xxx *ci;
Alexander Shishkine443b332012-05-11 17:25:46 +0300382 struct resource *res;
383 void __iomem *base;
384 int ret;
385
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300386 if (!dev->platform_data) {
Alexander Shishkine443b332012-05-11 17:25:46 +0300387 dev_err(dev, "platform data missing\n");
388 return -ENODEV;
389 }
390
391 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
392 if (!res) {
393 dev_err(dev, "missing resource\n");
394 return -ENODEV;
395 }
396
397 base = devm_request_and_ioremap(dev, res);
398 if (!res) {
399 dev_err(dev, "can't request and ioremap resource\n");
400 return -ENOMEM;
401 }
402
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300403 ci = devm_kzalloc(dev, sizeof(*ci), GFP_KERNEL);
404 if (!ci) {
405 dev_err(dev, "can't allocate device\n");
406 return -ENOMEM;
Alexander Shishkine443b332012-05-11 17:25:46 +0300407 }
408
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300409 ci->dev = dev;
Richard Zhao77c44002012-06-29 17:48:53 +0800410 ci->platdata = dev->platform_data;
Alexander Shishkine443b332012-05-11 17:25:46 +0300411
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300412 ret = hw_device_init(ci, base);
413 if (ret < 0) {
414 dev_err(dev, "can't initialize hardware\n");
415 return -ENODEV;
416 }
417
Alexander Shishkineb70e5a2012-05-11 17:25:54 +0300418 ci->hw_bank.phys = res->start;
419
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300420 ci->irq = platform_get_irq(pdev, 0);
421 if (ci->irq < 0) {
422 dev_err(dev, "missing IRQ\n");
423 return -ENODEV;
424 }
425
426 INIT_WORK(&ci->work, ci_role_work);
427 ci->wq = create_singlethread_workqueue("ci_otg");
428 if (!ci->wq) {
429 dev_err(dev, "can't create workqueue\n");
430 return -ENODEV;
431 }
432
433 /* initialize role(s) before the interrupt is requested */
Alexander Shishkineb70e5a2012-05-11 17:25:54 +0300434 ret = ci_hdrc_host_init(ci);
435 if (ret)
436 dev_info(dev, "doesn't support host\n");
437
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300438 ret = ci_hdrc_gadget_init(ci);
Alexander Shishkine443b332012-05-11 17:25:46 +0300439 if (ret)
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300440 dev_info(dev, "doesn't support gadget\n");
441
442 if (!ci->roles[CI_ROLE_HOST] && !ci->roles[CI_ROLE_GADGET]) {
443 dev_err(dev, "no supported roles\n");
444 ret = -ENODEV;
445 goto rm_wq;
446 }
447
448 if (ci->roles[CI_ROLE_HOST] && ci->roles[CI_ROLE_GADGET]) {
449 ci->is_otg = true;
450 ci->role = ci_otg_role(ci);
451 } else {
452 ci->role = ci->roles[CI_ROLE_HOST]
453 ? CI_ROLE_HOST
454 : CI_ROLE_GADGET;
455 }
456
457 ret = ci_role_start(ci, ci->role);
458 if (ret) {
459 dev_err(dev, "can't start %s role\n", ci_role(ci)->name);
460 ret = -ENODEV;
461 goto rm_wq;
462 }
463
464 platform_set_drvdata(pdev, ci);
Richard Zhao77c44002012-06-29 17:48:53 +0800465 ret = request_irq(ci->irq, ci_irq, IRQF_SHARED, ci->platdata->name,
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300466 ci);
467 if (ret)
468 goto stop;
469
470 ret = device_create_file(dev, &dev_attr_role);
471 if (ret)
472 goto rm_attr;
473
474 if (ci->is_otg)
475 hw_write(ci, OP_OTGSC, OTGSC_IDIE, OTGSC_IDIE);
476
477 return ret;
478
479rm_attr:
480 device_remove_file(dev, &dev_attr_role);
481stop:
482 ci_role_stop(ci);
483rm_wq:
484 flush_workqueue(ci->wq);
485 destroy_workqueue(ci->wq);
Alexander Shishkine443b332012-05-11 17:25:46 +0300486
487 return ret;
488}
489
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300490static int __devexit ci_hdrc_remove(struct platform_device *pdev)
Alexander Shishkine443b332012-05-11 17:25:46 +0300491{
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300492 struct ci13xxx *ci = platform_get_drvdata(pdev);
Alexander Shishkine443b332012-05-11 17:25:46 +0300493
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300494 flush_workqueue(ci->wq);
495 destroy_workqueue(ci->wq);
496 device_remove_file(ci->dev, &dev_attr_role);
497 free_irq(ci->irq, ci);
498 ci_role_stop(ci);
Alexander Shishkine443b332012-05-11 17:25:46 +0300499
500 return 0;
501}
502
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300503static struct platform_driver ci_hdrc_driver = {
504 .probe = ci_hdrc_probe,
505 .remove = __devexit_p(ci_hdrc_remove),
Alexander Shishkine443b332012-05-11 17:25:46 +0300506 .driver = {
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300507 .name = "ci_hdrc",
Alexander Shishkine443b332012-05-11 17:25:46 +0300508 },
509};
510
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300511module_platform_driver(ci_hdrc_driver);
Alexander Shishkine443b332012-05-11 17:25:46 +0300512
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300513MODULE_ALIAS("platform:ci_hdrc");
Alexander Shishkine443b332012-05-11 17:25:46 +0300514MODULE_ALIAS("platform:ci13xxx");
515MODULE_LICENSE("GPL v2");
516MODULE_AUTHOR("David Lopo <dlopo@chipidea.mips.com>");
Alexander Shishkin5f36e232012-05-11 17:25:47 +0300517MODULE_DESCRIPTION("ChipIdea HDRC Driver");