]> git.sur5r.net Git - u-boot/blobdiff - drivers/reset/reset-uniphier.c
mtd: nand: mxs_nand: use self init
[u-boot] / drivers / reset / reset-uniphier.c
index ebb2cae5eb3368eee2d1fed1674f761f762bb22d..657243ae62073f8ae623112c98b3bcb037a6a07e 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2016 Socionext Inc.
  *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -43,6 +42,7 @@ struct uniphier_reset_data {
 /* System reset data */
 static const struct uniphier_reset_data uniphier_pro4_sys_reset_data[] = {
        UNIPHIER_RESETX(2, 0x2000, 2),          /* NAND */
+       UNIPHIER_RESETX(6, 0x2000, 12),         /* ETHER */
        UNIPHIER_RESETX(8, 0x2000, 10),         /* STDMAC */
        UNIPHIER_RESETX(12, 0x2000, 6),         /* GIO */
        UNIPHIER_RESETX(14, 0x2000, 17),        /* USB30 */
@@ -52,6 +52,7 @@ static const struct uniphier_reset_data uniphier_pro4_sys_reset_data[] = {
 
 static const struct uniphier_reset_data uniphier_pxs2_sys_reset_data[] = {
        UNIPHIER_RESETX(2, 0x2000, 2),          /* NAND */
+       UNIPHIER_RESETX(6, 0x2000, 12),         /* ETHER */
        UNIPHIER_RESETX(8, 0x2000, 10),         /* STDMAC */
        UNIPHIER_RESETX(14, 0x2000, 17),        /* USB30 */
        UNIPHIER_RESETX(15, 0x2004, 17),        /* USB31 */
@@ -68,6 +69,7 @@ static const struct uniphier_reset_data uniphier_pxs2_sys_reset_data[] = {
 static const struct uniphier_reset_data uniphier_ld20_sys_reset_data[] = {
        UNIPHIER_RESETX(2, 0x200c, 0),          /* NAND */
        UNIPHIER_RESETX(4, 0x200c, 2),          /* eMMC */
+       UNIPHIER_RESETX(6, 0x200c, 6),          /* ETHER */
        UNIPHIER_RESETX(8, 0x200c, 8),          /* STDMAC */
        UNIPHIER_RESETX(12, 0x200c, 5),         /* GIO */
        UNIPHIER_RESETX(16, 0x200c, 12),        /* USB30-PHY0 */
@@ -77,6 +79,19 @@ static const struct uniphier_reset_data uniphier_ld20_sys_reset_data[] = {
        UNIPHIER_RESET_END,
 };
 
+static const struct uniphier_reset_data uniphier_pxs3_sys_reset_data[] = {
+       UNIPHIER_RESETX(2, 0x200c, 0),          /* NAND */
+       UNIPHIER_RESETX(4, 0x200c, 2),          /* eMMC */
+       UNIPHIER_RESETX(6, 0x200c, 9),          /* ETHER0 */
+       UNIPHIER_RESETX(7, 0x200c, 10),         /* ETHER1 */
+       UNIPHIER_RESETX(8, 0x200c, 12),         /* STDMAC */
+       UNIPHIER_RESETX(12, 0x200c, 5),         /* USB30 (GIO0) */
+       UNIPHIER_RESETX(13, 0x200c, 6),         /* USB31 (GIO1) */
+       UNIPHIER_RESETX(16, 0x200c, 16),        /* USB30-PHY */
+       UNIPHIER_RESETX(20, 0x200c, 17),        /* USB31-PHY */
+       UNIPHIER_RESET_END,
+};
+
 /* Media I/O reset data */
 #define UNIPHIER_MIO_RESET_SD(id, ch)                  \
        UNIPHIER_RESETX((id), 0x110 + 0x200 * (ch), 0)
@@ -199,7 +214,8 @@ static int uniphier_reset_update(struct reset_ctl *reset_ctl, int assert)
                return 0;
        }
 
-       dev_err(priv->dev, "reset_id=%lu was not handled\n", id);
+       dev_err(reset_ctl->dev, "reset_id=%lu was not handled\n", id);
+
        return -EINVAL;
 }
 
@@ -268,6 +284,10 @@ static const struct udevice_id uniphier_reset_match[] = {
                .compatible = "socionext,uniphier-ld20-reset",
                .data = (ulong)uniphier_ld20_sys_reset_data,
        },
+       {
+               .compatible = "socionext,uniphier-pxs3-reset",
+               .data = (ulong)uniphier_pxs3_sys_reset_data,
+       },
        /* Media I/O reset */
        {
                .compatible = "socionext,uniphier-ld4-mio-reset",
@@ -294,7 +314,15 @@ static const struct udevice_id uniphier_reset_match[] = {
                .data = (ulong)uniphier_mio_reset_data,
        },
        {
-               .compatible = "socionext,uniphier-ld20-mio-reset",
+               .compatible = "socionext,uniphier-ld11-sd-reset",
+               .data = (ulong)uniphier_mio_reset_data,
+       },
+       {
+               .compatible = "socionext,uniphier-ld20-sd-reset",
+               .data = (ulong)uniphier_mio_reset_data,
+       },
+       {
+               .compatible = "socionext,uniphier-pxs3-sd-reset",
                .data = (ulong)uniphier_mio_reset_data,
        },
        /* Peripheral reset */
@@ -326,6 +354,10 @@ static const struct udevice_id uniphier_reset_match[] = {
                .compatible = "socionext,uniphier-ld20-peri-reset",
                .data = (ulong)uniphier_pro4_peri_reset_data,
        },
+       {
+               .compatible = "socionext,uniphier-pxs3-peri-reset",
+               .data = (ulong)uniphier_pro4_peri_reset_data,
+       },
        { /* sentinel */ }
 };