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