From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754243AbcBBJir (ORCPT ); Tue, 2 Feb 2016 04:38:47 -0500 Received: from lucky1.263xmail.com ([211.157.147.130]:49747 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754074AbcBBJin (ORCPT ); Tue, 2 Feb 2016 04:38:43 -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: wdc@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: wdc@rock-chips.com X-UNIQUE-TAG: <2cd1f47452955769d8f25bf04c4adbdc> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Subject: Re: [PATCH] PM / AVS: rockchip-io: add GRF and PMUGRF types to distinguish To: =?UTF-8?Q?Heiko_St=c3=bcbner?= References: <1454155305-55516-1-git-send-email-david.wu@rock-chips.com> <5387650.lAgTxexlF2@phil> <56AF1D4E.40307@rock-chips.com> <5354361.hQXgJ7cEGx@diego> Cc: David Wu , khilman@kernel.org, nm@ti.com, huangtao@rock-chips.com, cf@rock-chips.com, zyw@rock-chips.com, xjq@rock-chips.com, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org From: "David.Wu" Message-ID: <56B07923.9020900@rock-chips.com> Date: Tue, 2 Feb 2016 17:38:43 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <5354361.hQXgJ7cEGx@diego> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Heiko, 在 2016/2/2 5:17, Heiko Stübner 写道: > Hi David, > > Am Montag, 1. Februar 2016, 16:54:38 schrieb David.Wu: >> 在 2016/1/30 20:39, Heiko Stuebner 写道: >>> Am Samstag, 30. Januar 2016, 20:01:45 schrieb David Wu: >>>> As rk3368 contained two separated iodomain areas, this was >>>> determined to use which regmap base address. >>>> >>>> Signed-off-by: David Wu >>> I don't think we need to specify this on a driver level. Both GRF areas >>> are >>> "General register files" only located in two separate power-domains. >>> So the rockchip,grf property should work for both. Especially as nothing >>> keeps designers from introducing yet another GRF-area somewhere else ;-) >>> >>> >From when I started working on the rk3368, I still have a preliminary >>> >>> patches for that sitting here, so I've attached on how I envisoned that to >>> work. >> Okay, i agree to you, but it make someone a little confused just from >> the drive code, >> not DT file, about pmugrf regmap base address.:-) >> >> How do you feel about intergating GRF and PMU drivers in one driver? >> Thanks! > I will very strongly disagree here ;-) . > Similar to the power-domains being part of the pmu, the io-domains are > part of their individual GRFs. So if you want it really clean and tidy the way > to go foward will be the attached patches. Compile-tested only. Thanks for your reply, the patchs look better than mine. I have tested them on sdk board and i found something may be wrong. "parent->of_node" instead of "parent", as the parent is not null if parent-node not used. if (parent->of_node) { iod->grf = syscon_node_to_regmap(parent->of_node); } else { dev_dbg(&pdev->dev, "falling back to old binding\n"); iod->grf = syscon_regmap_lookup_by_phandle(np, "rockchip,grf"); } > Other things like the usbphy control should move there as well in the long > run. But that's not immediate necessary. > > > Heiko