fpga-mgr.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * FPGA Manager Core
  4. *
  5. * Copyright (C) 2013-2015 Altera Corporation
  6. * Copyright (C) 2017 Intel Corporation
  7. *
  8. * With code from the mailing list:
  9. * Copyright (C) 2013 Xilinx, Inc.
  10. */
  11. #include <linux/firmware.h>
  12. #include <linux/fpga/fpga-mgr.h>
  13. #include <linux/idr.h>
  14. #include <linux/module.h>
  15. #include <linux/of.h>
  16. #include <linux/mutex.h>
  17. #include <linux/slab.h>
  18. #include <linux/scatterlist.h>
  19. #include <linux/highmem.h>
  20. static DEFINE_IDA(fpga_mgr_ida);
  21. static struct class *fpga_mgr_class;
  22. struct fpga_image_info *fpga_image_info_alloc(struct device *dev)
  23. {
  24. struct fpga_image_info *info;
  25. get_device(dev);
  26. info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL);
  27. if (!info) {
  28. put_device(dev);
  29. return NULL;
  30. }
  31. info->dev = dev;
  32. return info;
  33. }
  34. EXPORT_SYMBOL_GPL(fpga_image_info_alloc);
  35. void fpga_image_info_free(struct fpga_image_info *info)
  36. {
  37. struct device *dev;
  38. if (!info)
  39. return;
  40. dev = info->dev;
  41. if (info->firmware_name)
  42. devm_kfree(dev, info->firmware_name);
  43. devm_kfree(dev, info);
  44. put_device(dev);
  45. }
  46. EXPORT_SYMBOL_GPL(fpga_image_info_free);
  47. /*
  48. * Call the low level driver's write_init function. This will do the
  49. * device-specific things to get the FPGA into the state where it is ready to
  50. * receive an FPGA image. The low level driver only gets to see the first
  51. * initial_header_size bytes in the buffer.
  52. */
  53. static int fpga_mgr_write_init_buf(struct fpga_manager *mgr,
  54. struct fpga_image_info *info,
  55. const char *buf, size_t count)
  56. {
  57. int ret;
  58. mgr->state = FPGA_MGR_STATE_WRITE_INIT;
  59. if (!mgr->mops->initial_header_size)
  60. ret = mgr->mops->write_init(mgr, info, NULL, 0);
  61. else
  62. ret = mgr->mops->write_init(
  63. mgr, info, buf, min(mgr->mops->initial_header_size, count));
  64. if (ret) {
  65. dev_err(&mgr->dev, "Error preparing FPGA for writing\n");
  66. mgr->state = FPGA_MGR_STATE_WRITE_INIT_ERR;
  67. return ret;
  68. }
  69. return 0;
  70. }
  71. static int fpga_mgr_write_init_sg(struct fpga_manager *mgr,
  72. struct fpga_image_info *info,
  73. struct sg_table *sgt)
  74. {
  75. struct sg_mapping_iter miter;
  76. size_t len;
  77. char *buf;
  78. int ret;
  79. if (!mgr->mops->initial_header_size)
  80. return fpga_mgr_write_init_buf(mgr, info, NULL, 0);
  81. /*
  82. * First try to use miter to map the first fragment to access the
  83. * header, this is the typical path.
  84. */
  85. sg_miter_start(&miter, sgt->sgl, sgt->nents, SG_MITER_FROM_SG);
  86. if (sg_miter_next(&miter) &&
  87. miter.length >= mgr->mops->initial_header_size) {
  88. ret = fpga_mgr_write_init_buf(mgr, info, miter.addr,
  89. miter.length);
  90. sg_miter_stop(&miter);
  91. return ret;
  92. }
  93. sg_miter_stop(&miter);
  94. /* Otherwise copy the fragments into temporary memory. */
  95. buf = kmalloc(mgr->mops->initial_header_size, GFP_KERNEL);
  96. if (!buf)
  97. return -ENOMEM;
  98. len = sg_copy_to_buffer(sgt->sgl, sgt->nents, buf,
  99. mgr->mops->initial_header_size);
  100. ret = fpga_mgr_write_init_buf(mgr, info, buf, len);
  101. kfree(buf);
  102. return ret;
  103. }
  104. /*
  105. * After all the FPGA image has been written, do the device specific steps to
  106. * finish and set the FPGA into operating mode.
  107. */
  108. static int fpga_mgr_write_complete(struct fpga_manager *mgr,
  109. struct fpga_image_info *info)
  110. {
  111. int ret;
  112. mgr->state = FPGA_MGR_STATE_WRITE_COMPLETE;
  113. ret = mgr->mops->write_complete(mgr, info);
  114. if (ret) {
  115. dev_err(&mgr->dev, "Error after writing image data to FPGA\n");
  116. mgr->state = FPGA_MGR_STATE_WRITE_COMPLETE_ERR;
  117. return ret;
  118. }
  119. mgr->state = FPGA_MGR_STATE_OPERATING;
  120. return 0;
  121. }
  122. /**
  123. * fpga_mgr_buf_load_sg - load fpga from image in buffer from a scatter list
  124. * @mgr: fpga manager
  125. * @info: fpga image specific information
  126. * @sgt: scatterlist table
  127. *
  128. * Step the low level fpga manager through the device-specific steps of getting
  129. * an FPGA ready to be configured, writing the image to it, then doing whatever
  130. * post-configuration steps necessary. This code assumes the caller got the
  131. * mgr pointer from of_fpga_mgr_get() or fpga_mgr_get() and checked that it is
  132. * not an error code.
  133. *
  134. * This is the preferred entry point for FPGA programming, it does not require
  135. * any contiguous kernel memory.
  136. *
  137. * Return: 0 on success, negative error code otherwise.
  138. */
  139. static int fpga_mgr_buf_load_sg(struct fpga_manager *mgr,
  140. struct fpga_image_info *info,
  141. struct sg_table *sgt)
  142. {
  143. int ret;
  144. ret = fpga_mgr_write_init_sg(mgr, info, sgt);
  145. if (ret)
  146. return ret;
  147. /* Write the FPGA image to the FPGA. */
  148. mgr->state = FPGA_MGR_STATE_WRITE;
  149. if (mgr->mops->write_sg) {
  150. ret = mgr->mops->write_sg(mgr, sgt);
  151. } else {
  152. struct sg_mapping_iter miter;
  153. sg_miter_start(&miter, sgt->sgl, sgt->nents, SG_MITER_FROM_SG);
  154. while (sg_miter_next(&miter)) {
  155. ret = mgr->mops->write(mgr, miter.addr, miter.length);
  156. if (ret)
  157. break;
  158. }
  159. sg_miter_stop(&miter);
  160. }
  161. if (ret) {
  162. dev_err(&mgr->dev, "Error while writing image data to FPGA\n");
  163. mgr->state = FPGA_MGR_STATE_WRITE_ERR;
  164. return ret;
  165. }
  166. return fpga_mgr_write_complete(mgr, info);
  167. }
  168. static int fpga_mgr_buf_load_mapped(struct fpga_manager *mgr,
  169. struct fpga_image_info *info,
  170. const char *buf, size_t count)
  171. {
  172. int ret;
  173. ret = fpga_mgr_write_init_buf(mgr, info, buf, count);
  174. if (ret)
  175. return ret;
  176. /*
  177. * Write the FPGA image to the FPGA.
  178. */
  179. mgr->state = FPGA_MGR_STATE_WRITE;
  180. ret = mgr->mops->write(mgr, buf, count);
  181. if (ret) {
  182. dev_err(&mgr->dev, "Error while writing image data to FPGA\n");
  183. mgr->state = FPGA_MGR_STATE_WRITE_ERR;
  184. return ret;
  185. }
  186. return fpga_mgr_write_complete(mgr, info);
  187. }
  188. /**
  189. * fpga_mgr_buf_load - load fpga from image in buffer
  190. * @mgr: fpga manager
  191. * @flags: flags setting fpga confuration modes
  192. * @buf: buffer contain fpga image
  193. * @count: byte count of buf
  194. *
  195. * Step the low level fpga manager through the device-specific steps of getting
  196. * an FPGA ready to be configured, writing the image to it, then doing whatever
  197. * post-configuration steps necessary. This code assumes the caller got the
  198. * mgr pointer from of_fpga_mgr_get() and checked that it is not an error code.
  199. *
  200. * Return: 0 on success, negative error code otherwise.
  201. */
  202. static int fpga_mgr_buf_load(struct fpga_manager *mgr,
  203. struct fpga_image_info *info,
  204. const char *buf, size_t count)
  205. {
  206. struct page **pages;
  207. struct sg_table sgt;
  208. const void *p;
  209. int nr_pages;
  210. int index;
  211. int rc;
  212. /*
  213. * This is just a fast path if the caller has already created a
  214. * contiguous kernel buffer and the driver doesn't require SG, non-SG
  215. * drivers will still work on the slow path.
  216. */
  217. if (mgr->mops->write)
  218. return fpga_mgr_buf_load_mapped(mgr, info, buf, count);
  219. /*
  220. * Convert the linear kernel pointer into a sg_table of pages for use
  221. * by the driver.
  222. */
  223. nr_pages = DIV_ROUND_UP((unsigned long)buf + count, PAGE_SIZE) -
  224. (unsigned long)buf / PAGE_SIZE;
  225. pages = kmalloc_array(nr_pages, sizeof(struct page *), GFP_KERNEL);
  226. if (!pages)
  227. return -ENOMEM;
  228. p = buf - offset_in_page(buf);
  229. for (index = 0; index < nr_pages; index++) {
  230. if (is_vmalloc_addr(p))
  231. pages[index] = vmalloc_to_page(p);
  232. else
  233. pages[index] = kmap_to_page((void *)p);
  234. if (!pages[index]) {
  235. kfree(pages);
  236. return -EFAULT;
  237. }
  238. p += PAGE_SIZE;
  239. }
  240. /*
  241. * The temporary pages list is used to code share the merging algorithm
  242. * in sg_alloc_table_from_pages
  243. */
  244. rc = sg_alloc_table_from_pages(&sgt, pages, index, offset_in_page(buf),
  245. count, GFP_KERNEL);
  246. kfree(pages);
  247. if (rc)
  248. return rc;
  249. rc = fpga_mgr_buf_load_sg(mgr, info, &sgt);
  250. sg_free_table(&sgt);
  251. return rc;
  252. }
  253. /**
  254. * fpga_mgr_firmware_load - request firmware and load to fpga
  255. * @mgr: fpga manager
  256. * @info: fpga image specific information
  257. * @image_name: name of image file on the firmware search path
  258. *
  259. * Request an FPGA image using the firmware class, then write out to the FPGA.
  260. * Update the state before each step to provide info on what step failed if
  261. * there is a failure. This code assumes the caller got the mgr pointer
  262. * from of_fpga_mgr_get() or fpga_mgr_get() and checked that it is not an error
  263. * code.
  264. *
  265. * Return: 0 on success, negative error code otherwise.
  266. */
  267. static int fpga_mgr_firmware_load(struct fpga_manager *mgr,
  268. struct fpga_image_info *info,
  269. const char *image_name)
  270. {
  271. struct device *dev = &mgr->dev;
  272. const struct firmware *fw;
  273. int ret;
  274. dev_info(dev, "writing %s to %s\n", image_name, mgr->name);
  275. mgr->state = FPGA_MGR_STATE_FIRMWARE_REQ;
  276. ret = request_firmware(&fw, image_name, dev);
  277. if (ret) {
  278. mgr->state = FPGA_MGR_STATE_FIRMWARE_REQ_ERR;
  279. dev_err(dev, "Error requesting firmware %s\n", image_name);
  280. return ret;
  281. }
  282. ret = fpga_mgr_buf_load(mgr, info, fw->data, fw->size);
  283. release_firmware(fw);
  284. return ret;
  285. }
  286. int fpga_mgr_load(struct fpga_manager *mgr, struct fpga_image_info *info)
  287. {
  288. if (info->sgt)
  289. return fpga_mgr_buf_load_sg(mgr, info, info->sgt);
  290. if (info->buf && info->count)
  291. return fpga_mgr_buf_load(mgr, info, info->buf, info->count);
  292. if (info->firmware_name)
  293. return fpga_mgr_firmware_load(mgr, info, info->firmware_name);
  294. return -EINVAL;
  295. }
  296. EXPORT_SYMBOL_GPL(fpga_mgr_load);
  297. static const char * const state_str[] = {
  298. [FPGA_MGR_STATE_UNKNOWN] = "unknown",
  299. [FPGA_MGR_STATE_POWER_OFF] = "power off",
  300. [FPGA_MGR_STATE_POWER_UP] = "power up",
  301. [FPGA_MGR_STATE_RESET] = "reset",
  302. /* requesting FPGA image from firmware */
  303. [FPGA_MGR_STATE_FIRMWARE_REQ] = "firmware request",
  304. [FPGA_MGR_STATE_FIRMWARE_REQ_ERR] = "firmware request error",
  305. /* Preparing FPGA to receive image */
  306. [FPGA_MGR_STATE_WRITE_INIT] = "write init",
  307. [FPGA_MGR_STATE_WRITE_INIT_ERR] = "write init error",
  308. /* Writing image to FPGA */
  309. [FPGA_MGR_STATE_WRITE] = "write",
  310. [FPGA_MGR_STATE_WRITE_ERR] = "write error",
  311. /* Finishing configuration after image has been written */
  312. [FPGA_MGR_STATE_WRITE_COMPLETE] = "write complete",
  313. [FPGA_MGR_STATE_WRITE_COMPLETE_ERR] = "write complete error",
  314. /* FPGA reports to be in normal operating mode */
  315. [FPGA_MGR_STATE_OPERATING] = "operating",
  316. };
  317. static ssize_t name_show(struct device *dev,
  318. struct device_attribute *attr, char *buf)
  319. {
  320. struct fpga_manager *mgr = to_fpga_manager(dev);
  321. return sprintf(buf, "%s\n", mgr->name);
  322. }
  323. static ssize_t state_show(struct device *dev,
  324. struct device_attribute *attr, char *buf)
  325. {
  326. struct fpga_manager *mgr = to_fpga_manager(dev);
  327. return sprintf(buf, "%s\n", state_str[mgr->state]);
  328. }
  329. static DEVICE_ATTR_RO(name);
  330. static DEVICE_ATTR_RO(state);
  331. static struct attribute *fpga_mgr_attrs[] = {
  332. &dev_attr_name.attr,
  333. &dev_attr_state.attr,
  334. NULL,
  335. };
  336. ATTRIBUTE_GROUPS(fpga_mgr);
  337. static struct fpga_manager *__fpga_mgr_get(struct device *dev)
  338. {
  339. struct fpga_manager *mgr;
  340. mgr = to_fpga_manager(dev);
  341. if (!try_module_get(dev->parent->driver->owner))
  342. goto err_dev;
  343. return mgr;
  344. err_dev:
  345. put_device(dev);
  346. return ERR_PTR(-ENODEV);
  347. }
  348. static int fpga_mgr_dev_match(struct device *dev, const void *data)
  349. {
  350. return dev->parent == data;
  351. }
  352. /**
  353. * fpga_mgr_get - get a reference to a fpga mgr
  354. * @dev: parent device that fpga mgr was registered with
  355. *
  356. * Given a device, get a reference to a fpga mgr.
  357. *
  358. * Return: fpga manager struct or IS_ERR() condition containing error code.
  359. */
  360. struct fpga_manager *fpga_mgr_get(struct device *dev)
  361. {
  362. struct device *mgr_dev = class_find_device(fpga_mgr_class, NULL, dev,
  363. fpga_mgr_dev_match);
  364. if (!mgr_dev)
  365. return ERR_PTR(-ENODEV);
  366. return __fpga_mgr_get(mgr_dev);
  367. }
  368. EXPORT_SYMBOL_GPL(fpga_mgr_get);
  369. static int fpga_mgr_of_node_match(struct device *dev, const void *data)
  370. {
  371. return dev->of_node == data;
  372. }
  373. /**
  374. * of_fpga_mgr_get - get a reference to a fpga mgr
  375. * @node: device node
  376. *
  377. * Given a device node, get a reference to a fpga mgr.
  378. *
  379. * Return: fpga manager struct or IS_ERR() condition containing error code.
  380. */
  381. struct fpga_manager *of_fpga_mgr_get(struct device_node *node)
  382. {
  383. struct device *dev;
  384. dev = class_find_device(fpga_mgr_class, NULL, node,
  385. fpga_mgr_of_node_match);
  386. if (!dev)
  387. return ERR_PTR(-ENODEV);
  388. return __fpga_mgr_get(dev);
  389. }
  390. EXPORT_SYMBOL_GPL(of_fpga_mgr_get);
  391. /**
  392. * fpga_mgr_put - release a reference to a fpga manager
  393. * @mgr: fpga manager structure
  394. */
  395. void fpga_mgr_put(struct fpga_manager *mgr)
  396. {
  397. module_put(mgr->dev.parent->driver->owner);
  398. put_device(&mgr->dev);
  399. }
  400. EXPORT_SYMBOL_GPL(fpga_mgr_put);
  401. /**
  402. * fpga_mgr_lock - Lock FPGA manager for exclusive use
  403. * @mgr: fpga manager
  404. *
  405. * Given a pointer to FPGA Manager (from fpga_mgr_get() or
  406. * of_fpga_mgr_put()) attempt to get the mutex.
  407. *
  408. * Return: 0 for success or -EBUSY
  409. */
  410. int fpga_mgr_lock(struct fpga_manager *mgr)
  411. {
  412. if (!mutex_trylock(&mgr->ref_mutex)) {
  413. dev_err(&mgr->dev, "FPGA manager is in use.\n");
  414. return -EBUSY;
  415. }
  416. return 0;
  417. }
  418. EXPORT_SYMBOL_GPL(fpga_mgr_lock);
  419. /**
  420. * fpga_mgr_unlock - Unlock FPGA manager
  421. * @mgr: fpga manager
  422. */
  423. void fpga_mgr_unlock(struct fpga_manager *mgr)
  424. {
  425. mutex_unlock(&mgr->ref_mutex);
  426. }
  427. EXPORT_SYMBOL_GPL(fpga_mgr_unlock);
  428. /**
  429. * fpga_mgr_create - create and initialize a FPGA manager struct
  430. * @dev: fpga manager device from pdev
  431. * @name: fpga manager name
  432. * @mops: pointer to structure of fpga manager ops
  433. * @priv: fpga manager private data
  434. *
  435. * Return: pointer to struct fpga_manager or NULL
  436. */
  437. struct fpga_manager *fpga_mgr_create(struct device *dev, const char *name,
  438. const struct fpga_manager_ops *mops,
  439. void *priv)
  440. {
  441. struct fpga_manager *mgr;
  442. int id, ret;
  443. if (!mops || !mops->write_complete || !mops->state ||
  444. !mops->write_init || (!mops->write && !mops->write_sg) ||
  445. (mops->write && mops->write_sg)) {
  446. dev_err(dev, "Attempt to register without fpga_manager_ops\n");
  447. return NULL;
  448. }
  449. if (!name || !strlen(name)) {
  450. dev_err(dev, "Attempt to register with no name!\n");
  451. return NULL;
  452. }
  453. mgr = kzalloc(sizeof(*mgr), GFP_KERNEL);
  454. if (!mgr)
  455. return NULL;
  456. id = ida_simple_get(&fpga_mgr_ida, 0, 0, GFP_KERNEL);
  457. if (id < 0) {
  458. ret = id;
  459. goto error_kfree;
  460. }
  461. mutex_init(&mgr->ref_mutex);
  462. mgr->name = name;
  463. mgr->mops = mops;
  464. mgr->priv = priv;
  465. device_initialize(&mgr->dev);
  466. mgr->dev.class = fpga_mgr_class;
  467. mgr->dev.groups = mops->groups;
  468. mgr->dev.parent = dev;
  469. mgr->dev.of_node = dev->of_node;
  470. mgr->dev.id = id;
  471. ret = dev_set_name(&mgr->dev, "fpga%d", id);
  472. if (ret)
  473. goto error_device;
  474. return mgr;
  475. error_device:
  476. ida_simple_remove(&fpga_mgr_ida, id);
  477. error_kfree:
  478. kfree(mgr);
  479. return NULL;
  480. }
  481. EXPORT_SYMBOL_GPL(fpga_mgr_create);
  482. /**
  483. * fpga_mgr_free - deallocate a FPGA manager
  484. * @mgr: fpga manager struct created by fpga_mgr_create
  485. */
  486. void fpga_mgr_free(struct fpga_manager *mgr)
  487. {
  488. ida_simple_remove(&fpga_mgr_ida, mgr->dev.id);
  489. kfree(mgr);
  490. }
  491. EXPORT_SYMBOL_GPL(fpga_mgr_free);
  492. /**
  493. * fpga_mgr_register - register a FPGA manager
  494. * @mgr: fpga manager struct created by fpga_mgr_create
  495. *
  496. * Return: 0 on success, negative error code otherwise.
  497. */
  498. int fpga_mgr_register(struct fpga_manager *mgr)
  499. {
  500. int ret;
  501. /*
  502. * Initialize framework state by requesting low level driver read state
  503. * from device. FPGA may be in reset mode or may have been programmed
  504. * by bootloader or EEPROM.
  505. */
  506. mgr->state = mgr->mops->state(mgr);
  507. ret = device_add(&mgr->dev);
  508. if (ret)
  509. goto error_device;
  510. dev_info(&mgr->dev, "%s registered\n", mgr->name);
  511. return 0;
  512. error_device:
  513. ida_simple_remove(&fpga_mgr_ida, mgr->dev.id);
  514. return ret;
  515. }
  516. EXPORT_SYMBOL_GPL(fpga_mgr_register);
  517. /**
  518. * fpga_mgr_unregister - unregister a FPGA manager
  519. * @mgr: fpga manager struct
  520. */
  521. void fpga_mgr_unregister(struct fpga_manager *mgr)
  522. {
  523. dev_info(&mgr->dev, "%s %s\n", __func__, mgr->name);
  524. /*
  525. * If the low level driver provides a method for putting fpga into
  526. * a desired state upon unregister, do it.
  527. */
  528. if (mgr->mops->fpga_remove)
  529. mgr->mops->fpga_remove(mgr);
  530. device_unregister(&mgr->dev);
  531. }
  532. EXPORT_SYMBOL_GPL(fpga_mgr_unregister);
  533. static void fpga_mgr_dev_release(struct device *dev)
  534. {
  535. struct fpga_manager *mgr = to_fpga_manager(dev);
  536. fpga_mgr_free(mgr);
  537. }
  538. static int __init fpga_mgr_class_init(void)
  539. {
  540. pr_info("FPGA manager framework\n");
  541. fpga_mgr_class = class_create(THIS_MODULE, "fpga_manager");
  542. if (IS_ERR(fpga_mgr_class))
  543. return PTR_ERR(fpga_mgr_class);
  544. fpga_mgr_class->dev_groups = fpga_mgr_groups;
  545. fpga_mgr_class->dev_release = fpga_mgr_dev_release;
  546. return 0;
  547. }
  548. static void __exit fpga_mgr_class_exit(void)
  549. {
  550. class_destroy(fpga_mgr_class);
  551. ida_destroy(&fpga_mgr_ida);
  552. }
  553. MODULE_AUTHOR("Alan Tull <atull@kernel.org>");
  554. MODULE_DESCRIPTION("FPGA manager framework");
  555. MODULE_LICENSE("GPL v2");
  556. subsys_initcall(fpga_mgr_class_init);
  557. module_exit(fpga_mgr_class_exit);