From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755034AbbE2Cgv (ORCPT ); Thu, 28 May 2015 22:36:51 -0400 Received: from mail-ob0-f171.google.com ([209.85.214.171]:36158 "EHLO mail-ob0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753342AbbE2Cgq (ORCPT ); Thu, 28 May 2015 22:36:46 -0400 Message-ID: <5567D0BA.5020409@gmail.com> Date: Thu, 28 May 2015 19:36:42 -0700 From: Florian Fainelli User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Andrew Lunn CC: Mathieu Olivari , robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, davem@davemloft.net, linux@roeck-us.net, gang.chen.5i5j@gmail.com, jiri@resnulli.us, leitec@staticky.com, fabf@skynet.be, pavel.nakonechny@skitlab.ru, joe@perches.com, sfeldma@gmail.com, nbd@openwrt.org, juhosg@openwrt.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH 3/7] net: dsa: ar8xxx: add regmap support References: <1432863742-18427-1-git-send-email-mathieu@codeaurora.org> <1432863742-18427-4-git-send-email-mathieu@codeaurora.org> <5567C7B6.5060905@gmail.com> <20150529022329.GH11260@lunn.ch> In-Reply-To: <20150529022329.GH11260@lunn.ch> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 05/28/15 19:23, Andrew Lunn a écrit : > On Thu, May 28, 2015 at 06:58:14PM -0700, Florian Fainelli wrote: >> Le 05/28/15 18:42, Mathieu Olivari a écrit : >>> All switch registers can now be dumped using regmap/debugfs. >>> >>> \# cat /sys/kernel/debug/regmap//registers >>> 0000: 00001302 >>> 0004: ... >>> ... >> >> ethtool has a register dump command, which should already be supported >> by the current code in net/dsa/slave.c, is there a particular reason why >> you use debugfs here instead? > > Hi Florian > > ethtool -d allows you to dump the registers for a port which has a > slave device. It is sometimes useful to dump the cpu ports registers, > or DSA ports, i.e. inter switch ports. Marvell devices also have two > sets of global registers, not specific to any port. > > For my debugging, i have code which allows you to read the registers > via debugfs. Fair enough, are there other global "things" besides counters that could deserve adding maybe some sort of global/master net_device to help query switch-wide information? -- Florian