浏览代码

powerpc/85xx: add support the ePAPR "phandle" property

The ePAPR specification says that phandle properties should be called
"phandle", and not "linux,phandle".  To facilitate the migration from
"linux,phandle" to "phandle", we update fdt_qportal() to use the new
function, fdt_create_phandle().  This function abstracts the creation of
phandle properties.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Timur Tabi 14 年之前
父节点
当前提交
e4e7e42803
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      arch/powerpc/cpu/mpc85xx/portals.c

+ 4 - 2
arch/powerpc/cpu/mpc85xx/portals.c

@@ -151,8 +151,10 @@ static int fdt_qportal(void *blob, int off, int id, char *name,
 			dev_handle = fdt_get_phandle(blob, dev_off);
 			dev_handle = fdt_get_phandle(blob, dev_off);
 			if (dev_handle <= 0) {
 			if (dev_handle <= 0) {
 				dev_handle = fdt_alloc_phandle(blob);
 				dev_handle = fdt_alloc_phandle(blob);
-				fdt_setprop_cell(blob, dev_off,
-					"linux,phandle", dev_handle);
+				ret = fdt_create_phandle(blob, dev_off,
+							 dev_handle);
+				if (ret < 0)
+					return ret;
 			}
 			}
 
 
 			ret = fdt_setprop(blob, childoff, "dev-handle",
 			ret = fdt_setprop(blob, childoff, "dev-handle",