From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754995AbbE2C3F (ORCPT ); Thu, 28 May 2015 22:29:05 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:43555 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753168AbbE2C27 (ORCPT ); Thu, 28 May 2015 22:28:59 -0400 Date: Fri, 29 May 2015 04:23:29 +0200 From: Andrew Lunn To: Florian Fainelli 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, alexander.h.duyck@intel.com, 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 Message-ID: <20150529022329.GH11260@lunn.ch> References: <1432863742-18427-1-git-send-email-mathieu@codeaurora.org> <1432863742-18427-4-git-send-email-mathieu@codeaurora.org> <5567C7B6.5060905@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5567C7B6.5060905@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Andrew