From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932321AbcENCuk (ORCPT ); Fri, 13 May 2016 22:50:40 -0400 Received: from mail-lb0-f173.google.com ([209.85.217.173]:35786 "EHLO mail-lb0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753810AbcENCuh (ORCPT ); Fri, 13 May 2016 22:50:37 -0400 MIME-Version: 1.0 In-Reply-To: <20160513174300.GB7600@lunn.ch> References: <1463131568-36948-1-git-send-email-harinik@xilinx.com> <1463131568-36948-2-git-send-email-harinik@xilinx.com> <20160513174300.GB7600@lunn.ch> Date: Sat, 14 May 2016 08:20:35 +0530 Message-ID: Subject: Re: [RFC PATCH 2/2] Documentation: devictree: Add macb mdio bindings From: Harini Katakam To: Andrew Lunn Cc: Harini Katakam , Nicolas Ferre , davem@davemloft.net, Rob Herring , Pawel Moll , Mark Rutland , "ijc+devicetree@hellion.org.uk" , Kumar Gala , netdev@vger.kernel.org, "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Punnaiah Choudary Kalluri , "michals@xilinx.com" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org HI Andrew, On Fri, May 13, 2016 at 11:13 PM, Andrew Lunn wrote: > Hi Harini > > Is this backward compatible? Will devices using the old binding still > work? It isn't right now. I will have to assign the bus read/write functions conditionally in order to do that - I'll see if I can make it clean. > > /* Disable RX and TX (XXX: Should we halt the transmission > * more gracefully?) > */ > - macb_writel(bp, NCR, 0); > + ctrl = macb_readl(bp, NCR); > + ctrl &= ~(MACB_BIT(RE) | MACB_BIT(TE)); > + macb_writel(bp, NCR, ctrl); > > /* Clear the stats registers (XXX: Update stats first?) */ > - macb_writel(bp, NCR, MACB_BIT(CLRSTAT)); > + ctrl |= MACB_BIT(CLRSTAT); > + macb_writel(bp, NCR, ctrl); > > /* Clear all status flags */ > macb_writel(bp, TSR, -1); > > It is not clear to me what this part has to do with MDIO. > Sorry, I'll move this to a separate patch in my next version. It is intended to write those registers without disturbing reserved bits. Regards, Harini