Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754101AbcCHIdR (ORCPT ); Tue, 8 Mar 2016 03:33:17 -0500 Received: from lucky1.263xmail.com ([211.157.147.131]:32896 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753495AbcCHIdK (ORCPT ); Tue, 8 Mar 2016 03:33:10 -0500 X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-RL-SENDER: shawn.lin@rock-chips.com X-FST-TO: kishon@ti.com X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: shawn.lin@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 From: Shawn Lin To: Kishon Vijay Abraham I Cc: linux-kernel@vger.kernel.org, Shawn Lin Subject: [PATCH] phy: rockchip-emmc: fix compile issue on arm64 platform Date: Tue, 8 Mar 2016 16:24:13 +0800 Message-Id: <1457425453-1996-1-git-send-email-shawn.lin@rock-chips.com> X-Mailer: git-send-email 1.8.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2421 Lines: 62 This patch rename "reg" property to "reg_offset". We rename it to fix the compile issue on ARM64 platform: (reg_format): "reg" property in /phy has invalid length (4 bytes) (#address-cells == 2, #size-cells == 2) This's because "reg" is very special one which should keep the *-cells with its parent node and can't be overwrited even if we do that explicitly. On 32-bit plafform, the default *-cells fit for what we assign to "reg". But that's not correct for 64-bit platform. So we can see two possible solutions to fix this problem: A) make phy-rockchip-emmc as a child phy node and overwrite its parent's #address-cells and #size-cells. B) avoid using this special property. we use it just for passing on a offset for different Socs, and there's no requirement to change the code to make phy-rockchip-emmc as a child node. so choose option B) is sane. Signed-off-by: Shawn Lin --- Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt | 4 ++-- drivers/phy/phy-rockchip-emmc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt b/Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt index 61916f1..ed964ef 100644 --- a/Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt +++ b/Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt @@ -6,7 +6,7 @@ Required properties: - rockchip,grf : phandle to the syscon managing the "general register files" - #phy-cells: must be 0 - - reg: PHY configure reg address offset in "general + - reg_offset: PHY configure reg address offset in "general register files" Example: @@ -14,6 +14,6 @@ Example: emmcphy: phy { compatible = "rockchip,rk3399-emmc-phy"; rockchip,grf = <&grf>; - reg = <0xf780>; + reg_offset = <0xf780>; #phy-cells = <0>; }; diff --git a/drivers/phy/phy-rockchip-emmc.c b/drivers/phy/phy-rockchip-emmc.c index 887b4c2..3f55c0d 100644 --- a/drivers/phy/phy-rockchip-emmc.c +++ b/drivers/phy/phy-rockchip-emmc.c @@ -186,7 +186,7 @@ static int rockchip_emmc_phy_probe(struct platform_device *pdev) if (!rk_phy) return -ENOMEM; - if (of_property_read_u32(dev->of_node, "reg", ®_offset)) { + if (of_property_read_u32(dev->of_node, "reg_offset", ®_offset)) { dev_err(dev, "missing reg property in node %s\n", dev->of_node->name); return -EINVAL; -- 2.3.7