reset-uniphier.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  1. /*
  2. * Copyright (C) 2016 Socionext Inc.
  3. * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. */
  15. #include <linux/mfd/syscon.h>
  16. #include <linux/module.h>
  17. #include <linux/of.h>
  18. #include <linux/of_device.h>
  19. #include <linux/platform_device.h>
  20. #include <linux/regmap.h>
  21. #include <linux/reset-controller.h>
  22. struct uniphier_reset_data {
  23. unsigned int id;
  24. unsigned int reg;
  25. unsigned int bit;
  26. unsigned int flags;
  27. #define UNIPHIER_RESET_ACTIVE_LOW BIT(0)
  28. };
  29. #define UNIPHIER_RESET_ID_END (unsigned int)(-1)
  30. #define UNIPHIER_RESET_END \
  31. { .id = UNIPHIER_RESET_ID_END }
  32. #define UNIPHIER_RESET(_id, _reg, _bit) \
  33. { \
  34. .id = (_id), \
  35. .reg = (_reg), \
  36. .bit = (_bit), \
  37. }
  38. #define UNIPHIER_RESETX(_id, _reg, _bit) \
  39. { \
  40. .id = (_id), \
  41. .reg = (_reg), \
  42. .bit = (_bit), \
  43. .flags = UNIPHIER_RESET_ACTIVE_LOW, \
  44. }
  45. /* System reset data */
  46. static const struct uniphier_reset_data uniphier_ld4_sys_reset_data[] = {
  47. UNIPHIER_RESETX(2, 0x2000, 2), /* NAND */
  48. UNIPHIER_RESETX(8, 0x2000, 10), /* STDMAC (Ether, HSC, MIO) */
  49. UNIPHIER_RESET_END,
  50. };
  51. static const struct uniphier_reset_data uniphier_pro4_sys_reset_data[] = {
  52. UNIPHIER_RESETX(2, 0x2000, 2), /* NAND */
  53. UNIPHIER_RESETX(6, 0x2000, 12), /* Ether */
  54. UNIPHIER_RESETX(8, 0x2000, 10), /* STDMAC (HSC, MIO, RLE) */
  55. UNIPHIER_RESETX(12, 0x2000, 6), /* GIO (Ether, SATA, USB3) */
  56. UNIPHIER_RESETX(14, 0x2000, 17), /* USB30 */
  57. UNIPHIER_RESETX(15, 0x2004, 17), /* USB31 */
  58. UNIPHIER_RESETX(28, 0x2000, 18), /* SATA0 */
  59. UNIPHIER_RESETX(29, 0x2004, 18), /* SATA1 */
  60. UNIPHIER_RESETX(30, 0x2000, 19), /* SATA-PHY */
  61. UNIPHIER_RESETX(40, 0x2000, 13), /* AIO */
  62. UNIPHIER_RESET_END,
  63. };
  64. static const struct uniphier_reset_data uniphier_pro5_sys_reset_data[] = {
  65. UNIPHIER_RESETX(2, 0x2000, 2), /* NAND */
  66. UNIPHIER_RESETX(8, 0x2000, 10), /* STDMAC (HSC) */
  67. UNIPHIER_RESETX(12, 0x2000, 6), /* GIO (PCIe, USB3) */
  68. UNIPHIER_RESETX(14, 0x2000, 17), /* USB30 */
  69. UNIPHIER_RESETX(15, 0x2004, 17), /* USB31 */
  70. UNIPHIER_RESETX(24, 0x2008, 2), /* PCIe */
  71. UNIPHIER_RESETX(40, 0x2000, 13), /* AIO */
  72. UNIPHIER_RESET_END,
  73. };
  74. static const struct uniphier_reset_data uniphier_pxs2_sys_reset_data[] = {
  75. UNIPHIER_RESETX(2, 0x2000, 2), /* NAND */
  76. UNIPHIER_RESETX(6, 0x2000, 12), /* Ether */
  77. UNIPHIER_RESETX(8, 0x2000, 10), /* STDMAC (HSC, RLE) */
  78. UNIPHIER_RESETX(14, 0x2000, 17), /* USB30 */
  79. UNIPHIER_RESETX(15, 0x2004, 17), /* USB31 */
  80. UNIPHIER_RESETX(16, 0x2014, 4), /* USB30-PHY0 */
  81. UNIPHIER_RESETX(17, 0x2014, 0), /* USB30-PHY1 */
  82. UNIPHIER_RESETX(18, 0x2014, 2), /* USB30-PHY2 */
  83. UNIPHIER_RESETX(20, 0x2014, 5), /* USB31-PHY0 */
  84. UNIPHIER_RESETX(21, 0x2014, 1), /* USB31-PHY1 */
  85. UNIPHIER_RESETX(28, 0x2014, 12), /* SATA */
  86. UNIPHIER_RESET(30, 0x2014, 8), /* SATA-PHY (active high) */
  87. UNIPHIER_RESETX(40, 0x2000, 13), /* AIO */
  88. UNIPHIER_RESET_END,
  89. };
  90. static const struct uniphier_reset_data uniphier_ld11_sys_reset_data[] = {
  91. UNIPHIER_RESETX(2, 0x200c, 0), /* NAND */
  92. UNIPHIER_RESETX(4, 0x200c, 2), /* eMMC */
  93. UNIPHIER_RESETX(6, 0x200c, 6), /* Ether */
  94. UNIPHIER_RESETX(8, 0x200c, 8), /* STDMAC (HSC, MIO) */
  95. UNIPHIER_RESETX(9, 0x200c, 9), /* HSC */
  96. UNIPHIER_RESETX(40, 0x2008, 0), /* AIO */
  97. UNIPHIER_RESETX(41, 0x2008, 1), /* EVEA */
  98. UNIPHIER_RESETX(42, 0x2010, 2), /* EXIV */
  99. UNIPHIER_RESET_END,
  100. };
  101. static const struct uniphier_reset_data uniphier_ld20_sys_reset_data[] = {
  102. UNIPHIER_RESETX(2, 0x200c, 0), /* NAND */
  103. UNIPHIER_RESETX(4, 0x200c, 2), /* eMMC */
  104. UNIPHIER_RESETX(6, 0x200c, 6), /* Ether */
  105. UNIPHIER_RESETX(8, 0x200c, 8), /* STDMAC (HSC) */
  106. UNIPHIER_RESETX(9, 0x200c, 9), /* HSC */
  107. UNIPHIER_RESETX(14, 0x200c, 5), /* USB30 */
  108. UNIPHIER_RESETX(16, 0x200c, 12), /* USB30-PHY0 */
  109. UNIPHIER_RESETX(17, 0x200c, 13), /* USB30-PHY1 */
  110. UNIPHIER_RESETX(18, 0x200c, 14), /* USB30-PHY2 */
  111. UNIPHIER_RESETX(19, 0x200c, 15), /* USB30-PHY3 */
  112. UNIPHIER_RESETX(24, 0x200c, 4), /* PCIe */
  113. UNIPHIER_RESETX(40, 0x2008, 0), /* AIO */
  114. UNIPHIER_RESETX(41, 0x2008, 1), /* EVEA */
  115. UNIPHIER_RESETX(42, 0x2010, 2), /* EXIV */
  116. UNIPHIER_RESET_END,
  117. };
  118. static const struct uniphier_reset_data uniphier_pxs3_sys_reset_data[] = {
  119. UNIPHIER_RESETX(2, 0x200c, 0), /* NAND */
  120. UNIPHIER_RESETX(4, 0x200c, 2), /* eMMC */
  121. UNIPHIER_RESETX(6, 0x200c, 9), /* Ether0 */
  122. UNIPHIER_RESETX(7, 0x200c, 10), /* Ether1 */
  123. UNIPHIER_RESETX(8, 0x200c, 12), /* STDMAC */
  124. UNIPHIER_RESETX(12, 0x200c, 4), /* USB30 link */
  125. UNIPHIER_RESETX(13, 0x200c, 5), /* USB31 link */
  126. UNIPHIER_RESETX(16, 0x200c, 16), /* USB30-PHY0 */
  127. UNIPHIER_RESETX(17, 0x200c, 18), /* USB30-PHY1 */
  128. UNIPHIER_RESETX(18, 0x200c, 20), /* USB30-PHY2 */
  129. UNIPHIER_RESETX(20, 0x200c, 17), /* USB31-PHY0 */
  130. UNIPHIER_RESETX(21, 0x200c, 19), /* USB31-PHY1 */
  131. UNIPHIER_RESETX(24, 0x200c, 3), /* PCIe */
  132. UNIPHIER_RESETX(28, 0x200c, 7), /* SATA0 */
  133. UNIPHIER_RESETX(29, 0x200c, 8), /* SATA1 */
  134. UNIPHIER_RESETX(30, 0x200c, 21), /* SATA-PHY */
  135. UNIPHIER_RESET_END,
  136. };
  137. /* Media I/O reset data */
  138. #define UNIPHIER_MIO_RESET_SD(id, ch) \
  139. UNIPHIER_RESETX((id), 0x110 + 0x200 * (ch), 0)
  140. #define UNIPHIER_MIO_RESET_SD_BRIDGE(id, ch) \
  141. UNIPHIER_RESETX((id), 0x110 + 0x200 * (ch), 26)
  142. #define UNIPHIER_MIO_RESET_EMMC_HW_RESET(id, ch) \
  143. UNIPHIER_RESETX((id), 0x80 + 0x200 * (ch), 0)
  144. #define UNIPHIER_MIO_RESET_USB2(id, ch) \
  145. UNIPHIER_RESETX((id), 0x114 + 0x200 * (ch), 0)
  146. #define UNIPHIER_MIO_RESET_USB2_BRIDGE(id, ch) \
  147. UNIPHIER_RESETX((id), 0x110 + 0x200 * (ch), 24)
  148. #define UNIPHIER_MIO_RESET_DMAC(id) \
  149. UNIPHIER_RESETX((id), 0x110, 17)
  150. static const struct uniphier_reset_data uniphier_ld4_mio_reset_data[] = {
  151. UNIPHIER_MIO_RESET_SD(0, 0),
  152. UNIPHIER_MIO_RESET_SD(1, 1),
  153. UNIPHIER_MIO_RESET_SD(2, 2),
  154. UNIPHIER_MIO_RESET_SD_BRIDGE(3, 0),
  155. UNIPHIER_MIO_RESET_SD_BRIDGE(4, 1),
  156. UNIPHIER_MIO_RESET_SD_BRIDGE(5, 2),
  157. UNIPHIER_MIO_RESET_EMMC_HW_RESET(6, 1),
  158. UNIPHIER_MIO_RESET_DMAC(7),
  159. UNIPHIER_MIO_RESET_USB2(8, 0),
  160. UNIPHIER_MIO_RESET_USB2(9, 1),
  161. UNIPHIER_MIO_RESET_USB2(10, 2),
  162. UNIPHIER_MIO_RESET_USB2_BRIDGE(12, 0),
  163. UNIPHIER_MIO_RESET_USB2_BRIDGE(13, 1),
  164. UNIPHIER_MIO_RESET_USB2_BRIDGE(14, 2),
  165. UNIPHIER_RESET_END,
  166. };
  167. static const struct uniphier_reset_data uniphier_pro5_sd_reset_data[] = {
  168. UNIPHIER_MIO_RESET_SD(0, 0),
  169. UNIPHIER_MIO_RESET_SD(1, 1),
  170. UNIPHIER_MIO_RESET_EMMC_HW_RESET(6, 1),
  171. UNIPHIER_RESET_END,
  172. };
  173. /* Peripheral reset data */
  174. #define UNIPHIER_PERI_RESET_UART(id, ch) \
  175. UNIPHIER_RESETX((id), 0x114, 19 + (ch))
  176. #define UNIPHIER_PERI_RESET_I2C(id, ch) \
  177. UNIPHIER_RESETX((id), 0x114, 5 + (ch))
  178. #define UNIPHIER_PERI_RESET_FI2C(id, ch) \
  179. UNIPHIER_RESETX((id), 0x114, 24 + (ch))
  180. #define UNIPHIER_PERI_RESET_SCSSI(id, ch) \
  181. UNIPHIER_RESETX((id), 0x110, 17 + (ch))
  182. #define UNIPHIER_PERI_RESET_MCSSI(id) \
  183. UNIPHIER_RESETX((id), 0x114, 14)
  184. static const struct uniphier_reset_data uniphier_ld4_peri_reset_data[] = {
  185. UNIPHIER_PERI_RESET_UART(0, 0),
  186. UNIPHIER_PERI_RESET_UART(1, 1),
  187. UNIPHIER_PERI_RESET_UART(2, 2),
  188. UNIPHIER_PERI_RESET_UART(3, 3),
  189. UNIPHIER_PERI_RESET_I2C(4, 0),
  190. UNIPHIER_PERI_RESET_I2C(5, 1),
  191. UNIPHIER_PERI_RESET_I2C(6, 2),
  192. UNIPHIER_PERI_RESET_I2C(7, 3),
  193. UNIPHIER_PERI_RESET_I2C(8, 4),
  194. UNIPHIER_PERI_RESET_SCSSI(11, 0),
  195. UNIPHIER_RESET_END,
  196. };
  197. static const struct uniphier_reset_data uniphier_pro4_peri_reset_data[] = {
  198. UNIPHIER_PERI_RESET_UART(0, 0),
  199. UNIPHIER_PERI_RESET_UART(1, 1),
  200. UNIPHIER_PERI_RESET_UART(2, 2),
  201. UNIPHIER_PERI_RESET_UART(3, 3),
  202. UNIPHIER_PERI_RESET_FI2C(4, 0),
  203. UNIPHIER_PERI_RESET_FI2C(5, 1),
  204. UNIPHIER_PERI_RESET_FI2C(6, 2),
  205. UNIPHIER_PERI_RESET_FI2C(7, 3),
  206. UNIPHIER_PERI_RESET_FI2C(8, 4),
  207. UNIPHIER_PERI_RESET_FI2C(9, 5),
  208. UNIPHIER_PERI_RESET_FI2C(10, 6),
  209. UNIPHIER_PERI_RESET_SCSSI(11, 0),
  210. UNIPHIER_PERI_RESET_SCSSI(12, 1),
  211. UNIPHIER_PERI_RESET_SCSSI(13, 2),
  212. UNIPHIER_PERI_RESET_SCSSI(14, 3),
  213. UNIPHIER_PERI_RESET_MCSSI(15),
  214. UNIPHIER_RESET_END,
  215. };
  216. /* Analog signal amplifiers reset data */
  217. static const struct uniphier_reset_data uniphier_ld11_adamv_reset_data[] = {
  218. UNIPHIER_RESETX(0, 0x10, 6), /* EVEA */
  219. UNIPHIER_RESET_END,
  220. };
  221. /* core implementaton */
  222. struct uniphier_reset_priv {
  223. struct reset_controller_dev rcdev;
  224. struct device *dev;
  225. struct regmap *regmap;
  226. const struct uniphier_reset_data *data;
  227. };
  228. #define to_uniphier_reset_priv(_rcdev) \
  229. container_of(_rcdev, struct uniphier_reset_priv, rcdev)
  230. static int uniphier_reset_update(struct reset_controller_dev *rcdev,
  231. unsigned long id, int assert)
  232. {
  233. struct uniphier_reset_priv *priv = to_uniphier_reset_priv(rcdev);
  234. const struct uniphier_reset_data *p;
  235. for (p = priv->data; p->id != UNIPHIER_RESET_ID_END; p++) {
  236. unsigned int mask, val;
  237. if (p->id != id)
  238. continue;
  239. mask = BIT(p->bit);
  240. if (assert)
  241. val = mask;
  242. else
  243. val = ~mask;
  244. if (p->flags & UNIPHIER_RESET_ACTIVE_LOW)
  245. val = ~val;
  246. return regmap_write_bits(priv->regmap, p->reg, mask, val);
  247. }
  248. dev_err(priv->dev, "reset_id=%lu was not handled\n", id);
  249. return -EINVAL;
  250. }
  251. static int uniphier_reset_assert(struct reset_controller_dev *rcdev,
  252. unsigned long id)
  253. {
  254. return uniphier_reset_update(rcdev, id, 1);
  255. }
  256. static int uniphier_reset_deassert(struct reset_controller_dev *rcdev,
  257. unsigned long id)
  258. {
  259. return uniphier_reset_update(rcdev, id, 0);
  260. }
  261. static int uniphier_reset_status(struct reset_controller_dev *rcdev,
  262. unsigned long id)
  263. {
  264. struct uniphier_reset_priv *priv = to_uniphier_reset_priv(rcdev);
  265. const struct uniphier_reset_data *p;
  266. for (p = priv->data; p->id != UNIPHIER_RESET_ID_END; p++) {
  267. unsigned int val;
  268. int ret, asserted;
  269. if (p->id != id)
  270. continue;
  271. ret = regmap_read(priv->regmap, p->reg, &val);
  272. if (ret)
  273. return ret;
  274. asserted = !!(val & BIT(p->bit));
  275. if (p->flags & UNIPHIER_RESET_ACTIVE_LOW)
  276. asserted = !asserted;
  277. return asserted;
  278. }
  279. dev_err(priv->dev, "reset_id=%lu was not found\n", id);
  280. return -EINVAL;
  281. }
  282. static const struct reset_control_ops uniphier_reset_ops = {
  283. .assert = uniphier_reset_assert,
  284. .deassert = uniphier_reset_deassert,
  285. .status = uniphier_reset_status,
  286. };
  287. static int uniphier_reset_probe(struct platform_device *pdev)
  288. {
  289. struct device *dev = &pdev->dev;
  290. struct uniphier_reset_priv *priv;
  291. const struct uniphier_reset_data *p, *data;
  292. struct regmap *regmap;
  293. struct device_node *parent;
  294. unsigned int nr_resets = 0;
  295. data = of_device_get_match_data(dev);
  296. if (WARN_ON(!data))
  297. return -EINVAL;
  298. parent = of_get_parent(dev->of_node); /* parent should be syscon node */
  299. regmap = syscon_node_to_regmap(parent);
  300. of_node_put(parent);
  301. if (IS_ERR(regmap)) {
  302. dev_err(dev, "failed to get regmap (error %ld)\n",
  303. PTR_ERR(regmap));
  304. return PTR_ERR(regmap);
  305. }
  306. priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
  307. if (!priv)
  308. return -ENOMEM;
  309. for (p = data; p->id != UNIPHIER_RESET_ID_END; p++)
  310. nr_resets = max(nr_resets, p->id + 1);
  311. priv->rcdev.ops = &uniphier_reset_ops;
  312. priv->rcdev.owner = dev->driver->owner;
  313. priv->rcdev.of_node = dev->of_node;
  314. priv->rcdev.nr_resets = nr_resets;
  315. priv->dev = dev;
  316. priv->regmap = regmap;
  317. priv->data = data;
  318. return devm_reset_controller_register(&pdev->dev, &priv->rcdev);
  319. }
  320. static const struct of_device_id uniphier_reset_match[] = {
  321. /* System reset */
  322. {
  323. .compatible = "socionext,uniphier-ld4-reset",
  324. .data = uniphier_ld4_sys_reset_data,
  325. },
  326. {
  327. .compatible = "socionext,uniphier-pro4-reset",
  328. .data = uniphier_pro4_sys_reset_data,
  329. },
  330. {
  331. .compatible = "socionext,uniphier-sld8-reset",
  332. .data = uniphier_ld4_sys_reset_data,
  333. },
  334. {
  335. .compatible = "socionext,uniphier-pro5-reset",
  336. .data = uniphier_pro5_sys_reset_data,
  337. },
  338. {
  339. .compatible = "socionext,uniphier-pxs2-reset",
  340. .data = uniphier_pxs2_sys_reset_data,
  341. },
  342. {
  343. .compatible = "socionext,uniphier-ld11-reset",
  344. .data = uniphier_ld11_sys_reset_data,
  345. },
  346. {
  347. .compatible = "socionext,uniphier-ld20-reset",
  348. .data = uniphier_ld20_sys_reset_data,
  349. },
  350. {
  351. .compatible = "socionext,uniphier-pxs3-reset",
  352. .data = uniphier_pxs3_sys_reset_data,
  353. },
  354. /* Media I/O reset, SD reset */
  355. {
  356. .compatible = "socionext,uniphier-ld4-mio-reset",
  357. .data = uniphier_ld4_mio_reset_data,
  358. },
  359. {
  360. .compatible = "socionext,uniphier-pro4-mio-reset",
  361. .data = uniphier_ld4_mio_reset_data,
  362. },
  363. {
  364. .compatible = "socionext,uniphier-sld8-mio-reset",
  365. .data = uniphier_ld4_mio_reset_data,
  366. },
  367. {
  368. .compatible = "socionext,uniphier-pro5-sd-reset",
  369. .data = uniphier_pro5_sd_reset_data,
  370. },
  371. {
  372. .compatible = "socionext,uniphier-pxs2-sd-reset",
  373. .data = uniphier_pro5_sd_reset_data,
  374. },
  375. {
  376. .compatible = "socionext,uniphier-ld11-mio-reset",
  377. .data = uniphier_ld4_mio_reset_data,
  378. },
  379. {
  380. .compatible = "socionext,uniphier-ld11-sd-reset",
  381. .data = uniphier_pro5_sd_reset_data,
  382. },
  383. {
  384. .compatible = "socionext,uniphier-ld20-sd-reset",
  385. .data = uniphier_pro5_sd_reset_data,
  386. },
  387. {
  388. .compatible = "socionext,uniphier-pxs3-sd-reset",
  389. .data = uniphier_pro5_sd_reset_data,
  390. },
  391. /* Peripheral reset */
  392. {
  393. .compatible = "socionext,uniphier-ld4-peri-reset",
  394. .data = uniphier_ld4_peri_reset_data,
  395. },
  396. {
  397. .compatible = "socionext,uniphier-pro4-peri-reset",
  398. .data = uniphier_pro4_peri_reset_data,
  399. },
  400. {
  401. .compatible = "socionext,uniphier-sld8-peri-reset",
  402. .data = uniphier_ld4_peri_reset_data,
  403. },
  404. {
  405. .compatible = "socionext,uniphier-pro5-peri-reset",
  406. .data = uniphier_pro4_peri_reset_data,
  407. },
  408. {
  409. .compatible = "socionext,uniphier-pxs2-peri-reset",
  410. .data = uniphier_pro4_peri_reset_data,
  411. },
  412. {
  413. .compatible = "socionext,uniphier-ld11-peri-reset",
  414. .data = uniphier_pro4_peri_reset_data,
  415. },
  416. {
  417. .compatible = "socionext,uniphier-ld20-peri-reset",
  418. .data = uniphier_pro4_peri_reset_data,
  419. },
  420. {
  421. .compatible = "socionext,uniphier-pxs3-peri-reset",
  422. .data = uniphier_pro4_peri_reset_data,
  423. },
  424. /* Analog signal amplifiers reset */
  425. {
  426. .compatible = "socionext,uniphier-ld11-adamv-reset",
  427. .data = uniphier_ld11_adamv_reset_data,
  428. },
  429. {
  430. .compatible = "socionext,uniphier-ld20-adamv-reset",
  431. .data = uniphier_ld11_adamv_reset_data,
  432. },
  433. { /* sentinel */ }
  434. };
  435. MODULE_DEVICE_TABLE(of, uniphier_reset_match);
  436. static struct platform_driver uniphier_reset_driver = {
  437. .probe = uniphier_reset_probe,
  438. .driver = {
  439. .name = "uniphier-reset",
  440. .of_match_table = uniphier_reset_match,
  441. },
  442. };
  443. module_platform_driver(uniphier_reset_driver);
  444. MODULE_AUTHOR("Masahiro Yamada <yamada.masahiro@socionext.com>");
  445. MODULE_DESCRIPTION("UniPhier Reset Controller Driver");
  446. MODULE_LICENSE("GPL");