From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753170AbcBZCar (ORCPT ); Thu, 25 Feb 2016 21:30:47 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:23620 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752727AbcBZCao (ORCPT ); Thu, 25 Feb 2016 21:30:44 -0500 Subject: Re: [PATCH v9 2/6] clk: hisilicon: add CRG driver for hi3519 soc To: Stephen Boyd References: <1456127280-23275-1-git-send-email-xuejiancheng@huawei.com> <1456127280-23275-3-git-send-email-xuejiancheng@huawei.com> <20160225234215.GK28849@codeaurora.org> CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , From: xuejiancheng Message-ID: <56CFB5CF.2050800@huawei.com> Date: Fri, 26 Feb 2016 10:17:51 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <20160225234215.GK28849@codeaurora.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.217.211] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.56CFB5E1.00FA,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 5ec60269e1756fa38bceea11fda1e9a0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Stephen, On 2016/2/26 7:42, Stephen Boyd wrote: >> diff --git a/drivers/clk/hisilicon/reset.c b/drivers/clk/hisilicon/reset.c >> new file mode 100644 >> index 0000000..50e00e7 >> --- /dev/null >> +++ b/drivers/clk/hisilicon/reset.c >> + >> +int hisi_reset_init(struct device_node *np) >> +{ >> + struct hisi_reset_controller *rstc; >> + >> + rstc = kzalloc(sizeof(*rstc), GFP_KERNEL); >> + if (!rstc) >> + return -ENOMEM; >> + >> + rstc->membase = of_iomap(np, 0); > > Any reason why we can't pass the platform device here and map the > register space with platform device APIs? > This function can be called by other clock drivers except clk-hi3519. Some clock drivers may not be registered as platform drivers. Moreover this function may be called early even before platform_bus_init. Thank you! Regards, Jiancheng.