]> git.sur5r.net Git - u-boot/commitdiff
imx: ventana: update imx wdog external reset dt property
authorTim Harvey <tharvey@gateworks.com>
Mon, 15 May 2017 17:05:07 +0000 (10:05 -0700)
committerStefano Babic <sbabic@denx.de>
Thu, 18 May 2017 09:24:33 +0000 (11:24 +0200)
Early backports of the imx wdog external reset feature occured before the
property was accepted upstream and used 'ext-reset-output' instead of
'fsl,ext-reset-output'. In order to support older kernels remove both
properties.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
board/gateworks/gw_ventana/gw_ventana.c

index c26807d4c2883b735f2f0929be131e992d568ee3..a68ec69f1886d05e2739cfe65c373d7fa1bc9a71 100644 (file)
@@ -1090,6 +1090,12 @@ void ft_board_pci_fixup(void *blob, bd_t *bd)
 }
 #endif /* if defined(CONFIG_CMD_PCI) */
 
+void ft_board_wdog_fixup(void *blob, const char *path)
+{
+       ft_delprop_path(blob, path, "ext-reset-output");
+       ft_delprop_path(blob, path, "fsl,ext-reset-output");
+}
+
 /*
  * called prior to booting kernel or by 'fdt boardsetup' command
  *
@@ -1172,8 +1178,7 @@ int ft_board_setup(void *blob, bd_t *bd)
 
                /* GW51xx-E adds WDOG1_B external reset */
                if (rev < 'E')
-                       ft_delprop_path(blob, WDOG1_PATH,
-                                       "fsl,ext-reset-output");
+                       ft_board_wdog_fixup(blob, WDOG1_PATH);
                break;
 
        case GW52xx:
@@ -1204,22 +1209,18 @@ int ft_board_setup(void *blob, bd_t *bd)
                                gpio_cfg[board_type].usd_vsel = 0;
 
                        /* GW522x-B adds WDOG1_B external reset */
-                       ft_delprop_path(blob, WDOG1_PATH,
-                                       "fsl,ext-reset-output");
+                       ft_board_wdog_fixup(blob, WDOG1_PATH);
                }
 
                /* GW520x-E adds WDOG1_B external reset */
                else if (info->model[4] == '0' && rev < 'E')
-                       ft_delprop_path(blob, WDOG1_PATH,
-                                       "fsl,ext-reset-output");
-
+                       ft_board_wdog_fixup(blob, WDOG1_PATH);
                break;
 
        case GW53xx:
                /* GW53xx-E adds WDOG1_B external reset */
                if (rev < 'E')
-                       ft_delprop_path(blob, WDOG1_PATH,
-                                       "fsl,ext-reset-output");
+                       ft_board_wdog_fixup(blob, WDOG1_PATH);
                break;
 
        case GW54xx:
@@ -1233,8 +1234,7 @@ int ft_board_setup(void *blob, bd_t *bd)
 
                /* GW54xx-E adds WDOG2_B external reset */
                if (rev < 'E')
-                       ft_delprop_path(blob, WDOG2_PATH,
-                                       "fsl,ext-reset-output");
+                       ft_board_wdog_fixup(blob, WDOG2_PATH);
                break;
 
        case GW551x:
@@ -1283,8 +1283,7 @@ int ft_board_setup(void *blob, bd_t *bd)
 
                /* GW551x-C adds WDOG1_B external reset */
                if (rev < 'C')
-                       ft_delprop_path(blob, WDOG1_PATH,
-                                       "fsl,ext-reset-output");
+                       ft_board_wdog_fixup(blob, WDOG1_PATH);
                break;
        }