From: Shawn Lin Date: Tue, 8 Mar 2016 07:57:56 +0000 (+0800) Subject: phy: rockchip-emmc: fix compile issue on arm64 platform X-Git-Tag: firefly_0821_release~3178 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=firefly-linux-kernel-4.4.55.git;a=commitdiff_plain;h=a102978d92d05f332e2bb6430fd164999569b618 phy: rockchip-emmc: fix compile issue on arm64 platform 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. Change-Id: Ib6a10cb8c3629ec3983854f1bfb7c2426edf79d2 Signed-off-by: Shawn Lin --- diff --git a/Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt b/Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt index 61916f15a949..7e6d0e193d90 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 887b4c27195f..416e15db86a9 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;