From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933538AbcBCHYf (ORCPT ); Wed, 3 Feb 2016 02:24:35 -0500 Received: from lucky1.263xmail.com ([211.157.147.131]:34026 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933155AbcBCHYe (ORCPT ); Wed, 3 Feb 2016 02:24:34 -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: linux-rockchip@lists.infradead.org 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 Subject: Re: [PATCH v2 2/2] phy: add a driver for the Rockchip SoC internal eMMC PHY To: Kishon Vijay Abraham I References: <1451956034-24421-1-git-send-email-shawn.lin@rock-chips.com> <1451956081-24501-1-git-send-email-shawn.lin@rock-chips.com> <56B1A0A7.7060109@ti.com> Cc: shawn.lin@rock-chips.com, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org From: Shawn Lin Message-ID: <56B1AB27.3020906@rock-chips.com> Date: Wed, 3 Feb 2016 15:24:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56B1A0A7.7060109@ti.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kishon, On 2016/2/3 14:39, Kishon Vijay Abraham I wrote: > Hi, > > On Tuesday 05 January 2016 06:38 AM, Shawn Lin wrote: >> This patch to add a generic PHY driver for ROCKCHIP eMMC PHY. >> Access the PHY via registers provided by GRF (general register [...] >> + * >> + * Copyright (C) 2015 Shawn Lin >> + * Copyright (C) 2015 ROCKCHIP, Inc. > > 2016? :) I will update it. >> + * >> + * This program is free software; you can redistribute it and/or modify >> + * it under the terms of the GNU General Public License as published by [...] >> + } >> + >> + /* >> + * Enable analog DLL circuits, and we need extra 10.2us >> + * for dll to be ready for work. >> + */ >> + regmap_write(rk_phy->reg_base, >> + rk_phy->reg_offset + GRF_EMMCPHY_CON6, >> + HIWORD_UPDATE(PHYCTRL_ENDLL_ENABLE, >> + PHYCTRL_ENDLL_MASK, >> + PHYCTRL_ENDLL_SHIFT)); >> + udelay(11); > > add a comment for this delay too. Got it. >> + regmap_read(rk_phy->reg_base, >> + rk_phy->reg_offset + GRF_EMMCPHY_STATUS, >> + &dllrdy); >> + dllrdy = (dllrdy >> PHYCTRL_DLLRDY_SHIFT) & PHYCTRL_DLLRDY_MASK; >> + if (dllrdy != PHYCTRL_DLLRDY_DONE) { >> + pr_err("rockchip_emmc_phy_power: dllrdy timeout.\n"); >> + return -ETIMEDOUT; >> + } >> + >> + return 0; >> +} >> + [...] >> +static int rockchip_emmc_phy_init(struct phy *phy) >> +{ >> + return 0; >> +} >> + >> +static int rockchip_emmc_phy_exit(struct phy *phy) >> +{ >> + return 0; >> +} > > empty init/exit functions are not required. > yep. > Thanks > Kishon > > > -- Best Regards Shawn Lin