All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/2] Gateworks Ventana watchdog fix
@ 2017-05-15 17:05 Tim Harvey
  2017-05-15 17:05 ` [U-Boot] [PATCH 1/2] imx: ventana: fix GW520x external watchdog dt update Tim Harvey
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tim Harvey @ 2017-05-15 17:05 UTC (permalink / raw)
  To: u-boot

This series resovles a couple of issues with the Gateworks Ventana
IMX6 watchdog device-tree fixups.

Tim Harvey (2):
  imx: ventana: fix GW520x external watchdog dt update
  imx: ventana: update imx wdog external reset dt property

 board/gateworks/gw_ventana/gw_ventana.c | 31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 1/2] imx: ventana: fix GW520x external watchdog dt update
  2017-05-15 17:05 [U-Boot] [PATCH 0/2] Gateworks Ventana watchdog fix Tim Harvey
@ 2017-05-15 17:05 ` Tim Harvey
  2017-05-15 17:05 ` [U-Boot] [PATCH 2/2] imx: ventana: update imx wdog external reset dt property Tim Harvey
  2017-05-18  9:05 ` [U-Boot] [PATCH 0/2] Gateworks Ventana watchdog fix Stefano Babic
  2 siblings, 0 replies; 4+ messages in thread
From: Tim Harvey @ 2017-05-15 17:05 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 board/gateworks/gw_ventana/gw_ventana.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index dc8cd88..b6a5221 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -1204,16 +1204,16 @@ int ft_board_setup(void *blob, bd_t *bd)
 			    strstr((const char *)info->model, "SP331-B"))
 				gpio_cfg[board_type].usd_vsel = 0;
 
-			/* GW520x-E adds WDOG1_B external reset */
-			if (info->model[4] == '0' && rev < 'E')
-				ft_delprop_path(blob, WDOG1_PATH,
-						"fsl,ext-reset-output");
-
 			/* GW522x-B adds WDOG1_B external reset */
-			if (info->model[4] == '2' && rev < 'B')
-				ft_delprop_path(blob, WDOG1_PATH,
-						"fsl,ext-reset-output");
+			ft_delprop_path(blob, WDOG1_PATH,
+					"fsl,ext-reset-output");
 		}
+
+		/* 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");
+
 		break;
 
 	case GW53xx:
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/2] imx: ventana: update imx wdog external reset dt property
  2017-05-15 17:05 [U-Boot] [PATCH 0/2] Gateworks Ventana watchdog fix Tim Harvey
  2017-05-15 17:05 ` [U-Boot] [PATCH 1/2] imx: ventana: fix GW520x external watchdog dt update Tim Harvey
@ 2017-05-15 17:05 ` Tim Harvey
  2017-05-18  9:05 ` [U-Boot] [PATCH 0/2] Gateworks Ventana watchdog fix Stefano Babic
  2 siblings, 0 replies; 4+ messages in thread
From: Tim Harvey @ 2017-05-15 17:05 UTC (permalink / raw)
  To: u-boot

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 | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index b6a5221..c4eab20 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -1091,6 +1091,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
  *
@@ -1173,8 +1179,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:
@@ -1205,22 +1210,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:
@@ -1234,8 +1235,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:
@@ -1284,8 +1284,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;
 	}
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 0/2] Gateworks Ventana watchdog fix
  2017-05-15 17:05 [U-Boot] [PATCH 0/2] Gateworks Ventana watchdog fix Tim Harvey
  2017-05-15 17:05 ` [U-Boot] [PATCH 1/2] imx: ventana: fix GW520x external watchdog dt update Tim Harvey
  2017-05-15 17:05 ` [U-Boot] [PATCH 2/2] imx: ventana: update imx wdog external reset dt property Tim Harvey
@ 2017-05-18  9:05 ` Stefano Babic
  2 siblings, 0 replies; 4+ messages in thread
From: Stefano Babic @ 2017-05-18  9:05 UTC (permalink / raw)
  To: u-boot

On 15/05/2017 19:05, Tim Harvey wrote:
> This series resovles a couple of issues with the Gateworks Ventana
> IMX6 watchdog device-tree fixups.
> 
> Tim Harvey (2):
>   imx: ventana: fix GW520x external watchdog dt update
>   imx: ventana: update imx wdog external reset dt property
> 
>  board/gateworks/gw_ventana/gw_ventana.c | 31 +++++++++++++++----------------
>  1 file changed, 15 insertions(+), 16 deletions(-)
> 

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-18  9:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-15 17:05 [U-Boot] [PATCH 0/2] Gateworks Ventana watchdog fix Tim Harvey
2017-05-15 17:05 ` [U-Boot] [PATCH 1/2] imx: ventana: fix GW520x external watchdog dt update Tim Harvey
2017-05-15 17:05 ` [U-Boot] [PATCH 2/2] imx: ventana: update imx wdog external reset dt property Tim Harvey
2017-05-18  9:05 ` [U-Boot] [PATCH 0/2] Gateworks Ventana watchdog fix Stefano Babic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.