gth.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700
  1. /*
  2. * Intel(R) Trace Hub Global Trace Hub
  3. *
  4. * Copyright (C) 2014-2015 Intel Corporation.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms and conditions of the GNU General Public License,
  8. * version 2, as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13. * more details.
  14. */
  15. #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  16. #include <linux/types.h>
  17. #include <linux/module.h>
  18. #include <linux/device.h>
  19. #include <linux/io.h>
  20. #include <linux/mm.h>
  21. #include <linux/slab.h>
  22. #include <linux/bitmap.h>
  23. #include "intel_th.h"
  24. #include "gth.h"
  25. struct gth_device;
  26. /**
  27. * struct gth_output - GTH view on an output port
  28. * @gth: backlink to the GTH device
  29. * @output: link to output device's output descriptor
  30. * @index: output port number
  31. * @port_type: one of GTH_* port type values
  32. * @master: bitmap of masters configured for this output
  33. */
  34. struct gth_output {
  35. struct gth_device *gth;
  36. struct intel_th_output *output;
  37. unsigned int index;
  38. unsigned int port_type;
  39. DECLARE_BITMAP(master, TH_CONFIGURABLE_MASTERS + 1);
  40. };
  41. /**
  42. * struct gth_device - GTH device
  43. * @dev: driver core's device
  44. * @base: register window base address
  45. * @output_group: attributes describing output ports
  46. * @master_group: attributes describing master assignments
  47. * @output: output ports
  48. * @master: master/output port assignments
  49. * @gth_lock: serializes accesses to GTH bits
  50. */
  51. struct gth_device {
  52. struct device *dev;
  53. void __iomem *base;
  54. struct attribute_group output_group;
  55. struct attribute_group master_group;
  56. struct gth_output output[TH_POSSIBLE_OUTPUTS];
  57. signed char master[TH_CONFIGURABLE_MASTERS + 1];
  58. spinlock_t gth_lock;
  59. };
  60. static void gth_output_set(struct gth_device *gth, int port,
  61. unsigned int config)
  62. {
  63. unsigned long reg = port & 4 ? REG_GTH_GTHOPT1 : REG_GTH_GTHOPT0;
  64. u32 val;
  65. int shift = (port & 3) * 8;
  66. val = ioread32(gth->base + reg);
  67. val &= ~(0xff << shift);
  68. val |= config << shift;
  69. iowrite32(val, gth->base + reg);
  70. }
  71. static unsigned int gth_output_get(struct gth_device *gth, int port)
  72. {
  73. unsigned long reg = port & 4 ? REG_GTH_GTHOPT1 : REG_GTH_GTHOPT0;
  74. u32 val;
  75. int shift = (port & 3) * 8;
  76. val = ioread32(gth->base + reg);
  77. val &= 0xff << shift;
  78. val >>= shift;
  79. return val;
  80. }
  81. static void gth_smcfreq_set(struct gth_device *gth, int port,
  82. unsigned int freq)
  83. {
  84. unsigned long reg = REG_GTH_SMCR0 + ((port / 2) * 4);
  85. int shift = (port & 1) * 16;
  86. u32 val;
  87. val = ioread32(gth->base + reg);
  88. val &= ~(0xffff << shift);
  89. val |= freq << shift;
  90. iowrite32(val, gth->base + reg);
  91. }
  92. static unsigned int gth_smcfreq_get(struct gth_device *gth, int port)
  93. {
  94. unsigned long reg = REG_GTH_SMCR0 + ((port / 2) * 4);
  95. int shift = (port & 1) * 16;
  96. u32 val;
  97. val = ioread32(gth->base + reg);
  98. val &= 0xffff << shift;
  99. val >>= shift;
  100. return val;
  101. }
  102. /*
  103. * "masters" attribute group
  104. */
  105. struct master_attribute {
  106. struct device_attribute attr;
  107. struct gth_device *gth;
  108. unsigned int master;
  109. };
  110. static void
  111. gth_master_set(struct gth_device *gth, unsigned int master, int port)
  112. {
  113. unsigned int reg = REG_GTH_SWDEST0 + ((master >> 1) & ~3u);
  114. unsigned int shift = (master & 0x7) * 4;
  115. u32 val;
  116. if (master >= 256) {
  117. reg = REG_GTH_GSWTDEST;
  118. shift = 0;
  119. }
  120. val = ioread32(gth->base + reg);
  121. val &= ~(0xf << shift);
  122. if (port >= 0)
  123. val |= (0x8 | port) << shift;
  124. iowrite32(val, gth->base + reg);
  125. }
  126. static ssize_t master_attr_show(struct device *dev,
  127. struct device_attribute *attr,
  128. char *buf)
  129. {
  130. struct master_attribute *ma =
  131. container_of(attr, struct master_attribute, attr);
  132. struct gth_device *gth = ma->gth;
  133. size_t count;
  134. int port;
  135. spin_lock(&gth->gth_lock);
  136. port = gth->master[ma->master];
  137. spin_unlock(&gth->gth_lock);
  138. if (port >= 0)
  139. count = snprintf(buf, PAGE_SIZE, "%x\n", port);
  140. else
  141. count = snprintf(buf, PAGE_SIZE, "disabled\n");
  142. return count;
  143. }
  144. static ssize_t master_attr_store(struct device *dev,
  145. struct device_attribute *attr,
  146. const char *buf, size_t count)
  147. {
  148. struct master_attribute *ma =
  149. container_of(attr, struct master_attribute, attr);
  150. struct gth_device *gth = ma->gth;
  151. int old_port, port;
  152. if (kstrtoint(buf, 10, &port) < 0)
  153. return -EINVAL;
  154. if (port >= TH_POSSIBLE_OUTPUTS || port < -1)
  155. return -EINVAL;
  156. spin_lock(&gth->gth_lock);
  157. /* disconnect from the previous output port, if any */
  158. old_port = gth->master[ma->master];
  159. if (old_port >= 0) {
  160. gth->master[ma->master] = -1;
  161. clear_bit(ma->master, gth->output[old_port].master);
  162. if (gth->output[old_port].output->active)
  163. gth_master_set(gth, ma->master, -1);
  164. }
  165. /* connect to the new output port, if any */
  166. if (port >= 0) {
  167. /* check if there's a driver for this port */
  168. if (!gth->output[port].output) {
  169. count = -ENODEV;
  170. goto unlock;
  171. }
  172. set_bit(ma->master, gth->output[port].master);
  173. /* if the port is active, program this setting */
  174. if (gth->output[port].output->active)
  175. gth_master_set(gth, ma->master, port);
  176. }
  177. gth->master[ma->master] = port;
  178. unlock:
  179. spin_unlock(&gth->gth_lock);
  180. return count;
  181. }
  182. struct output_attribute {
  183. struct device_attribute attr;
  184. struct gth_device *gth;
  185. unsigned int port;
  186. unsigned int parm;
  187. };
  188. #define OUTPUT_PARM(_name, _mask, _r, _w, _what) \
  189. [TH_OUTPUT_PARM(_name)] = { .name = __stringify(_name), \
  190. .get = gth_ ## _what ## _get, \
  191. .set = gth_ ## _what ## _set, \
  192. .mask = (_mask), \
  193. .readable = (_r), \
  194. .writable = (_w) }
  195. static const struct output_parm {
  196. const char *name;
  197. unsigned int (*get)(struct gth_device *gth, int port);
  198. void (*set)(struct gth_device *gth, int port,
  199. unsigned int val);
  200. unsigned int mask;
  201. unsigned int readable : 1,
  202. writable : 1;
  203. } output_parms[] = {
  204. OUTPUT_PARM(port, 0x7, 1, 0, output),
  205. OUTPUT_PARM(null, BIT(3), 1, 1, output),
  206. OUTPUT_PARM(drop, BIT(4), 1, 1, output),
  207. OUTPUT_PARM(reset, BIT(5), 1, 0, output),
  208. OUTPUT_PARM(flush, BIT(7), 0, 1, output),
  209. OUTPUT_PARM(smcfreq, 0xffff, 1, 1, smcfreq),
  210. };
  211. static void
  212. gth_output_parm_set(struct gth_device *gth, int port, unsigned int parm,
  213. unsigned int val)
  214. {
  215. unsigned int config = output_parms[parm].get(gth, port);
  216. unsigned int mask = output_parms[parm].mask;
  217. unsigned int shift = __ffs(mask);
  218. config &= ~mask;
  219. config |= (val << shift) & mask;
  220. output_parms[parm].set(gth, port, config);
  221. }
  222. static unsigned int
  223. gth_output_parm_get(struct gth_device *gth, int port, unsigned int parm)
  224. {
  225. unsigned int config = output_parms[parm].get(gth, port);
  226. unsigned int mask = output_parms[parm].mask;
  227. unsigned int shift = __ffs(mask);
  228. config &= mask;
  229. config >>= shift;
  230. return config;
  231. }
  232. /*
  233. * Reset outputs and sources
  234. */
  235. static int intel_th_gth_reset(struct gth_device *gth)
  236. {
  237. u32 scratchpad;
  238. int port, i;
  239. scratchpad = ioread32(gth->base + REG_GTH_SCRPD0);
  240. if (scratchpad & SCRPD_DEBUGGER_IN_USE)
  241. return -EBUSY;
  242. /* Always save/restore STH and TU registers in S0ix entry/exit */
  243. scratchpad |= SCRPD_STH_IS_ENABLED | SCRPD_TRIGGER_IS_ENABLED;
  244. iowrite32(scratchpad, gth->base + REG_GTH_SCRPD0);
  245. /* output ports */
  246. for (port = 0; port < 8; port++) {
  247. if (gth_output_parm_get(gth, port, TH_OUTPUT_PARM(port)) ==
  248. GTH_NONE)
  249. continue;
  250. gth_output_set(gth, port, 0);
  251. gth_smcfreq_set(gth, port, 16);
  252. }
  253. /* disable overrides */
  254. iowrite32(0, gth->base + REG_GTH_DESTOVR);
  255. /* masters swdest_0~31 and gswdest */
  256. for (i = 0; i < 33; i++)
  257. iowrite32(0, gth->base + REG_GTH_SWDEST0 + i * 4);
  258. /* sources */
  259. iowrite32(0, gth->base + REG_GTH_SCR);
  260. iowrite32(0xfc, gth->base + REG_GTH_SCR2);
  261. return 0;
  262. }
  263. /*
  264. * "outputs" attribute group
  265. */
  266. static ssize_t output_attr_show(struct device *dev,
  267. struct device_attribute *attr,
  268. char *buf)
  269. {
  270. struct output_attribute *oa =
  271. container_of(attr, struct output_attribute, attr);
  272. struct gth_device *gth = oa->gth;
  273. size_t count;
  274. spin_lock(&gth->gth_lock);
  275. count = snprintf(buf, PAGE_SIZE, "%x\n",
  276. gth_output_parm_get(gth, oa->port, oa->parm));
  277. spin_unlock(&gth->gth_lock);
  278. return count;
  279. }
  280. static ssize_t output_attr_store(struct device *dev,
  281. struct device_attribute *attr,
  282. const char *buf, size_t count)
  283. {
  284. struct output_attribute *oa =
  285. container_of(attr, struct output_attribute, attr);
  286. struct gth_device *gth = oa->gth;
  287. unsigned int config;
  288. if (kstrtouint(buf, 16, &config) < 0)
  289. return -EINVAL;
  290. spin_lock(&gth->gth_lock);
  291. gth_output_parm_set(gth, oa->port, oa->parm, config);
  292. spin_unlock(&gth->gth_lock);
  293. return count;
  294. }
  295. static int intel_th_master_attributes(struct gth_device *gth)
  296. {
  297. struct master_attribute *master_attrs;
  298. struct attribute **attrs;
  299. int i, nattrs = TH_CONFIGURABLE_MASTERS + 2;
  300. attrs = devm_kcalloc(gth->dev, nattrs, sizeof(void *), GFP_KERNEL);
  301. if (!attrs)
  302. return -ENOMEM;
  303. master_attrs = devm_kcalloc(gth->dev, nattrs,
  304. sizeof(struct master_attribute),
  305. GFP_KERNEL);
  306. if (!master_attrs)
  307. return -ENOMEM;
  308. for (i = 0; i < TH_CONFIGURABLE_MASTERS + 1; i++) {
  309. char *name;
  310. name = devm_kasprintf(gth->dev, GFP_KERNEL, "%d%s", i,
  311. i == TH_CONFIGURABLE_MASTERS ? "+" : "");
  312. if (!name)
  313. return -ENOMEM;
  314. master_attrs[i].attr.attr.name = name;
  315. master_attrs[i].attr.attr.mode = S_IRUGO | S_IWUSR;
  316. master_attrs[i].attr.show = master_attr_show;
  317. master_attrs[i].attr.store = master_attr_store;
  318. sysfs_attr_init(&master_attrs[i].attr.attr);
  319. attrs[i] = &master_attrs[i].attr.attr;
  320. master_attrs[i].gth = gth;
  321. master_attrs[i].master = i;
  322. }
  323. gth->master_group.name = "masters";
  324. gth->master_group.attrs = attrs;
  325. return sysfs_create_group(&gth->dev->kobj, &gth->master_group);
  326. }
  327. static int intel_th_output_attributes(struct gth_device *gth)
  328. {
  329. struct output_attribute *out_attrs;
  330. struct attribute **attrs;
  331. int i, j, nouts = TH_POSSIBLE_OUTPUTS;
  332. int nparms = ARRAY_SIZE(output_parms);
  333. int nattrs = nouts * nparms + 1;
  334. attrs = devm_kcalloc(gth->dev, nattrs, sizeof(void *), GFP_KERNEL);
  335. if (!attrs)
  336. return -ENOMEM;
  337. out_attrs = devm_kcalloc(gth->dev, nattrs,
  338. sizeof(struct output_attribute),
  339. GFP_KERNEL);
  340. if (!out_attrs)
  341. return -ENOMEM;
  342. for (i = 0; i < nouts; i++) {
  343. for (j = 0; j < nparms; j++) {
  344. unsigned int idx = i * nparms + j;
  345. char *name;
  346. name = devm_kasprintf(gth->dev, GFP_KERNEL, "%d_%s", i,
  347. output_parms[j].name);
  348. if (!name)
  349. return -ENOMEM;
  350. out_attrs[idx].attr.attr.name = name;
  351. if (output_parms[j].readable) {
  352. out_attrs[idx].attr.attr.mode |= S_IRUGO;
  353. out_attrs[idx].attr.show = output_attr_show;
  354. }
  355. if (output_parms[j].writable) {
  356. out_attrs[idx].attr.attr.mode |= S_IWUSR;
  357. out_attrs[idx].attr.store = output_attr_store;
  358. }
  359. sysfs_attr_init(&out_attrs[idx].attr.attr);
  360. attrs[idx] = &out_attrs[idx].attr.attr;
  361. out_attrs[idx].gth = gth;
  362. out_attrs[idx].port = i;
  363. out_attrs[idx].parm = j;
  364. }
  365. }
  366. gth->output_group.name = "outputs";
  367. gth->output_group.attrs = attrs;
  368. return sysfs_create_group(&gth->dev->kobj, &gth->output_group);
  369. }
  370. /**
  371. * intel_th_gth_disable() - enable tracing to an output device
  372. * @thdev: GTH device
  373. * @output: output device's descriptor
  374. *
  375. * This will deconfigure all masters set to output to this device,
  376. * disable tracing using force storeEn off signal and wait for the
  377. * "pipeline empty" bit for corresponding output port.
  378. */
  379. static void intel_th_gth_disable(struct intel_th_device *thdev,
  380. struct intel_th_output *output)
  381. {
  382. struct gth_device *gth = dev_get_drvdata(&thdev->dev);
  383. unsigned long count;
  384. int master;
  385. u32 reg;
  386. spin_lock(&gth->gth_lock);
  387. output->active = false;
  388. for_each_set_bit(master, gth->output[output->port].master,
  389. TH_CONFIGURABLE_MASTERS) {
  390. gth_master_set(gth, master, -1);
  391. }
  392. spin_unlock(&gth->gth_lock);
  393. iowrite32(0, gth->base + REG_GTH_SCR);
  394. iowrite32(0xfd, gth->base + REG_GTH_SCR2);
  395. /* wait on pipeline empty for the given port */
  396. for (reg = 0, count = GTH_PLE_WAITLOOP_DEPTH;
  397. count && !(reg & BIT(output->port)); count--) {
  398. reg = ioread32(gth->base + REG_GTH_STAT);
  399. cpu_relax();
  400. }
  401. /* clear force capture done for next captures */
  402. iowrite32(0xfc, gth->base + REG_GTH_SCR2);
  403. if (!count)
  404. dev_dbg(&thdev->dev, "timeout waiting for GTH[%d] PLE\n",
  405. output->port);
  406. reg = ioread32(gth->base + REG_GTH_SCRPD0);
  407. reg &= ~output->scratchpad;
  408. iowrite32(reg, gth->base + REG_GTH_SCRPD0);
  409. }
  410. /**
  411. * intel_th_gth_enable() - enable tracing to an output device
  412. * @thdev: GTH device
  413. * @output: output device's descriptor
  414. *
  415. * This will configure all masters set to output to this device and
  416. * enable tracing using force storeEn signal.
  417. */
  418. static void intel_th_gth_enable(struct intel_th_device *thdev,
  419. struct intel_th_output *output)
  420. {
  421. struct gth_device *gth = dev_get_drvdata(&thdev->dev);
  422. u32 scr = 0xfc0000, scrpd;
  423. int master;
  424. spin_lock(&gth->gth_lock);
  425. for_each_set_bit(master, gth->output[output->port].master,
  426. TH_CONFIGURABLE_MASTERS + 1) {
  427. gth_master_set(gth, master, output->port);
  428. }
  429. if (output->multiblock)
  430. scr |= 0xff;
  431. output->active = true;
  432. spin_unlock(&gth->gth_lock);
  433. scrpd = ioread32(gth->base + REG_GTH_SCRPD0);
  434. scrpd |= output->scratchpad;
  435. iowrite32(scrpd, gth->base + REG_GTH_SCRPD0);
  436. iowrite32(scr, gth->base + REG_GTH_SCR);
  437. iowrite32(0, gth->base + REG_GTH_SCR2);
  438. }
  439. /**
  440. * intel_th_gth_assign() - assign output device to a GTH output port
  441. * @thdev: GTH device
  442. * @othdev: output device
  443. *
  444. * This will match a given output device parameters against present
  445. * output ports on the GTH and fill out relevant bits in output device's
  446. * descriptor.
  447. *
  448. * Return: 0 on success, -errno on error.
  449. */
  450. static int intel_th_gth_assign(struct intel_th_device *thdev,
  451. struct intel_th_device *othdev)
  452. {
  453. struct gth_device *gth = dev_get_drvdata(&thdev->dev);
  454. int i, id;
  455. if (othdev->type != INTEL_TH_OUTPUT)
  456. return -EINVAL;
  457. for (i = 0, id = 0; i < TH_POSSIBLE_OUTPUTS; i++) {
  458. if (gth->output[i].port_type != othdev->output.type)
  459. continue;
  460. if (othdev->id == -1 || othdev->id == id)
  461. goto found;
  462. id++;
  463. }
  464. return -ENOENT;
  465. found:
  466. spin_lock(&gth->gth_lock);
  467. othdev->output.port = i;
  468. othdev->output.active = false;
  469. gth->output[i].output = &othdev->output;
  470. spin_unlock(&gth->gth_lock);
  471. return 0;
  472. }
  473. /**
  474. * intel_th_gth_unassign() - deassociate an output device from its output port
  475. * @thdev: GTH device
  476. * @othdev: output device
  477. */
  478. static void intel_th_gth_unassign(struct intel_th_device *thdev,
  479. struct intel_th_device *othdev)
  480. {
  481. struct gth_device *gth = dev_get_drvdata(&thdev->dev);
  482. int port = othdev->output.port;
  483. spin_lock(&gth->gth_lock);
  484. othdev->output.port = -1;
  485. othdev->output.active = false;
  486. gth->output[port].output = NULL;
  487. spin_unlock(&gth->gth_lock);
  488. }
  489. static int
  490. intel_th_gth_set_output(struct intel_th_device *thdev, unsigned int master)
  491. {
  492. struct gth_device *gth = dev_get_drvdata(&thdev->dev);
  493. int port = 0; /* FIXME: make default output configurable */
  494. /*
  495. * everything above TH_CONFIGURABLE_MASTERS is controlled by the
  496. * same register
  497. */
  498. if (master > TH_CONFIGURABLE_MASTERS)
  499. master = TH_CONFIGURABLE_MASTERS;
  500. spin_lock(&gth->gth_lock);
  501. if (gth->master[master] == -1) {
  502. set_bit(master, gth->output[port].master);
  503. gth->master[master] = port;
  504. }
  505. spin_unlock(&gth->gth_lock);
  506. return 0;
  507. }
  508. static int intel_th_gth_probe(struct intel_th_device *thdev)
  509. {
  510. struct device *dev = &thdev->dev;
  511. struct gth_device *gth;
  512. struct resource *res;
  513. void __iomem *base;
  514. int i, ret;
  515. res = intel_th_device_get_resource(thdev, IORESOURCE_MEM, 0);
  516. if (!res)
  517. return -ENODEV;
  518. base = devm_ioremap(dev, res->start, resource_size(res));
  519. if (!base)
  520. return -ENOMEM;
  521. gth = devm_kzalloc(dev, sizeof(*gth), GFP_KERNEL);
  522. if (!gth)
  523. return -ENOMEM;
  524. gth->dev = dev;
  525. gth->base = base;
  526. spin_lock_init(&gth->gth_lock);
  527. ret = intel_th_gth_reset(gth);
  528. if (ret)
  529. return ret;
  530. for (i = 0; i < TH_CONFIGURABLE_MASTERS + 1; i++)
  531. gth->master[i] = -1;
  532. for (i = 0; i < TH_POSSIBLE_OUTPUTS; i++) {
  533. gth->output[i].gth = gth;
  534. gth->output[i].index = i;
  535. gth->output[i].port_type =
  536. gth_output_parm_get(gth, i, TH_OUTPUT_PARM(port));
  537. }
  538. if (intel_th_output_attributes(gth) ||
  539. intel_th_master_attributes(gth)) {
  540. pr_warn("Can't initialize sysfs attributes\n");
  541. if (gth->output_group.attrs)
  542. sysfs_remove_group(&gth->dev->kobj, &gth->output_group);
  543. return -ENOMEM;
  544. }
  545. dev_set_drvdata(dev, gth);
  546. return 0;
  547. }
  548. static void intel_th_gth_remove(struct intel_th_device *thdev)
  549. {
  550. struct gth_device *gth = dev_get_drvdata(&thdev->dev);
  551. sysfs_remove_group(&gth->dev->kobj, &gth->output_group);
  552. sysfs_remove_group(&gth->dev->kobj, &gth->master_group);
  553. }
  554. static struct intel_th_driver intel_th_gth_driver = {
  555. .probe = intel_th_gth_probe,
  556. .remove = intel_th_gth_remove,
  557. .assign = intel_th_gth_assign,
  558. .unassign = intel_th_gth_unassign,
  559. .set_output = intel_th_gth_set_output,
  560. .enable = intel_th_gth_enable,
  561. .disable = intel_th_gth_disable,
  562. .driver = {
  563. .name = "gth",
  564. .owner = THIS_MODULE,
  565. },
  566. };
  567. module_driver(intel_th_gth_driver,
  568. intel_th_driver_register,
  569. intel_th_driver_unregister);
  570. MODULE_ALIAS("intel_th_switch");
  571. MODULE_LICENSE("GPL v2");
  572. MODULE_DESCRIPTION("Intel(R) Trace Hub Global Trace Hub driver");
  573. MODULE_AUTHOR("Alexander Shishkin <alexander.shishkin@linux.intel.com>");