Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jul 2019 21:53:59 +0000 (UTC)
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r350229 - head/sys/arm/ti
Message-ID:  <201907222153.x6MLrxDk082199@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: manu
Date: Mon Jul 22 21:53:58 2019
New Revision: 350229
URL: https://svnweb.freebsd.org/changeset/base/350229

Log:
  arm: ti: Get the hwmods property from the parent node
  
  Since the Linux 5.0 dts the ti,hwmods property is on the parent
  ti.sysc node.

Modified:
  head/sys/arm/ti/ti_hwmods.c

Modified: head/sys/arm/ti/ti_hwmods.c
==============================================================================
--- head/sys/arm/ti/ti_hwmods.c	Mon Jul 22 21:07:58 2019	(r350228)
+++ head/sys/arm/ti/ti_hwmods.c	Mon Jul 22 21:53:58 2019	(r350229)
@@ -110,7 +110,7 @@ ti_hwmods_get_clock(device_t dev)
 	if ((node = ofw_bus_get_node(dev)) == 0)
 		return (INVALID_CLK_IDENT);
 
-	if ((len = OF_getprop_alloc(node, "ti,hwmods", (void**)&name)) <= 0)
+	if ((len = OF_getprop_alloc(OF_parent(node), "ti,hwmods", (void**)&name)) <= 0)
 		return (INVALID_CLK_IDENT);
 
 	buf = name;
@@ -148,7 +148,7 @@ int ti_hwmods_contains(device_t dev, const char *hwmod
 	if ((node = ofw_bus_get_node(dev)) == 0)
 		return (0);
 
-	if ((len = OF_getprop_alloc(node, "ti,hwmods", (void**)&name)) <= 0)
+	if ((len = OF_getprop_alloc(OF_parent(node), "ti,hwmods", (void**)&name)) <= 0)
 		return (0);
 
 	buf = name;
@@ -182,7 +182,7 @@ ti_hwmods_get_unit(device_t dev, const char *hwmod)
 	if ((node = ofw_bus_get_node(dev)) == 0)
 		return (0);
 
-	if ((len = OF_getprop_alloc(node, "ti,hwmods", (void**)&name)) <= 0)
+	if ((len = OF_getprop_alloc(OF_parent(node), "ti,hwmods", (void**)&name)) <= 0)
 		return (0);
 
 	buf = name;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907222153.x6MLrxDk082199>