Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753582AbcKIKvS (ORCPT ); Wed, 9 Nov 2016 05:51:18 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:32980 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753185AbcKIKos (ORCPT ); Wed, 9 Nov 2016 05:44:48 -0500 Subject: Re: [PATCH v1 03/11] drivers: soc: hisi: Add support for Hisilicon Djtag driver To: Arnd Bergmann , John Garry References: <1478101374-18778-1-git-send-email-anurup.m@huawei.com> <2030692.HPgjBCTYG6@wuerfel> <2bac1a34-591b-6557-15bf-40db25c3d129@huawei.com> <1609380.NN50qvVsP7@wuerfel> Cc: linux-arm-kernel@lists.infradead.org, anurup.m@huawei.com, linux-kernel@vger.kernel.org, mark.rutland@arm.com, shyju.pv@huawei.com, gabriele.paoloni@huawei.com, will.deacon@arm.com, linuxarm@huawei.com, xuwei5@hisilicon.com, zhangshaokun@hisilicon.com, sanil.kumar@hisilicon.com, tanxiaojun@huawei.com, shiju.jose@huawei.com From: Anurup M Message-ID: <5822FE18.5000901@gmail.com> Date: Wed, 9 Nov 2016 16:14:40 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1609380.NN50qvVsP7@wuerfel> 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 Content-Length: 1402 Lines: 45 On Tuesday 08 November 2016 08:40 PM, Arnd Bergmann wrote: > On Tuesday, November 8, 2016 1:49:43 PM CET John Garry wrote: >> Hi Arnd, >> >> Thanks for the reference. >> >> I think the i2c interface doesn't fully satisfy our requirements as we >> need more than just a slave bus address when accessing the slave device >> (which I think is what i2c uses). We also need to pass "offset" and >> "mod_mask" arguments to the djtag adapter to access specific registers >> in the slave device. > Ok. Are those values constant per device, or maybe a range? We may want to > include those in the reg property as well then. > > Arnd > Hi Arnd, The "mod_mask" is to select the sub-module within a module. This parameter is used for djtag write operation. In the case of L3 cache, this will select the L3 cache bank. 0xFFFF select all banks. This value will change based on the L3 cache bank to be written to. I think this value can be in the driver itself. For djtag read operation, the "mod_mask" is ignored. instead the input parameter "chain_id" is used. this will identify the sub-module or bank. For djtag-v1, the "chain_id" is different for each L3 cache bank, But in the case of djtag-v2 the "chain_id" is fixed and the value is 0 as In djtag-v2 there is separate "module-id" for each sub-module. The "offset" is the register offset and this value is a range for a module. Thanks, Anurup